Digital Spy

Search Digital Spy
 

DS Forums

 
 

SQL .bak file problem


Reply
Thread Tools Search this Thread
Old 26-01-2013, 21:08
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638

Hi

I am doing some private work for a client who sent me a .bak file which is a backup file from an sql database.

I have sql server management studio installed which when I am connected to my office automatically connects to a datawarehouse over a network.

I have the .bak file stored locally and dont think I have sql server management studio connected to a localhost.

I am struggling in opening this file and I need to eventually get the data into excel.

I am a novice using SQL and can do basic queries.

Please can someone help me with advising me on how I do restore the backup ito sql server management studio?

Thank you.
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Please sign in or register to remove this advertisement.
Old 26-01-2013, 21:53
Stig
Forum Member
 
Join Date: Sep 2003
Location: Sandy Heath, Beds, UK
Posts: 7,083
You restore the bak file into the default instance in Management Studio.

I don't know much more about SQL than you do, but I know how to use Google!
Stig is online now   Reply With Quote
Old 26-01-2013, 22:35
whoever,hey
Forum Member
 
Join Date: Mar 2006
Posts: 29,966
Why would you restore SQL into a spreadsheet?
whoever,hey is offline   Reply With Quote
Old 26-01-2013, 22:38
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
Why would you restore SQL into a spreadsheet?
no, i would like the output from the restored database to be in excel once it has opened in sql, i can pull the data and then extract to excel.

Also, I have just intalled sql server 2005 express onto my other laptop and all I can see is configuration tools and not the programme to open up and connect to a database.

Any ideas?
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 22:46
IvanIV
Forum Member
 
Join Date: May 2006
Posts: 21,355
You open SQL Management studio, connect to an instance of an SQL Server.Then one of the tasks you can perform is Restore a database, use a name that does not exist yet. You will need a version of the server at least the same or newer as is the backed up database.
IvanIV is offline   Reply With Quote
Old 26-01-2013, 22:49
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
You open SQL Management studio, connect to an instance of an SQL Server.Then one of the tasks you can perform is Restore a database, use a name that does not exist yet. You will need a version of the server at least the same or newer as is the backed up database.
Thanks for the info. The problem I have is i cant connect to an instance on my work sql server. How do I do this on express 2005 on my home laptop?
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 22:58
IvanIV
Forum Member
 
Join Date: May 2006
Posts: 21,355
Thanks for the info. The problem I have is i cant connect to an instance on my work sql server. How do I do this on express 2005 on my home laptop?
Do you have this?

http://www.microsoft.com/en-US/downl...s.aspx?id=8961

It looks like it comes separately for SQL express edition. When you start it you connect to database engine and then you can manage the server.

You should be able to connect with your work server as well if you know the server (and instance) name, administrator login and password. Then the backup file must be stored locally on the server where you want to restore it.
IvanIV is offline   Reply With Quote
Old 26-01-2013, 23:18
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
Do you have this?

http://www.microsoft.com/en-US/downl...s.aspx?id=8961

It looks like it comes separately for SQL express edition. When you start it you connect to database engine and then you can manage the server.

You should be able to connect with your work server as well if you know the server (and instance) name, administrator login and password. Then the backup file must be stored locally on the server where you want to restore it.
This is one i downloaded

http://www.microsoft.com/en-us/downl....aspx?id=21844 the 53mb one. I will d/load the one you suggest and uninstall my one.

The one on my work laptop I dont have the laptop admin username/password as its locked down by the IT dept.
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 23:23
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
This is one i downloaded

http://www.microsoft.com/en-us/downl....aspx?id=21844 the 53mb one. I will d/load the one you suggest and uninstall my one.

The one on my work laptop I dont have the laptop admin username/password as its locked down by the IT dept.
The download link you posted is for the actual database engine itself.

Ivan's link is for the tools to allow you to manage the engine - ie. to backup and restore, create databases and run queries. You need both so don't uninstall your download
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:26
IvanIV
Forum Member
 
Join Date: May 2006
Posts: 21,355
^^^ Yes, you need both.
IvanIV is offline   Reply With Quote
Old 26-01-2013, 23:29
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
I was going to suggest you download SSMS 2012... but its a monster 600MBs, compared to SSMS 2005's 40MB. Intellisense must need a lot of coding!
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:34
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
The download link you posted is for the actual database engine itself.

Ivan's link is for the tools to allow you to manage the engine - ie. to backup and restore, create databases and run queries. You need both so don't uninstall your download
Thankyou both. I will install the 2nd one also. So hopefully then i can just restore the file.
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 23:37
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
As long as the bak file was created by a SQL 2005 or 2000 database
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:38
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
I am not sure. How will i know.
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 23:41
IvanIV
Forum Member
 
Join Date: May 2006
Posts: 21,355
I am not sure. How will i know.
It will tell you it cannot restore the file. Then you need to remove it all and install SQL 2008 R2 Express. I doubt they use 2012 already.
IvanIV is offline   Reply With Quote
Old 26-01-2013, 23:42
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
It will throw some sort of 'invalid file/media' type error message if you try to restore a bak file from a newer version of SQL Server onto an older version... they're not backwards compatible.
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:44
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
It will tell you it cannot restore the file. Then you need to remove it all and install SQL 2008 R2 Express. I doubt they use 2012 already.

Thankyou for all the help here chaps.
Does the 2008 r2 version contain both downloads and i assume its free?
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 26-01-2013, 23:44
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
It will tell you it cannot restore the file. Then you need to remove it all and install SQL 2008 R2 Express. I doubt they use 2012 already.

Might be easier to just install 2012 though just in case... Even a 2000 bak file will restore onto that...
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:46
irishguy
Forum Member
 
Join Date: Jan 2009
Posts: 20,382
Thankyou for all the help here chaps.
Does the 2008 r2 version contain both downloads and i assume its free?
Heres a link to the 2012 download... all free.

But try to restore it to your 2005 first... you may as well try it now you've got it installed.

http://www.microsoft.com/en-us/downl....aspx?id=29062
irishguy is offline   Reply With Quote
Old 26-01-2013, 23:46
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
Might be easier to just install 2012 though just in case... Even a 2000 bak file will restore onto that...

Thanks. Do you have a link to the file that will install everything i need?
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 27-01-2013, 00:01
SnrDev
Forum Member
 
Join Date: May 2011
Posts: 3,012
Install SSMS, create a new DB on there with the same name as the DB in the .bak file, then restore that with overwrite mode on. If the bak is from a later version you have no option (you do but it's a lot of effort) so will have to install a newer version of SSMS.
SnrDev is offline   Reply With Quote
Old 27-01-2013, 08:21
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
i installed the xtra bit for 2005 and it didnt restore it. So I unstalled it and now going to try the 2008 version. I have xp service pack 3. I cant find the correct links to download similar to that i had for 2005.

Any links will be most helpful.
Thanks
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 27-01-2013, 08:34
c4rv
Forum Member
 
Join Date: Aug 2010
Location: Essex
Posts: 15,000
You won't be able to install 2012 on windows XP, it needs Vista or above.

you can download 2008 R2 express here,
http://www.microsoft.com/en-us/downl....aspx?id=30438

And management studio here,
http://www.microsoft.com/en-us/downl....aspx?id=22985
c4rv is offline   Reply With Quote
Old 27-01-2013, 08:35
LorenzoUK
Forum Member
 
Join Date: Mar 2007
Location: Manchester, UK
Posts: 638
You won't be able to install 2012 on windows XP, it needs Vista or above.

you can download 2008 R2 express here,
http://www.microsoft.com/en-us/downl....aspx?id=30438

And management studio here,
http://www.microsoft.com/en-us/downl....aspx?id=22985
Thank you. Do I need both of these?
LorenzoUK is offline Follow this poster on Twitter   Reply With Quote
Old 27-01-2013, 08:37
c4rv
Forum Member
 
Join Date: Aug 2010
Location: Essex
Posts: 15,000
Thank you. Do I need both of these?
yes, same as 2005 one is the engine the other is the management tools
c4rv is offline   Reply With Quote
 
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT. The time now is 12:17.