Solved

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

Posted on 2011-02-12
8
120 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

760 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

23 Experts available now in Live!

Get 1:1 Help Now