Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_OACreate and authentication

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-10-29 : 22:47:48
Andrei writes "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.



Many thanks."
   

- Advertisement -