July 11, 2006 at 8:24 am
I would like to connect to a database using SQL Qry Analyser from the File, Connect menu in Sql Query Analyzer.
When I type in the "SQL Server: serverName" on the "Connect to SQL server" utility menu, the connection does not register OR it connects to the Master database.
Do I have to type in a database name as well? inorder to connect to a specific database.
i.e
serverName\DatabaseName?
Please help.
July 11, 2006 at 10:37 am
>>Do I have to type in a database name as well? inorder to connect to a specific database.
When you connect, you are automatically in the default database associated with your login on that particlaur SQL Instance
You can either:
- Change your login properties so that a database other than 'master' is your default (see sp_defaultdb )
- add 'USE DatabaseName' as the first command in whatever SQL you're running
July 12, 2006 at 7:09 am
Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply