Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 Need to restart server

Author  Topic 

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 12:00:17
Hello, I am developing an application using SQL Server 2008 Express and C# Express. Everything works fine until I use the Management Studio to work with the database (queries, etc). After using the Management Studio for any reason, I need to restart SQL Server even though the indication is that it is already started. I've worked with full versions of SQL Server and C# and have not encountered this problem. Thank you for the help!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-22 : 12:40:43
Your issue is not clear. What condition happens that makes you think that the server needs to be restarted?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 13:03:11
Sorry about the lack of details... the application works - it connects to the database - during testing. If I use the Management Studio for any reason, I need to restart SQLEXPRESS or else the application indicates it cannot connect to the database. When I use the Configuration Manager to restart SQLEXPRESS, it indicates it is already started. I re-start it, and everything is fine again. Thank You for the help.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-22 : 13:11:19
That is very bizarre.

Could you duplicate the issue and post the exact error that the application is receiving? Also see if there are any messages in the SQL Server Error Log as well as Application Log in Event Viewer.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 13:44:39
The error received in C# Express, when the application attempts to connect with the database is:
"Cannot open user default database. Login failed. Login failed for user "sysadmin121\sysadmin62".

There is nothing in the SQL Server Express error log.

All connections appear correct. Again, when I restart SQLEXPRESS, all is well... Thank You!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-22 : 13:48:07
Can you reset the default database to master for that account? And then try the steps to reproduce it?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 13:52:48
not sure how to reset the default... I'm working on it... Thanks!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-22 : 14:05:21
You just double-click on the account in Logins in SSMS and then the default database is at the bottom of that screen that opens up.

You can also use sp_defaultdb or ALTER LOGIN, but the GUI is so easy for this.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 14:13:04
It was already set to Master, so I set it to the application's database I created. I had to restart SQLEXPRESS, this time it made no difference... the application failed. I reset the default to Master, and again had to restart SQLEXPRESS, before the application executed without error..Thanks!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-22 : 14:25:05
You've got something very wacky happening. I'd highly recommend opening a case with Microsoft regarding your issue. It isn't free though.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

frpsqlserve
Starting Member

6 Posts

Posted - 2010-09-22 : 14:28:42
Very wacky is the truth .... I'll be working away to solve it though... Thank You very much for the help!
Go to Top of Page
   

- Advertisement -