Solved

How do I tell what the collation is of a SQL Database from ONLY the .bak file

Posted on 2011-02-12
8
123 Views
Last Modified: 2016-05-29
I need to rebuild my SQL server from scratch.  I have a backup of the database but that is all.  Thoughts?
0
Comment
Question by:bdfirm
8 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 334 total points
ID: 34879905
That is all you need. Just install MSSQL again, then perform a
   restore filelistonly from disk='Complete Path and File Name of .BAK';
to see which datafiles where included (e.g. log and data could have been in different locations), and then
   restore database NewDBName from disk='Path and file as above' with move 'LogicalFile1' to 'NewFileName1', 'LogicalFile2' to 'NewFileName2', ...
The "LogicalFileN" are those retrieved by the restore filelistonly.
If you are certain you have the same folder structure as with the original database available, you can omit the complete with clause.
0
 

Author Comment

by:bdfirm
ID: 34879940
When I install SQL 2005 I'm asked for a collation.  Shouldn't it match the collation of the .bak file?  I was wondering if I could find out the collation of the .bak BEFORE installing SQL.  
0
 
LVL 13

Assisted Solution

by:geek_vj
geek_vj earned 166 total points
ID: 34880001
>>When I install SQL 2005 I'm asked for a collation.  Shouldn't it match the collation of the .bak file?  I was wondering if I could find out the collation of the .bak BEFORE installing SQL.  

Unfortunately, there is no way to find out the collation of the server/database from .bak file. So the best way is to install SQL Server with the default collation first and restore the database. Post which, you can check the collation of the database that was restored. If the collation is not matching, then you can always change the server collation at a later point.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 15

Expert Comment

by:Aaron Shilo
ID: 34881640
hi THIS IS A QUESTION TO geek_vj

How Do You " change the server collation at a later point"
0
 

Expert Comment

by:EE_AutoDeleter
ID: 41623081
I've requested that this question be deleted for the following reason:

                           
No comment has been added to this question in more than 21 days, so it is now classified as abandoned and is now flagged for deletion.


If there is a valid solution, please OBJECT and indicate the comments that are, or would otherwise lead to, a solution.


Use the specific format https:#axxxxxxxx for comment ID(s).


Also, please don't object simply because the author did not respond to your comment. While we understand this is frustrating, unfortunately we cannot force the author to return to the question. Unless you feel you have presented a valid, verifiable solution we'll simply delete the question.


Experts-Exchange Auto Deleter
0
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 334 total points
ID: 41623079
The answer given in http:#a34879905 is correct.
One info is missing though: The DB collation does not need to match the server collation. The latter is used for anything regarding the server itself, that is database and login names, system object names (tables and views), aso. A case-sensitive collation requires you to write the database name with exact case hence.
However, the names and data used in tables inside of user databases are subject to the DB collation.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 41623082
Objection: https:#a34879905 and the new comment https:#a41623079 should be accepted.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now