Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Change the DBO login Expand / Collapse
Author
Message
Posted Wednesday, September 10, 2008 12:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 18, 2009 12:42 PM
Points: 8, Visits: 58
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
Post #567184
Posted Wednesday, September 10, 2008 12:16 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, April 11, 2014 2:04 PM
Points: 1,667, Visits: 1,377
USE Databasename
GO
Exec sp_changedbowner 'new login name'
Post #567189
Posted Wednesday, September 10, 2008 12:16 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:47 AM
Points: 7,005, Visits: 8,451
e.g.
This one will map sqlaccount sa to the dbo user of your db.
Check BOL

exec sp_changedbowner 'sa', true



Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- 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
Post #567190
Posted Wednesday, September 10, 2008 2:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 18, 2009 12:42 PM
Points: 8, Visits: 58
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.

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
Post #567305
Posted Wednesday, September 10, 2008 3:01 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 18, 2009 12:42 PM
Points: 8, Visits: 58
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.


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
Post #567322
Posted Thursday, September 11, 2008 1:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:47 AM
Points: 7,005, Visits: 8,451
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.

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


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- 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
Post #567527
Posted Wednesday, October 8, 2008 9:49 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 18, 2009 12:42 PM
Points: 8, Visits: 58
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! 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?
Post #582719
Posted Tuesday, March 10, 2009 2:21 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 10, 2009 2:51 PM
Points: 1, Visits: 1
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!
Post #672781
Posted Tuesday, March 10, 2009 2:38 PM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Monday, August 18, 2014 8:24 AM
Points: 6,634, Visits: 1,871
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, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #672797
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse