更改SQL默认数据库 [英] Changing SQL Default Database
本文介绍了更改SQL默认数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用Query更改SQL默认数据库.
在此先感谢.
Hi,
How to Change SQL Default Database using Query..
Thanks in Advance.
推荐答案
exec sp_defaultdb @loginame='name', @defdb='dbname'
或者因为只有这两个参数,
Or since there are only those 2 parameters,
exec sp_defaultdb 'name', 'dbname'
获取有关以下内容的更多详细信息: sp_defaultdb [
Get more details about: sp_defaultdb[^]
请参阅以下内容:
http://stackoverflow.com/Questions/4857964/how-to-change-users-default-database-using-sql-for-sql-server-2000 [ http://stackoverflow.com/questions/362434/how-can-i-change-my-default-database-in-sql-server-without-using-ms-sql-server-m [ http://www.sql-server-performance.com/forum/threads /change-default-database.2747/ [
Refer these:
http://stackoverflow.com/questions/4857964/how-to-change-users-default-database-using-sql-for-sql-server-2000[^]
http://stackoverflow.com/questions/362434/how-can-i-change-my-default-database-in-sql-server-without-using-ms-sql-server-m[^]
http://www.sql-server-performance.com/forum/threads/change-default-database.2747/[^]
这篇关于更改SQL默认数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文