January 10, 2008 at 2:48 am
Hello, I have a problem with one of my clients to do with a SQL Server 2005 database but I am a relatively inexpirienced with SQL Server.
A query has been run that has overwritten the data in one column with the data from another column and there are no backups to restore. How can I undo the changes to restore the data in that column?
The database is on a remote server owned by Fasthosts and I have installed Microsoft SQL Server Management Studio Express on my local machine to view the database. I have tried using Redgate SQL Log Rescue which seems like it should do as I require. However I get an error when I try to install the Extended Stored Procedures.
I would greatly appreciate any ideas anyone has for undoing the changes to that column.
Kind Regards
Paul
January 10, 2008 at 3:07 am
If it's not your server then chances are you're not an administrator and won't have the rights to install the necessary bits to make it work 🙁 Sorry...
Are you sure that you don't have a full backup, even if it's quite old (and another hasn't been taken since)? If so, then you could use that full backup in conjunction with a transaction log backup that you could take now. You'll restore the full backup and then the log backup with the STOP AT command indicating a point in time to which you want the database restored. This will only work if your database is in full recovery mode though...
Finally, perhaps you could get your database taken offline and then have the server operator send you the actual mdf & ldf files. The server's database could then be put back online and you can do the fiddling with logs on your own server/desktop using the mdf & ldf files.
January 10, 2008 at 3:28 am
Thanks, that is a great idea about moving the database onto my local server and making the changes. Is there a way I could copy the remote copy to my local copy?
Thanks
January 11, 2008 at 1:53 am
Ian's idea is good. But before anything can you confirm whether the database's recovery model is full by running the below query?
select databasepropertyex('DBNAME', 'recovery')
January 11, 2008 at 2:00 am
I have checked and the Recovery Mode is FULL
January 11, 2008 at 2:09 am
paulholl (1/10/2008)
Hello, I have a problem with one of my clients to do with a SQL Server 2005 database but I am a relatively inexpirienced with SQL Server.A query has been run that has overwritten the data in one column with the data from another column and there are no backups to restore. How can I undo the changes to restore the data in that column?
The database is on a remote server owned by Fasthosts and I have installed Microsoft SQL Server Management Studio Express on my local machine to view the database. I have tried using Redgate SQL Log Rescue which seems like it should do as I require. However I get an error when I try to install the Extended Stored Procedures.
I would greatly appreciate any ideas anyone has for undoing the changes to that column.
Kind Regards
Paul
Hi Paul,
SQL Log Rescue does not support SQL Server 2005. It is only released for SQL Server 2000. There are other vendors that do have 2005 support, so you may want to look at those.
Kind Regards,
Andras
January 11, 2008 at 2:21 am
paulholl (1/11/2008)
I have checked and the Recovery Mode is FULL
You mentioned that there are no backups to restore. If the database has never been backed up then the recovery mode does not matter. It will still run in SIMPLE recovery mode, and the log will be recycled. In order to "activate" full recovery mode, a full database backup must have been taken. Has this been done? If so, there are tools to compare the data in the backup directly with the database, or you could restore it to a new database, and compare the data. This would allow at least partial recovery. Alternatively you could use third party log reading tools. If there has never been a full database backup, then it is very likely that the log has been recycled or soon will be (do stop the server, and make copies of the ldf and mdf to avoid further damage to the existing log data).
Regards,
Andras
January 11, 2008 at 2:26 am
Thanks.
I have since taken a Full Backup. How would I be able to move that backup onto my local server?
January 11, 2008 at 2:32 am
Moving the backup to your local machine should be easy if you have FTP access to any of the directory on the server.
Take a full backup of the db at the ftp location and download the backup using any ftp client tool or just IE
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply