Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15694

Copy database troubles on SQL Server 2008 R2

$
0
0

I have a SQL Server database called IntRaad. It is just a small database (44Mb) for a personal/small business application. On my development system (DEV), I work with it using SQL Server 2008 R2 Express. The data files are IntRaad.mdf and IntRaad_1.ldf. On my production system (PROD, in a different physical location, reachable only via Internet) I run SQL Server 2008 R2 (full version). I want to make a copy of IntRaad on DEV to IntRaad on PROD. I tried to make a backup on DEV, copy the backup file to PROD, and then do a restore on PROD; it failed saying that the backup file came from a different database than the one I am trying to restore (even though they have the same names). Then I tried this:  take IntRaad on PROD offline; replace the data and log files on PROD with the data and log files from DEV; take IntRaad on PROC online again with command ALTER DATABASE IntRaad SET ONLINE; this failed with a lengthy error message:

Msg 926, Level 14, State 1, Line 1

Database 'IntRaad' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

Msg 5069, Level 16, State 1, Line 1

ALTER DATABASE statement failed.

Msg 9003, Level 20, State 15, Line 1

The log scan number (50954:1803:1) passed to log scan in database 'IntRaad' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.

Msg 3414, Level 21, State 1, Line 1

An error occurred during recovery, preventing the database 'IntRaad' (database ID 8) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.

The SQL Server error log lists those same errors, and in addition says: During upgrade, database raised exception 926, severity 14, state 1, address 0000000000C08061. Use the exception number to determine the casue.

IntRaad works just fine on DEV – nothing suspect about it. I do not understand what Msg 9003 is trying to tell me.

I tried to use the Copy Database Wizard, but that does not seem to be available on the Express version on DEV. On PROD, I found the wizard, but I could not find a way of specifying as the source a SQL Server instance out there somewhere on the Internet.

How do I do this correctly, please?


r4


Viewing all articles
Browse latest Browse all 15694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>