Now I am in the need of adding tables and rework some of my excisting tables and stored procedures, but I am not able to do that with Enterprise Manager, due to the lack of default Database.
How do I correct this problem? I have gotten one tip of doing the following:EXEC sp_defaultdb 'User', 'DB' but I am not sure what to do with this....tried to run it from command line, and put my username and the DB I would set to default but nothing happend.
So I need more details,step-by-step guiding will work, as I don't know a hole lot about Enterprise Manager and SQL.
Btw, this is my error in Enterpr.Managr:
A connection could not be established to MyComputer\VSDOTNET2003
Reason: Cannot open default database. Login failed..
Please verify SQL server is running and check your SQL server registration prpoerties and try again
Pls tell me there is a way to fix this problem.This is because youruser account is set to use a specific default db which is missing.
Try using the SA account or other administrative account to login and change your personal user account to have a different default db.|||Thx, but need also step-by-step guiding on howto do this.
Pls help me here.
s|||Pls tell me in small steps at a time howto fix this.
My account is actually put up as an admin account in winxp. There is an ADMIN account i can log in with, but as I know, just in safemode.
What is the SA account in SQL server? How can I gain access to that account?
Do I use Enterprise Manager, or another tool or command line?
I am able to view the "startup" picture in Enter.Mangr. like I always could, however when trying to connect to MyComputer/VSDotNet2003 I ca't because of the deleted account.
How can I set new default account using Enterprise Manager? Is there any script I can use? What buttons do I use if it is possible to use E.M.?
As you all see, I am not really familiar with E.M., and therefor need very detailed information on howto fix this.
Pls in small steps.
s|||Logon to your computer as Administrator
Open Enterprise Manager
Expand until you can see the MyComputer/VSDotNet2003 node.
Expand that so you can see the "Security" folder.
Expand the folder so you can see the "Logins" node
Click "Logins", on the right you should see a list of permitted logins.
Right-click the login in question, and choose 'Properties'
On the "General" tab, choose a new default database from the list.
Cheers
Ken|||You mean like when I set a security setting for a newly created DB?
When I try to expand the MyComputer/VSDotNet2003 node, I run into the same problem. This action can't be performed due to lack of default DB, and I get the same error as mentioned before:
A connection could not be established to MyComputer\VSDOTNET2003
Reason: Cannot open default database. Login failed..
Please verify SQL server is running and check your SQL server registration prpoerties and try again
So how then can I set new default DB?
What does people think of this? Actually as I write this, I get a note that this works:
From MS Support (http://support.microsoft.com/default.aspx?scid=kb;en-us;307864&Product=sql):
If the user's default database no longer exists, or has been marked suspect, use the ISQL command line utility to change the user's default database to a database that is currently available for a connection.
1. At a command line prompt, type the following and then press ENTER: C:\>isql -E
2. At the isql prompt, type the following and then press ENTER: 1>sp_defaultdb 'user's_login', 'master'
3. At the second prompt, type the following and then press ENTER:2>go
Thx a lot to DarrelNorton for the respond, and all of you who took the time to helping a newbie.
Thx
slopee|||I'm glad you got the problem solved.
In the case of using Enteprise Manager, what I was suggesting is that you logon with a different user account (i.e. an another account that can access SQL Server), whose default database has *not* been deleted.
So, if you deleted the default database for User1, then logon as User2, and go into EM, and change the default database for User1. Then User1 should be able to login to SQL Server again.
Cheers
Ken
No comments:
Post a Comment