We went through the following steps (change italics to your own names):
- Server Management Console
- Advanced Management
- Computer Management
- Services and Applications
- Microsoft SQL Servers (local) (Windows NT)
- Databases
- Right click: New Database
- Name: mynewdb
- Leave the defaults
- Down to: Security
- Logins
- Right click: New Login
- Name: newdbuser
- SQL Server Authentication with password: dbpassword01
- Database: mynewdb
- No Server Roles
- Database Access Tab: check mynewdb
- Check: db_owner
- OK
Next step, at the SBS server from the command line we test connectivity to the database:
osql -U newdbuser -P dbpassword01 -d mynewdb
Here is the result of that osql command:
Login failed for user 'newdbuser'. Reason: Not associated with a trusted SQL Server connection.A search of the Microsoft KB turned up the following articles:
Microsoft KB 889615: You may receive a "Not associated with a trusted SQL Server connection" error message when you try to connect to SQL Server 2000 or SQL Server 2005.
and
Microsoft KB 555332: Login failed for user 'username'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452).
The second article contains the solution:
Switch the authentication mode to SQL Server and Windows:
Note that the change requires a restart of the SQL Server services. If there are any client databases online at the time, either everyone needs to shutdown their access, or we need to wait until later on when no connections to any databases on the server are happening.
Also note that we did not receive any indication as to why the database was not accepting connections via the SQL Enterprise Manager on another workstation. It just refused to connect which is why we went to the osql commands directly on the server.
Some links:
When looking for the commands we needed on the command line, it was a bit of a trial at first. We finally came up with: MSDN Forums - Command Line connect to SQL Server Database.
That in turn led us to:
The osql Utility and its commands on MSDN.
Lots of database fun on this one! :D
Philip Elder
MPECS Inc.
Microsoft Small Business Specialists
No comments:
Post a Comment