Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alter a database collate

Status
Not open for further replies.

shanghai2004

Programmer
Dec 16, 2004
37
CA
Hi Expert,

My SQL server default collation is Latin1_General_CS_AS. Now I need to change a database collation to Lantin1_General_CS_AS.
I execute the following SQL statements:

ALTER DATABASE TESTDB collate Latin1_General_CI_AS

I got error message:
Server: Msg 5030, level 16, state 2, Line 1
The database could not be exclusively locked to perform the opration.
Server: Msg 5072, level 16, state 1, Line 1
Alter Database failed. The default collation of database 'TESTDB' cannot be set to Latin1_General_CI_AS

I am the only person using this server and accessing the database 'TESTDB' at that time. Why did I get the error message? Do I need to start SQL server in a single user mode? Help please.

Thanks
 
You shouldn't need to start the database in single user mode. Make sure that you are in the master database when you execute the command.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top