Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_OACreate and authentication

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Here it is:

1. A scheduled job that starts a stored procedure
2. The stored procedure instantiates an ActiveX object (a DLL created in VB6). The stored procedure uses sp_OACreate and all that stuff.
3. The component has to connect back to the SQL server (ADODB.Connection). This loop may seem odd somehow, but this is it.
The connection string contains a blank user name, which should make SQL server use Windows NT Authentication. It seems it does, because the error I'm getting when I try to open the connection is "-2147217843-Login failed for user 'Administrator'" (I'm logging the error from the component).

The system:
-Windows 2000 Server, MS SQL Server 7.0, SP2.
-Security mode of the SQL server is Mixed (Windows NT Authentication and SQL Server Authentication).
-The SQL Server and SQLServerAgent run under a domain account (Administrator), not under "System Account".

So, basically my problem is how can I connect this component to the SQL server without providing a user-name and a password, in any form (user-interface or Registry). It should have all it needs since it runs in SQLServerAgent's context, but I don't know how to make the connection. I don't want to use Application Roles, sp_setapprole and so on, because this way requires a password to be stored somewhere.



Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top