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!

Setting default db something other than master

Status
Not open for further replies.

pwills

Technical User
Sep 14, 2002
54
GB
Crumbs, I've been all through BOL and cannot find how to do this probably-very-obvious thing.

I keep messing up because Qry Anlysr keeps setting the db to master every time I open a blank Query window. Also DTS Export offers &quot;<default>&quot; as an option but I don;t know how to make that mydb.
 
You can do it this way:

sp_defaultdb [ @loginame = ] 'login' ,
[ @defdb = ] 'database'


or you can set it up within Enterprise Manager. On the user under security you right click and bring up properties. Then you just change the database under the &quot;General Tab&quot; at the bottom.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top