March 6, 2009 at 10:31 am
I run scripts in Query Analyzer for our consultant. The instructions say to make sure to login as SA. My logon to SQL is a system admin but I guess that is not enough to run the script. How do I logon as the SA on the db to run the scripts on the db?
I'm sure this is a simple thing.
Thanks so much in advance.
March 6, 2009 at 10:41 am
Actually SA is a SysAdmin account created at the time of installing SQL Server. Do you know the password for that user SA? If so, Open SSMS (In SQL 2005) or Query Analyzer (SQL 2000) Change the Authentication method from Windows Authentication to SQL Authentication. Enter SA as the user and the password of SA and connect. Once connected, the rest you can do it as you were doing before.
Even though you are a SysAdmin in Windows Domain, you might not have sys admin privileges in SQL Server DB. This happens when BUILDIN/Administrator group has been dropped from the SQL Server.
I hope this helped you.
-Roy
March 6, 2009 at 10:42 am
Hi
What is that script that is asking for SA log in to run, 😉
March 6, 2009 at 11:01 am
Thanks Roy, I have SQL 2000. Good info! I have QA already opened then I clicked on file then "connect" then entered in the SA logon id and password. Then I had to make sure that I selected SA from the object browser drop down instead of my network logon and of course make sure I'm in the correct db. Hope that was how to do it.
Crazyman, it is a script to fix an error in our accounting db. The script will not commit changes, it just creates a test for the fix. If the script can run, we will be able to see what the changes look like before we commit them. I do understand very much that things should not normally be run using the sa logon, but I don't write the scripts, I just run them! 🙂
March 6, 2009 at 11:13 am
Yes Kash... Thats what you had to do...
I hope things work out with the issues.
-Roy
March 6, 2009 at 11:29 am
Thanks Roy, there seems to be a problem with the script as it says it cannot continue due to not having a valid account to the db. Strange because the instructions say to log on as the sa... Well for now, it's going back to the script writer for further instructions. I'm glad at least the problem is not on my side. 🙂
March 6, 2009 at 11:41 am
That is strange...If you are able to connect with SA, that means that the account exists. So this must be some other issue....
-Roy
March 9, 2009 at 11:14 am
Sounds to me like the test script is trying to alter some other account's login / permissions information. That might be why it needed SA access. Of course, the account in question isn't on your DB (or the script writer forgot to throw a USE <Database> statement in the script).
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply