April 17, 2007 at 11:11 pm
I recently installed a server that was running SQL server. I had to unistall for domain name conflicts, demote server and repromote then re-install SQL. My problem is that when I went to perform back up --no probs-- then to Restore I get the error ...."Reissue the RESTORE statement using WITH REPLACE to overwrite pre-existing files"
I did not recreate databases at all but thought I could sort of import them with the restore function. Do I have to create database first??? then restore???? Problem is I never created the dbs and don't know what the specs are for them.
Any help is appreciated more than you can imagine.
"If I could get less time on Networking I could pick up a hobby like SQL or life"
April 18, 2007 at 12:43 am
Are the original data files still in place from before the reinstall? (if you took the installation defaults, then look in c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data, or search your computer for "*.mdf") If so, then that may be the cause of the problem. Database backups contain the original file names and paths; the RESTORE DATABASE process (note: lots of us will use ALL CAPS for SQL Server commands and some keywords. We're not yelling, we're just highlighting commands) will restore those files to the original locations unless told otherwise using some of the options available during a restore.
To find out what the filenames and original locations of the database files sitting in the backup file, use RESTORE FILELISTONLY FROM DISK = 'BackupFilename'.
If the original files are still there (user databases are not deleted when SQL Server is uninstalled), you may be able to simple ayyach the database. In SQL Server Management Studio (SSMS), right-click the Databases node on your server in the Object Explorer, and choose 'Attach...'. Click the 'Add...' button in the dialog that pops up, and go find that mdf file from the search above. Then click 'OK', and your database is almost instantly back in place. 'Attach' and 'detach' is the SQL Server equivalant of mounting and unmounting databases.
If you still wish to restore the backup, and those files are still there, then you have two choices: restore the database on top of an existing database and its files (using the WITH REPLACE option), or restoring the database files to a different location, using the WITH MOVE option. See RESTORE DATABASE in SQL Server Books OnLine (BOL) for all the gory details.
-Eddie
Eddie Wuerch
MCM: SQL
April 18, 2007 at 8:36 pm
Thanks Eddie. Worked great on one .bck. But the second one gave me an error of "2 families but only one presented" Pardon for the poor description. But I am pretty sure it was looking for the .txt and the .log files.
Just to answer your first question, yes it was a full back up not an incremental.
My question here is. How can I tell if these file relations exist if the backup is only one large file??
John
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply