首页 > Linux操作系统 > Linux操作系统 > Default Database in SQL SERVER 2005

Default Database in SQL SERVER 2005

原创 Linux操作系统 作者:italucia 时间:2009-05-20 20:23:41 0 删除 编辑

This morning when I open SSMS, it turns out the error saying that could not connect to the server.

It's strange since yesterday it worked fine, and i just remember that the only modification is my colleage had taken one of the databases OFFLINE.

Finally i understand that the database he took offline is the default database, and in this case, the server is not accessible any more.  The solution is trying to change the default database to master on this server, using the following cmd.


C:\> sqlcmd -E -d master

1> ALTER LOGIN [BUILTIN\Administrators] WITH

2> GO

Then it works perfectly. :)



来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。



  • 博文量
  • 访问量