Initializes an Open Data Services server application.
Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.
For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).
SRV_SERVER * srv_init (
SRV_CONFIG * config,
DBCHAR * server_name,
int namelen );
HKEY_LOCAL_MACHINE\
SOFTWARE\
Microsoft\
MSSQLServer\
server_name
If no ListenOn multistring value has been entered at the specified registration key or if server_name is NULL, Open Data Services then looks in the registration key:
HKEY_LOCAL_MACHINE\
SOFTWARE\
Microsoft\
MSSQLServer\
Server
If this key also has no ListenOn value, then by default, Open Data Services loads the server Named Pipes Net-Library DLL (Ssnmpntw.dll) that only uses the default named pipe \\.\Pipe\Sql\Query.
The following example shows connection string data that might appear for a Windows NT ListenOn multistring value:
SSNMPN60,\\.\PIPE\SQL\APPNAME
SSMSSO60,1433
The first connection string is an instruction to load the server Named Pipes Net-Library (Ssnmpn60.dll) with the pipe name \Pipe\Sql\Appname. The second connection string is an instruction to load the server TCP/IP Sockets Net-Library (Ssmsso60.dll) with the TCP/IP port number 1433. You can use the Windows NT - based program regedt32 to view and edit the entries in the Windows NT Registry.
A pointer to a SRV_SERVER structure. If the server cannot be initialized, returns NULL.
The initialization process consists primarily of allocating the necessary data structures for the server and initializing the server state.
To use values other than the defaults, use the srv_config function before calling srv_init.
A server must be initialized before being started with srv_run.
srv_config | srv_run |
srv_config_alloc |