Problem solve Get help with specific problems with your technologies, process and projects.

Convert owner field as loginAdmin

I have created a database in MS SQL Server 2000 and set the log in for the database before creating any table in it. In Query Analyzer, I log in by giving a username and password, and use the create table syntax for creating the table. The table is created successfully.

Table Name: Table1
Login Name: LoginAdmin

In Enterprise Manager, it is showing the owner field for the table as the LoginAdmin. These are all right. But when I created another table through Enterprise Manager directly under the same database, it is taking the owner field as DBO in all tables that are created using Enterprise Manager. If I want to convert the owner field as the loginAdmin what should I do?

In Query Analyzer, select the database you wish to work with and then use the stored procedure "sp_changeobjectowner." You'll have to supply that stored procedure with the name of the table and the name of the new owner.

Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on SQL Server Security

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.