We help IT Professionals succeed at work.

SQL 2005 Database owner woes...

Medium Priority
934 Views
Last Modified: 2012-06-22
I recently had to install a copy of SQL 2005 Std.  They software company I had to install if for required a special collation so after speaking with Microsoft they gave me the following command line to install it:
Start /wait <optical drive letter>:\servers\setup.exe /qb INSTANCENAME=<instance name> ADDLOCAL=All PIDKEY=<Product ID without -> SAPWD=<StrongPassword> SQLACCOUNT="NT AUTHORITY\SYSTEM" AGTACCOUNT="NT AUTHORITY\SYSTEM" SQLBROWSERACCOUNT="NT AUTHORITY\SYSTEM" ASACCOUNT="NT AUTHORITY\SYSTEM" RSACCOUNT="NT AUTHORITY\SYSTEM" SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS

After doing this it made my account the DB_owner account. I am being told by the aoftware company I should have the SA account as the DB_Owner account. They gave me the following script to change the owner:
USE <iVantage database name>
EXEC sp_changedbowner 'sa'
GO

After running this script I get the following error message:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '<'.

I checked and found the server authentication is set to both SQL and windows.

ANy help would be greatly apperciated as I am a newbie to SQL 2005!
Comment
Watch Question

AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
u should replace the cotents incuded in the <> . for example if your database name is DBTest , the query should be like

USE DBTest
EXEC sp_ChangeDBOwner 'sa'

Author

Commented:
I did and it fails w/ sa in it.

Author

Commented:
Sorry I did cahnge the < > section to the actual database name and it failed.
Database Consultant
CERTIFIED EXPERT
Top Expert 2009
Commented:
did u removed the <>, u neerd to do it

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.