Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

How do I change the default log on user name for MS SQL Server 2008 in Windows7?

I'm trying to log on my school SQL Server from home using a bat file which starts my MS SQL Server Management Studio that displays the Connect to Server dialog box. The Server type is Analysis Services and the Authentication is Windows Authentication.The problem is the user name displayed is incorrect but, the field is inactive so, I can't change it. I used the following run command rundll32.exe keymgr.dll, KRShowKeyMgr to add a new log on credential but the same user name was displayed when I ran the bat file to start MS SQL Server Management Studio again. I then went into the credential manager to verify the new user name was there and it was. How do I change the default user name for MS SQL Server 2008 in Windows7?
0
Barbara69
Asked:
Barbara69
  • 7
  • 3
1 Solution
 
QlemoC++ DeveloperCommented:
"Windows Authentication" means that the current logged in user is transmitted to MSSQL. If you could fake that, all security would be void. To be able to provide a different user than the Windows user, you need to
allow for SQL Authentication on MSSQL Server
create an SQL user in MSSQL
allow that user access to a particular or all databases
use that SQL User and password with the authentication
0
 
jorge_torizResearch & Development ManagerCommented:
Qlemo, it is important to note that SQL Server Analysis Services do not accept SQL Authentication, only Windows Authentication.

Use the class attached to impersonate the user you want and then run your batch.
ImpersonationUtility.txt
0
 
QlemoC++ DeveloperCommented:
Good to know that.
Since this should run in a batch file, I think a "impersonate" using the  runas   command is more appropriate. It will ask for the password, then start Mgmt Studio.
runas /user:XYZ "%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

Open in new window

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Barbara69Author Commented:
I just wanted to let you know I'm having problems with my laptop which is where I'm trying to correct this issue so, I'm unable to try your solution.
0
 
Barbara69Author Commented:
I had to wind up reinstalling Windows 7 but, now when I try to reinstall Server 2008 it wants to install Windows. Do you know why and what to do?
0
 
QlemoC++ DeveloperCommented:
What do you mean with "wants to install Windows"?
0
 
Barbara69Author Commented:
Shortly after I click on the install now button, I get a screen that has as a default to custom install windows with no other option available.
0
 
Barbara69Author Commented:
I ran program compatibility and it returned that the server was made for windows xp sp2 so, I ran the program from the compatibility window but eventually still got the screen about custom installing windows.
0
 
Barbara69Author Commented:
I just tried installing Server 2008 again but, this time on my computer that has Windows XP SP3. The attachment is a print screen of what I was referring to during the installation process asking  which type of installation do I want and custom is the only option to select.

Doc1.docx
0
 
Barbara69Author Commented:
Thanks for your assistance. Installed the develop version.
0
 
Barbara69Author Commented:
Found solution on my own. Was unable to try recommended solution because I couldn't get the software installed.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now