Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Restore Collation Change
Using SQL Server 2005.

When I restore a database it changes the collation setting for the new
database.  I am simply backing up and restoring the DB with a new name to
the same server for comparison purposes.

The new database has the collation of the server.

Is there a way to restore and preserve the collation setting?





Report this thread to moderator Post Follow-up to this message
Old Post
Joe L
12-28-05 02:23 PM


Re: Restore Collation Change
That should not happen, it should be impossible. How do you determine the co
llation of the restored
database? Below scrip show that a restored database will keep the collation:

CREATE DATABASE x COLLATE Albanian_BIN
GO
SELECT name, collation_name from sys.databases where name = 'x'

BACKUP DATABASE x TO DISK = 'C:\x.bak' WITH INIT
GO
RESTORE FILELISTONLY FROM DISK = 'c:\x.bak' WITH FILE = 1
GO
RESTORE DATABASE y FROM DISK = 'C:\x.bak'
WITH
MOVE 'x' TO 'c:\x.mdf'
,MOVE 'x_log' TO 'c:\x.ldf'
GO
SELECT name, collation_name from sys.databases where name IN('x', 'y')


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/


"Joe L" <jjj@lll.com> wrote in message news:ueRjgD8CGHA.4004@tk2msftngp13.phx.gbl...
> Using SQL Server 2005.
>
> When I restore a database it changes the collation setting for the new dat
abase.  I am simply
> backing up and restoring the DB with a new name to the same server for com
parison purposes.
>
> The new database has the collation of the server.
>
> Is there a way to restore and preserve the collation setting?
>
>
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Tibor Karaszi
12-28-05 06:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:01 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006