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
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Restoring .BAK to a different server 2010 version

Author  Topic 

forexbob
Starting Member

6 Posts

Posted - 2010-12-20 : 12:13:42
I've read many posts and did a lot of googling but I've come up empty. I'm trying to restore a .bak onto my local machine that I downloaded from a hosting company.

I did:

RESTORE FILELISTONLY
FROM DISK = 'C:\VealeDataBase.BAK'

and got the following information.

D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\VealeDataBase.mdf

D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\VealeDataBase_log.LDF

D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\VealeDataBase

Now I'm going to stop here for two reasons.
1. This looks nothing like what Arlene posted in a different thread.
2. I don't have a "Program Files" folder on my D: drive

Regardless I forged ahead to see what errors I would get for more troubleshooting info.

So I did this:

RESTORE DATABASE VealeDataBase
FROM DISK = 'C:\VealeDataBase.BAK'
WITH REPLACE, MOVE 'VealeDataBase' TO 'C:\Documents and Settings\Oolon\My Documents\Visual Studio 2010\Projects\TheVeales\App_Data\VealeDataBase_Data.MDF',
MOVE 'VealeDataBase_log' TO 'C:\Documents and Settings\Oolon\My Documents\Visual Studio 2010\Projects\TheVeales\App_Data\VealeDataBase_Log.LDF'

And I got this error:

Msg 3283, Level 16, State 3, Line 1
The file "sysft_VealeDataBase" failed to initialize correctly. Examine the error logs for more details.
Msg 3013, Level 16, State 1, Line 1

...which I have seen in other threads before.

So I checked the error log and got this:

The operating system returned the error '5(Access is denied.)' while attempting 'DeleteTree' on 'C:\Inetpub\wwwroot\bin' at 'fulltext.cpp'(1729)

So I gave "Everyone" full access, eventually, to the c: and d: drive (just in case) and....

I get the same error. I'm not sure how access can be denied when I've blanket authorization.

I've had to move my sites to another host as my original host is....well, pretty much useless.

I've rebuilt one site, I'm in the process of building the second, but there is info in the db that I would like to be able to restore to the third site. I can rebuild the site, but I can't replace the data.

Opinions, ideas, I'm hooped and forget it.....

Thanks
Bob

Kristen
Test

22859 Posts

Posted - 2010-12-20 : 12:29:24
Looks like you need to provide a location for the Full Text database file too? (Not something I cam familiar with, but appears to be 3 files in your backup, and you have used MOVE to position two of them)
Go to Top of Page

aitp
Starting Member

4 Posts

Posted - 2010-12-20 : 12:31:49
the .bak file contains the filepaths of the directories where the mdf and ldf files were on the source machine prior to taking the backup. In the Wizard there should be another tab once you select the backup set which allows you to see the original file path (you may have to scroll to the right). Just change the directory to your local machine and include the filename for the mdf and ldf file. This should get your backup restored. If the db already exists, you may have to "overwrite" the database, and make sure there are no connections.

As for your second error, which is unrelated to the db, it looks like you are calling the TSQL from a Visual Studio project, or some other compiler. You will not be able to do a DeleteTree on a IIS directory with contents in a Bin file. The error is stating you cannot delete a file in use. You should never manually programatically delete contents from this directory. Keep your application tier and datatier seperate.


Go to Top of Page

forexbob
Starting Member

6 Posts

Posted - 2010-12-20 : 13:53:18
Thanks for the quick responses.

Kristen

I added:
MOVE 'SYSFT_VealeDataBase' TO 'C:\Documents and Settings\Oolon\My Documents\Visual Studio 2010\Projects\TheVeales\App_Data\VealeDataBase'
and it worked.

Thank you

aitp
You obviously know a lot more about SQL than I do. I know very little SQL...only use it indirectly with DNN and DotNet. I appreciate your feedback. I just wish I understood it. I have a lot of learning to do.

However, your note about "filepaths of directories" solved the issue I had with:

D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\VealeDataBase.mdf

I now understand what this is referring to.

You also mention application tier and datatier. More googling for me! I love learning.

Thank you
Go to Top of Page

forexbob
Starting Member

6 Posts

Posted - 2010-12-21 : 00:44:54
So I "restored" two databases using the info in the previous post. Both dbs show up in Sql Server Studio Express. All the tables are there..it's looking good. Neither db is accessible to view data. When I right click a table and "Open Table" or "Design" I get "Unspecified Error". I realize that's not much to go on, but any ideas?

Thanks
Bob
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-21 : 00:56:15
Run a query against rather than using "open table". Such as: select * from sometablename. Do this in a new query window and hit F5 to execute it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

forexbob
Starting Member

6 Posts

Posted - 2010-12-21 : 02:24:21
OK, so I tried to do as suggested.

I had the db open in VS2010 and could view all contents. Went into SQL Server Express and couldn't access db as in use by another application. Fine. I know there's some kind of "Kill" command but I don't know how to use that yet so I reboot my computer.

When I try to access the dbs in SQL Server Express again I can't even get into them this time. One db shows as "Suspect" and the other one says: Cannot create file VealeDataBase_Data_log.LDF because it already exists.

Could this be because of access to db through VS2010?

Thanks
Bob
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-21 : 10:46:08
Uh oh, you shouldn't have rebooted. Sounds like you've got a serious problem now and will need to figure out what's going on. Start with the Event Log.

It's not because of Visual Studio. And two different apps can be using SQL Express at the same time.



Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -