September 10, 2008 at 12:09 pm
I need to change in a user database, the logn for the user DBO.
The requirement is to remove the actual SQL login for the NT Authority\Network Service login.
Is there a way to accomplish this?
Your help is very appreciate in this matter
September 10, 2008 at 12:16 pm
USE Databasename
GO
Exec sp_changedbowner 'new login name'
September 10, 2008 at 12:16 pm
e.g.
This one will map sqlaccount sa to the dbo user of your db.
Check BOL
exec sp_changedbowner 'sa', true
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
September 10, 2008 at 2:30 pm
Thanks for the reply I've already use those options, probably I didn't explain myself correctly, I need to have the DBO name and the login 'NT AUTHORITY\NETWORK SERVICE' I have read smoe post where they say this can't be done, but I already checked some DB that shows exactly that. :crazy:
SO it is possible but how can you do that to show in the NAME column DBO and the Login of the DB 'NT AUTHORITY\NETWOK SERVICE'?
Thanks for the help
September 10, 2008 at 3:01 pm
Emilio.Mendoza (9/10/2008)
Thanks for the reply I've already use those options, probably I didn't explain myself correctly, I need to have the DBO name and the login 'NT AUTHORITY\NETWORK SERVICE' I have read smoe post where they say this can't be done, but I already checked some DB that shows exactly that. :crazy:SO it is possible but how can you do that to show in the NAME column DBO and the Login of the DB 'NT AUTHORITY\NETWOK SERVICE'?
I tried the sp_changedbowner
Also sp_change_users_login
Thanks for the help
September 11, 2008 at 1:53 am
Emilio.Mendoza (9/10/2008)
Thanks for the reply I've already use those options, probably I didn't explain myself correctly, I need to have the DBO name and the login 'NT AUTHORITY\NETWORK SERVICE' I have read smoe post where they say this can't be done, but I already checked some DB that shows exactly that. :crazy:SO it is possible but how can you do that to show in the NAME column DBO and the Login of the DB 'NT AUTHORITY\NETWOK SERVICE'?
Thanks for the help
I don't think so.
What's the actual need to have specifically 'NT AUTHORITY\NETWOK SERVICE' ? (no one can log in as 'NT AUTHORITY\NETWOK SERVICE')
What would be the advantage ?
Why wouldn't 'sa' accomplish that ?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 8, 2008 at 9:49 am
Well It is the client requirements since is for Sharepoint site or something like that and since they have it in that way in the other DB, is just the way they want it! :unsure: I already set it up with another user they have for test since the purpose was to use this login to remove the old login which was for a person who already left the company, so for 'security' reasons they want to have that login in that user...
but I just want to know how they did in the other databases? :ermm:
March 10, 2009 at 2:21 pm
I am attempting to change a dbo login name and can't figure out how. Let me explain a little so you get what I am looking for.
This dbo login name is: ;test
I need to edit it to be: test
The reason for this is that I don't want to change the password on this login name, I just want to edit the username. It is basically because when we disable a user, our disable script or something like that changes it to ';username' from 'username'. Now I need to enable this login by simply renaming the login, but I don't know how to do it. Any suggestions?
Thanks in advance,
Vinny
Bite off more than you can chew. THEN CHEW IT!
March 10, 2009 at 2:38 pm
vgullotta (3/10/2009)
I am attempting to change a dbo login name and can't figure out how. Let me explain a little so you get what I am looking for.This dbo login name is: ;test
I need to edit it to be: test
The reason for this is that I don't want to change the password on this login name, I just want to edit the username. It is basically because when we disable a user, our disable script or something like that changes it to ';username' from 'username'. Now I need to enable this login by simply renaming the login, but I don't know how to do it. Any suggestions?
Thanks in advance,
If it's 2000, you'll need to delete and recreate. You can use sp_revlogin to dump the login with the encrypted password and SID and then modify the EXEC sp_addlogin to use the correct name.
How to transfer logins and passwords between instances of SQL Server
K. Brian Kelley
@kbriankelley
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply