Hi, I have a data base with owner = dbo and login as 'Test', i need to change the login name as 'sa' instead of 'Test' ...can anyone help ?? Thanks
Only one name of SA can exists and if you want to change database owner to SA then you can use SP_CHANGEDBOWNER. If you want to rename a login then drop and recreate a fresh one.
Hi, Let me explain th eissue once again, I have an old data base, when restore the same, if we goes to the users, it is showing Name = dbo, Login Name = 'Test' and database access= 'Permit'. However the application is connecting through the login 'sa', [i dont know where it is configured in the application, i do not have access to that] so i need to change this login name as 'sa' instead of 'Test'. it should be like Name = dbo, Login name = sa and database access = 'permiot'. Is it possible ? Thanks
'sa' is a SQL Server login that exists in all instances of SQL Server. It has system administrator permissions on all databases, so it is essential that it is used with caution. If you have an application that uses 'sa' to connect to a database, then I would say that this application was created without any understanding of security concepts.
You should be able to login as 'sa' and do everything that a member of the db_owner database role can do. When logging on with 'Test', make sure that when you create a new object, that you always spell out 'dbo' as the owner: CREATE TABLE dbo.table ....
Can you try with sp_changedbowner system SP? Only limitation for this SP is, this can not be used for 'System Databases' Regards -Johnson