special life
special life

Reputation: 225

how to change the account asscoiated with sql server

i have a problem with my sql server 2008 i couldnt connect to any sql server instance after changing the user name over domain.

so i have a domain user it was a local account from my domain account like: (My domain Account\localAccount)

so this was the account i was using to connect to the sql server instance

then my company decide to remove the local account from my computer and ask me to use the domain account itself so it will be as :My domain Account

so when i log in with the My domain Account i couldn't connect to any sql server instance so how to change the server account to access my databases

please i searched a lot and i didn't find useful solution

Upvotes: 1

Views: 379

Answers (1)

Greenstone Walker
Greenstone Walker

Reputation: 1150

I'm not sure I understand the question correctly. You previously logged in to Windows as one account and connected to SQL Server but now you are logging in to Windows as another account that does not have rights to connect to SQL Server? Is that correct?

If this is the case then you will have to log in to Windows as the old account then connect to SQL Server then create a trusted login for the new account with the appropriate server roles (I'm guessing sysadmin).

In SQL Server Management Studio, in the Object Explorer pane, navigate to Security then Logins. Double-click on the login for the old account, click on the Server Roles tab, make a note of which roles are ticked. Right-click on Logins, choose New Login. Enter the full login name of the new account (DOMAIN\Username, for example ADVENTUREWORKS\Student). On the Server Roles tab select the appropriate server roles.

Upvotes: 1

Related Questions