Question:
At client, how can I get the IP address or host name of
itself.
Answer:
The following example requires using the Winsock API
encapsulated in WinSock.pas.
uses
WinSock;
procedure GetHostInfo(var Name, Address: string);
var
WSAData: TWSAData;
HostEnt: PHostEnt;
begin
{ no error checking...}
WSAStartup(2, WSAData);
SetLength(Name, 255);
Gethostname(PChar(Name), 255);
SetLength(Name, StrLen(PChar(Name)));
HostEnt := gethostbyname(PChar(Name));
with HostEnt^ do
Address := Format('%d.%d.%d.%d',[
Byte(h_addr^[0]),
Byte(h_addr^[1]),
Byte(h_addr^[2]),
Byte(h_addr^[3])]);
WSACleanup;
end;
Question:
"External Exception C0000008" or "Access Violation" error with
2.3.3 SQL NET client: I get an Access Violation with Delphi 3
and an External Exception error with Delphi 2 when connecting
to an Oracle server when in Delphi's IDE or Turbo Debugger with
NT4. If I run the application alone, it executes correctly. How
do I get around the problem?
Answer:
Borland has determined that this is a problem with SQL NET
2.3.3. Oracle also recognizes this as a SQL NET problem. There
are a couple of workarounds:
Rename or remove the registry entry
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OTRACE73
This is the solution that Oracle support recommends!
Start Oracle's Installer and remove the "Oracle Trace
collection Serveces 7.3.3.x.x"
Turn off Integrated Debugging in Delphi's IDE
Use an Oracle SQL NET that is older than 2.3.3
Question:
If I use TMidasConnection with the sockets (TCP/IP)
transport, can I still take advantage of OLE Enterprise load
balancing and fail over? Would I then have to install OLE
Enterprise on the client machines?
Answer:
You can take advantage of OLE Enterprise without installing
it on the clients machines. Just set up the server (the
machine running SCKTSRVR.EXE) as a OLE Enterprise client.
That way, when a request comes in from a real client,
SCKTSRVR will attempt to create the object, and OLE
Enterprise will intercept and provide the service.
Question:
How does the socket server (\bin\Scktsrvr.exe) interact with
TMidasConnection?
Answer:
The socket server is something like a service that replaces
DCOM, but without the security. When a client application sets
Connected = True on a TMidasConnection, the socket server on the
server machine creates the remote data module. Then it takes
the IDispatch invoke and GetIDsOfNames methods and marshals them
through the socket connection, using TCP/IP.
Question:
What would cause error:
MS SQL Server error "17824 Unable to write to ListenOn
connection 'xxx', loginname 'xxx', hostname 'xxx'."
Answer:
PROBLEM:
After establishing a number of concurrent application connections
to the MS SQL Server the following error is encountered:
MS SQL Server error "17824 Unable to write to ListenOn
connection 'xxx', loginname 'xxx', hostname 'xxx'."
POSSIBLE CAUSE:
It is possible that the PROCEDURE CACHE percentage is set too
low. Please see your MS SQL Server documentation and NT Event
Viewer for more information on debugging network errors and
tuning your MS SQL Server's PROCEDURE CACHE.
Relevent SQL Server options:
MAX PROCEDURE CACHE ...
MAX WORKER THREADS
PROCEDURE CACHE
The procedure cache holds entries for each procedure and other
maintenance overhead.
Settings for the PROCEDURE CACHE include:
MAX PROCEDURE CACHE ACTIVE %
MAX PROCEDURE CACHE USED%
PROCEDURE CACHE USED%
MAX WORKER THREADS
The max worker threads option allows control over the number
of threads allocated to the user pool.
Question:
I get the impression that in order to register the server
interfaces with the client I have to execute the server at each
client. Is this true?
Answer:
No. On the client, fill in the ComputerName and ServerGUID
properties of the TRemoteServer. This allows the GUID to be
located in the remote computer's registry in the CLSID section.
The GUID will have a ProgID section containing the server name
that is used to populate the ServerName property of
TRemoteServer drop down list.