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.
| Author |
Topic |
|
Jonno
Starting Member
3 Posts |
Posted - 2011-01-12 : 05:35:48
|
| Hey All,I've recently been developing a Database for an ERP type system at work on my local machine.During the weekend our server was replaced and my user name was changed now i get the error: "The Database is not accessible (Object Explorer)". I'm just wondering if this is the reason? if it is can someone offer me advice as to how i can change this? will i create a user on the server to match my old username? or is there a way to change user permission in management studio? i tried the security-->Logins properties-->user mapping but i wasn't able to do it there?Any thoughts comments appreciated.Regards,Jonno. |
|
|
Sachin.Nand
2937 Posts |
Posted - 2011-01-12 : 06:04:19
|
| What does this show select DATABASEPROPERTYEX('yourdatabasename','status')?If it shows ONLINE thenlooks like there is an orphaned user.PBUH |
 |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-01-12 : 06:51:45
|
| Seems that access to the Database is user specific... and your new user name might not have sufficient rights to access the Database. Try to access the Database with the SQL Authenticated login e.g. SA and check the currently assigned rights to your new UserName. If required assign sufficient rights and then try to access the database~! Cheers! MIK |
 |
|
|
Jonno
Starting Member
3 Posts |
Posted - 2011-01-12 : 08:44:01
|
| Hi guys,thanks for the replies,I checked the property and the Database is Online, not sure what an orphaned user is though?I am unable to log in as 'sa' from what i can see its disabled also i cannot remember the password, i googled resetting the sa password but the tips i got didn't seem to work for me.I've tried creating new users/changing server roles but i dont have permission to do this.Any thoughts?Regards,Jonno |
 |
|
|
Jonno
Starting Member
3 Posts |
Posted - 2011-01-12 : 10:22:52
|
| Hey,I got it sorted, I re-started SQL in single user mode and changed the server roles of my new username to sysadmin, then removed the single user mode and hey-presto I'm able to see my data base again...sweet!.Thanks,Jonno |
 |
|
|
|
|
|
|
|