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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-06-09 : 08:39:52
|
| Niels writes "I have a problem trying to implement the log shipping procedure described in the article on http://www.sql-server-performance.com/sql_server_log_shipping.asp.Let me first explain what I'm trying to accomplish. We have an ERP database (Concorde) running on SQL7/WinNT. This database is very badly created. Most of the ordernumber, accountnumber and so on are saved in char field columns which makes the databases terrible to use for querying, while the server performance goes down (hardware not an issue). Also no table has a primary key, only indexes are used.Now we want to use ERP data on our website, running a MySQL database. So we want to use log shipping to update a second server with data from half-an-hour old and want to use this second server to copy data to our webserver. This database will also be used to run as backup server, when our primary server crashes. Transactional repliciation would be the best solution for us, but as far as I know we'll need primary keys for that on every table.So I wanted to implement the log shipping using the article mentioned above as reference. I get stuck while restoring the backup. Backing up and copying the 9GB file to the other server is no problem. I'm trying to restore the database using:RESTORE DATABASE ConcordeFROM DISK = 'D:\mssql\backup\concorde_backup.bak' WITH REPLACE, RECOVERY, MOVE 'Northwind' TO 'D:\mssql\data\concorde_data.mdf', MOVE 'Northwind_log' TO 'D:\mssql\log\concorde_log.ldf' Target database is SQL2000 running on W2k.After this job is finished the database will stay in Loading status. When I try to recover the database with: RESTORE DATABASE 'Concorde' WITH RECOVERY it is returning the following error message: "File 'Concorde_Data' was only partially restored by a database or file restore. The entire file must be successfully restored before applying the log."When using the Northwind database, the whole process runs without a problem. When I'm using the same backup file to restore using Ent.Manager the database restores and recovers with no problem. I haven't gone to the step yet of restoring the transaction logs, while I'm still stuck with this problem. Why can I not bring online the database?" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-06-09 : 13:35:47
|
| Log shipping is not going to work for you. Log shipping is for disaster recovery. Once you recover the database on your secondary server, it is no longer able to be log shipped. You can not then apply additional transaction logs to update the database. Also, remove the word RECOVERY from your command. RECOVERY can only be used with RESTORE LOG. NORECOVERY can be used with both options. But keep in mind that once you recover the database that you can no longer apply transaction logs to it to update it since log shipping is now broken.Tara |
 |
|
|
|
|
|
|
|