home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbrpwset
- ______________________________________________________________________
-
- NAME: dbrpwset
-
- FUNCTION:
- Add a remote password to the LOGINREC structure.
-
- SYNTAX:
- RETCODE dbrpwset(loginrec, srvname, password, pwlen)
-
- LOGINREC *loginrec;
- char *srvname;
- char *password;
- int pwlen;
-
-
-
-
-
-
-
- dbrpwset Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o A Transact-SQL command batch or stored procedure running on one
- SQL Server may call a stored procedure located on another
- SQL Server. To accomplish this server-to-server communication,
- the first SQL Server, connected to the application through dbo-
- pen(), actually logs into the second, remote SQL Server, and
- performs a remote procedure call.
- dbrpwset() allows the application to specify the password to be
- used when the first SQL Server attempts to call the stored pro-
- cedure on the remote SQL Server. Multiple passwords may be
- specified, one for each SQL Server that the first SQL Server
- might need to log into.
-
- o If the application has not specified a remote password for a
- particular SQL Server, the password defaults to the one set
- with DBSETLPWD() (or a null value, if DBSETLPWD() has not been
-
-
- 3 Version 4.0 -- 5/1/89 dbrpwset
- ______________________________________________________________________
- called). This behavior may be fine if the application's user
- has the same password on multiple SQL Servers.
-
- o dbrpwclr() clears all remote passwords from the LOGINREC.
-
- PARAMETERS:
- loginrec - A pointer to a LOGINREC structure. This pointer will
- serve as an argument to dbopen(). You can get one by calling
- dblogin().
- srvname - The name of a server. A server's name is stored in
- the srvname column of its sysservers system table. When the
- first server calls a stored procedure located on the server
- designated by srvname, it will use the specified password to
- log in. If srvname is NULL, the specified password will be
- considered a "universal" password, to be used with any server
- that does not have a password explicitly specified for it.
- password - The password which the first SQL Server will use to
- log into the specified SQL Server.
-
-
- dbrpwset Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- pwlen - The length of the password in bytes.
-
- RETURNS:
- SUCCEED or FAIL. This routine may fail if the addition of the
- specified password would overflow the LOGINREC's remote password
- buffer. (The remote password buffer is 255 bytes long. Each
- password's entry in the buffer consists of the password itself,
- the associated server name, and two extra bytes.)
-
- SEE ALSO:
- dblogin, dbopen, dbrpwclr, DBSETLAPP, DBSETLHOST, DBSETLPWD,
- DBSETLUSER
-
-
-
-
-
-
-
-