开发者

Protecting system databases in Sql Server Management Studio?

开发者 https://www.devze.com 2022-12-16 11:54 出处:网络
For the five hundredth time, I ran a sql script in management studio to add some tables to a database and FORGOT TO CHANGE THE DATABASE IT RUNS AGAINST.Since it defaults to master, I had to go and dro

For the five hundredth time, I ran a sql script in management studio to add some tables to a database and FORGOT TO CHANGE THE DATABASE IT RUNS AGAINST. Since it defaults to master, I had to go and drop all the new tables I just added.

I p开发者_运维知识库ractically never run sql scripts against the master database or other system databases, yet in Management Studio not only are they available in the combo box as a viable target for my scripts, but master is the default option.

Is there any way to remove system databases from this dropdown? Or, at least, change the default database from master???


The default database for your login to SQL Server is set to master. Change it to the database that you use most frequently.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号