Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Creating database with .bak file

Author  Topic 

SarahLOR
Starting Member

18 Posts

Posted - 2010-03-22 : 07:47:01
Hi,

New to all this, hoping someone can help me!
I have a .bak file to create a database onto SQL Express, which I have just downloaded.
My question is, do I need to create a database and then run the restore command, or does it create the database for you?
Bit confused about the name to use when using command MOVE for the data and log files.

Thanks

Kristen
Test

22859 Posts

Posted - 2010-03-22 : 08:02:42
RESTORE is enough - if you use the "WITH REPLACE" command it will overwrite an existing database, or create one if it does not exist
Go to Top of Page

SarahLOR
Starting Member

18 Posts

Posted - 2010-03-22 : 09:09:45
I now get the following errors:

Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test_Attachment_Active_A.ndf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test_Attachment_Archive_A.ndf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test_Model_Core_Active_A.ndf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test_Core_Archive_A.ndf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 5118, Level 16, State 3, Line 1
The file "C:\work\databases\Test_1.ldf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-03-22 : 09:58:36
Look here, maybe it helps:
http://blogs.msdn.com/sqlblog/archive/2006/10/02/SQL-Server-databases-are-not-supported-on-compressed-volumes.aspx


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-03-22 : 10:24:44
Hmmm ... SarahLOR is the "c:\work\databases" folder compressed?

Given the number of files it looks to be a NON-trivial database - might be a SQL 2008 database created using Enterprise Version, and using the Database Compression option (any maybe other Enterprise-only options)
Go to Top of Page

SarahLOR
Starting Member

18 Posts

Posted - 2010-03-22 : 13:40:12
It was created on SQL server 2005 which I believe doesn't do compressed, so don't think it can be that.
Can the 2008 express edition use backups from 2005 enterprise?

Thanks
Go to Top of Page

RobertKaucher
Posting Yak Master

169 Posts

Posted - 2010-03-22 : 13:50:40
Is the actual folder compressed using NTFS compression? Perhaps some one compressed the backup at the file system level after?

===
http://www.ElementalSQL.com/
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-03-22 : 14:37:05
"Can the 2008 express edition use backups from 2005 enterprise?"

Yes, I think that should be OK.

That just leaves whether "c:\work\databases" folder is marked to use NTFS compression?
Go to Top of Page

SarahLOR
Starting Member

18 Posts

Posted - 2010-03-24 : 05:47:55
Thanks a lot for replies, the folder was marked to use NTFS compression, so I just unchecked that and I now have a database.

Cheers!
Go to Top of Page

deviji
Starting Member

7 Posts

Posted - 2010-07-27 : 07:33:35
Sarah,
you helped me really, i was having the same problem. and got resolved after seeing your post. Many thanks that you've updated once you got the solution.
-viji

Go to Top of Page
   

- Advertisement -