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
 General SQL Server Forums
 New to SQL Server Programming
 open connection problem

Author  Topic 

rfhurst
Starting Member

1 Post

Posted - 2008-07-31 : 11:41:03
I'm working on an application that utilizes a service process that must open and interact with a database within an SQL service instance.

After the sqlconnect() succeeds, the application attempts to open the connection which fails. I obtained the following debug statements:
Database: m_connectString=server=(local)\SQL_SERVER;database=WXCC;trusted_connection=yes
IsDatabaseAvailable: Connection Made, Opening Connection
IsDatabaseAvailable: Exception=Cannot open database requested in login 'WXCC'. Login fails.
Login failed for user 'NT AUTHORITY\SYSTEM'.
IsDatabaseAvailable: conn.Close().

I wrote a small application which exercises the same interfaces. It is able to open the connection and successfully issue a query.

The difference is the small application runs under my login, where the service process runs in background under SYSTEM login. I suspect some permission problems, but I'm unsure how to address them.

Any help would be greatly appreciated.
Thanks.
   

- Advertisement -