Database Corrupted By Reverting To A Snapshot
Dec 28, 2006
The following list of actions leads to a corrupt database on SQL Server 2005.
Create a database snapshot
Drop a table in the database
Backup the database
Restore from backup
Revert to the snapshot
I'm not entirely surprised that it results in a corruption, what is surprising is that I can revert from a snapshot after restoring. There needs to be some kind of check to prevent reverting to a snapshot in a case like this. Until SQL Server prevents you from doing it, I'd recommend a best practice is to delete all snapshots before you restore a database so that you cannot do this by accident.
View 3 Replies
ADVERTISEMENT
Mar 12, 2015
We are facing a weird scenario in which the snapshot is getting corrupted after insertupdate few million records in to a table .
SQL Server 2012
windows server 2008 R2
service pack 1
64-bit OS
View 1 Replies
View Related
Dec 20, 2007
For the second time in two days, a completely rewritten procedure (using "alter procedure" statement) has reverted to an earlier version after hours of testing and confirmation. In both cases, there was 4-6 hours from successful final testing to discovery of the "reversion."
Since sql server has no memory of earlier procedure versions, I can only conclude:
1) someone restored an earlier version of the db (log says no)
2) someone acidentally ran a script for the old procedure (no evidence for that)
3) the database crashed and was rolled back as part of restore (but alter procedure is a ddl and, as such, is auto-commited so it cannot be rolled back)
None of these 3 possibilities seems to have occurred. Is there another possibility I'm missing?
View 5 Replies
View Related
Jan 25, 2005
Hi all,
Had a disk problem here, and all apps connected to our database hung. Nothing was responding, rebooted, and mssqlserver hangs on startup.
If i move the mdf and ldf files of the database in question to another folder, mssqlserver starts up ok, with the db marked as suspect.
It would seem the the mdf and ldf are corrupted.
I am restoring a backup from yesterday, but this will take hours.
Any suggestions trying to recover it as it sits?
Thanks in advance for any ideas.
View 7 Replies
View Related
Dec 15, 2005
I have a SQL 2000 database whose MDF is approx. 105 GB. Everything has been working fine for months until this past weekend when the database server dropped offline. I restarted the services and SQL server looks to have started up okay. However, trying to access it via Enterprise Manager causes EM to hang. Checking the Windows event log, there are a whole series of messages stating ...
3455 : Analysis of database 'ptportal' (7) is XX% complete (approximately 61 more seconds)
This 'analysis' ran for over 12 hours ... I have never seen this run before, much less this long. Now, there are a new series of messages stating ...
3450 : Recovery of database 'ptportal' (7) is XX% complete (approximately 56526 more seconds) (Phase 2 of 3).
This 'recovery' has been running for 9 hours now. Does anybody have any idea what has happened here or what is going on? My guess is that this database has been corrupted and SQL Server is trying to do a repair? Anybody know how long this usually takes and what the success liklihood would be?
Thanks
-- Jeff Chastain
View 1 Replies
View Related
Oct 4, 2007
Hi,
I have a database corrupted showing on the Object Explorer the name of the database and showing near (6.5). Deleted not accepted any other function not allow. Is there any way to take off from the Object Explorer?
Best regards
View 3 Replies
View Related
Oct 9, 2007
yes,I have an error, like 'The database file may be corrupted. Run the repair utility to check the database file. [ Database name = SDMMC Storage Cardwinpos_2005WINPOS2005.sdf ]' .I develope a program for Pocket Pcs and this program's database sometimes corrupt.what can i do?please help me
View 4 Replies
View Related
Mar 20, 2000
I am backing up SQL 6.5 DB using Backup Exec 7.2 on NT 4.0 server SP4 with SQL server agent. The backup job ends in Failed status and a warning that DBname is corrupt. I then try to run DBCC Checkdb, newalloc, and checkcatalog commands to repair the DB. No further ahead yet. Are there any other commands that I can perform on the DB so that the corruption can be repaired, or verified there indeed is corruption of DB?
View 1 Replies
View Related
Nov 10, 2007
hi,
i developed an application which running on PDAs.i am using sqlserver ce database.my database file sometimes corrupted,why sqlce databases are corrupted and what can i do not corrupted.i can repair my database file when it corrupted but my customers not understand when database file was corrupted,so they think that program doesnot work.
View 4 Replies
View Related
Aug 13, 2006
Hi, my 'model' database corrupted and my SQL Server 2005 Express can't be started.
I believe I have the SAME problem as his:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=455524&SiteID=1
but when I try the command start sqlservr.exe -c -T3608, an error message appeared:
"Your SQL Server installation is either corrupt of has been tampered
with (Error getting instance ID from name). Please uninstal then re-run
setup to correct this problem"
Well, the problem is that I have an ActiveBPEL database inside, and I really need a way without reinstalling it.
Any solution??
Thanks,
Edwin
View 6 Replies
View Related
Jun 8, 1999
Hi Everyone,
I am a newbie to SQL Server Admin. Today when I ran Dbcc newalloc on Model it is showing
corruption on syobjects with a 2525 error. I am not sure how to fix this problem? Since
this is a critical payroll application server, I need to solve it at the earliest.
If anybody has faced this problem earlier or knows how to solve, please respond to the following
address: vsrikanth@ameren.com
Thanx for all responses
Srikanth
View 1 Replies
View Related
Nov 1, 2015
We have an issue with a 3 node SQL 2012 Always on availability group. Normal operation is node 1 (primary replica) with node 2 and node 3 as secondary replicas.After some patching, SQL wasn't running on node 1 hence the AG flipped over to node 2. This went unnoticed for some time and the transaction log for one of the AG databases became full on node 2 and node 3. (I think this is because it couldn't commit the transactions on node 1 so couldn't truncate it's t-log?) The DB is using synchronous replication btw.So I started SQL on node 1 and flipped the AG back to node 1 (with a data loss warning but I accepted this).Now the issue is that on node 2 and 3, the DB in question is stuck in a "Reverting / In Recovery" State. I've tried various commands such as ALTER DATABASE SET ONLINE, RESTORE DATABASE WITH RECOVERY etc but these fail stating unable to obtain a lock on the DB.
The weird thing is that on node 1 the state of the DB is "synchronised".how to resolve this issue on node 2 and 3? I've left them overnight (in case they were rolling back transactions, the DB is fairly large) but nothing seems to have happened. remove the DB from the AG in node 2 and 3 and add it back in again, ie recreate the replication?
View 2 Replies
View Related
Nov 28, 2014
I run MSDE on a Windows XP Server and my database was marked as "suspect" by Enterprise Manager and its icon become gray. I detach that database and try to re-attach it but there is an error as the following:
Error 3624:
Location : page.cpp:2801
Expression: rowLength >= offset + deleteLenght
SPID : 56
Precess ID:1612
After that, I uninstall the MSDE and re-install new MSDE SP4 and try to re-attach the database file again and there is still an error. Is there anyway i can recover the data from that database?
View 4 Replies
View Related
Apr 16, 2015
We have repartioned a server (create a larger C-drive/system partition). It's about Windows Server 2003. Before repartioning SP2 was not installed. After repartioning checkdisk started automatically (as normal after using a disk partitioning tool). Checkdisk did some interesting and bad things with my files: changing file permissions and make some files corrupt, how I don't know. Something to do with SP2 not installed and the NTFS filesystem. After this action I have a corrupted SQL database. Tried to repair with the DBCC CHECKDB repair commands, but fail. Error in event viewer:
Error: 823, Severity: 24, State: 2
I/O error (bad page ID) detected during read at offset 0x0000003bdc4000 in file 'D:program filesMicrosoft SQL ServerMSSQLData352.MDF'.
I also still have NTFS errors in my event viewer. What to do? How can I repair the database? Only running checkdisk again? (and will this work?) Than all file security will be reset to Administrators.
Other ways to rebuild my database? (tools???) Unfortunally there isn't a good backup available due to a lack of good configuration of the backup software.
View 2 Replies
View Related
Mar 29, 2007
Let me start off by saying that under normal circumstance I would just restore from the last good backup. However in this case it appears as though the last good backup was sometime last August ... arg! After much yelling at the person responsible I've been attempting to get my blood pressure below 200 and see what data is recoverable.
First off, this was a RAID5 system that failed 1 drive. Secondly, before we got someone in there to replace said drive it failed a second drive and the system went down. We managed to massage the system back online but it appears that there is some corruption as a result which is no surprise.
I've done DB repairs in the past and it hasn't been too bad, but this time it is looking a little gnarly.
I've kicked everyone off the server and tried starting SQLServer several different ways.
I tried starting the service normally and then flagging the bad DB into single user mode with "ALTER DATABASE foo SET SINGLE_USER". I then did a select * from sysdatabases to make sure it took, which it did. I also tried starting the whole SQLServer in single user mode from the command line, "SQLServr -m".
I can run "DBCC CHECKDB('foo')" and I get a long ugly list of allocation errors. I posted it to a link as the 1349 lines returned is a little long:
http://chrisnet.net/sqlbad/dbcc_checkdb.txt
But when I attempt to bite the bullet and destroy data in an attempt to put things back together with:
"DBCC CHECKDB('foo', REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS"
I get:
Server: Msg 7919, Level 16, State 2, Line 1
Repair statement not processed. Database needs to be in single user mode.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
But yet the database is in single user mode, according to everything I check check on. Is this just SQL's way of telling me the corruption is too severe to be repaired? No output is displayed in the shell cmd window like it is for a successful DBCC either (when running sqlservr -m).
Ideas? Or do I put a bullet through it's brain?
-Chris
View 7 Replies
View Related
Jan 18, 2011
I was trying to update an SSAS database on a test server and got the following error when trying to deploy from Visual Stuido. I get a similar error in SMS. I tried to delete the database before deploying but I get an error when trying to delete. I rebooted the server.
(SQL Server 2005 R2, Windows Server 2008R2.)
Error 1 File system error: The following file is corrupted: Physical file:
?D:Program FilesMicrosoft SQL ServerMSSQL.2OLAPDataHeidtman Sales Cube.0.dbDim Age.0.dim5.Dim Age.Dim Age.dstore. Logical file . Errors in the metadata manager. An error occurred when loading the Age dimension, from the file, '?D:Program FilesMicrosoft SQL ServerMSSQL.2OLAPDataHeidtman Sales Cube.0.dbDim Age.5.dim.xml'. Errors in the metadata manager. An error occurred when loading the Heidtman DW cube, from the file, '?D:Program FilesMicrosoft SQL ServerMSSQL.2OLAPDataHeidtman Sales Cube.0.dbHeidtman DW.7.cub.xml'. 0 0
View 3 Replies
View Related
May 9, 2007
A friend of mine called and said that his database was suspect and he detached it and was unable to attach it. The SQL Server Version is 2000 with the latest service packs installed. When I checked it the database (MDF) size was 1MB and the LDF size was 3.8 GB. I was not able to attach the two together and I was not able to attach the database using sp_attach_single_file_db. I did find an old backup of his database and attached that so he can work off of it but it is 1 yr old and he needs recent data. Since the MDF seemed to be blank we cant do much with that, but there seems to be data in the LDF. Is it possible to extract any data from the LDF file?
Sunny
View 1 Replies
View Related
Jun 3, 2015
We have database when trying to make read only throwing below error: with stack dump
Location: recovery.cpp:4517
Expression: m_recoveryUnit->IsIntendedUpdateable ()
SPID: 51
Process ID: 6448
Msg 926, Level 14, State 1, Line 1
Database 'XXXX' 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 3624, Level 20, State 1, Line 1
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support.
Msg 3313, Level 21, State 2, Line 1
During redoing of a logged operation in database 'XXXX', an error occurred at log record ID (0:0:0). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
Msg 3414, Level 21, State 1, Line 1
An error occurred during recovery, preventing the database 'XXXX' (database ID 7) 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.
Investigation DONE:
- DBcc checkdb shown Clean
- database is online and able to access
-Detached database and attached with rebuild log, still could not bring database read_only
SQL version : SQL server 2008 SP4.
View 15 Replies
View Related
Jul 23, 2005
Hello,I am trying to recover a SQL Server 7 database from another hard diskdrive that has a corrupted Windows 2000 Advanced Server installation. Iam not able to repair the corrupted Windows 2000 Advanced Serverinstallation but the file system is intact. I have installed a new copyof SQL Server 7 onto a new hard disk and have used the sp_attach_dbsystem stored procedure to attach the database from the old hard driveinto the new installation of SQL Server 7 on the new hard drive. Thedatabase shows up in the Enterprise Manager View and all the data andstructure are there, but when I try to run a Web site that uses ODBCconnections to the database I get the following error:ODBC Error Code = 08001 (Unable to connect to data source)[Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL servernot found.I have double-checked that all the NTFS permissions, ODBC DSNs, and WebServer settings are correct and when I run the SQL Server ODBC drivertest at the completion of each ODBC DSN setup, it is successfull.1) Why am I getting this ODBC error?2) What steps have I missed in the recovery process?3) If I have done something wrong recovering my database, can I stillrecover it since I still have: a) The old master database file and logfile; b) The old database (non-master) file and log file; c)A backed-up(Enterprise Manager -> Right Click A Database -> All Tasks -> BackupDatabase) copy of the old database (non-master) file; ?My System Specifications:-Windows 2000 Advanced Server-SQL Server 7-IIS 5.0-Cold Fusion Server 4.5 Professional Full EditionThanks For Your Time,Nathan
View 2 Replies
View Related
May 10, 2001
Question:: I know there is a switch to take a database that was upgraded to 7.0 back to 6.5. How does it work? If I upgrade a database and for 2 weeks input
data and then decide I need to go back to 6.5 -- do I lose the data from those 2 weeks or does it revert all information back to 6.5
View 1 Replies
View Related
Nov 24, 2006
Hi guys, can I know the steps on creating a database snapshot on a mirror database? Thx for the assistance. :)
Best Regards,
Hans
View 1 Replies
View Related
May 12, 2007
I have installed MSSQL 2005 on my D: drive of my windows 2003 server, but now need to install MSSQL version 2000 b/c I realized I have one less license than I thought I had. I have build no databases, only the default information. Can I install another instance (being the 2000 instance) on the same drive? If I can't, can I install it on the Crive without a lot of issues???? Or would it be easier to remove 2005 and just start from scratch? The sql version is 9.0. Any help or comments would be greatly appreciated.!!!!!
View 3 Replies
View Related
Jun 20, 2007
Hi
I seem to have a strange problem when applying a snapshot when the tables in the publication have been updated while the snapshot was being generated.
Say for example there is a table called RMAReplacedItem in the publication. When the snapshot starts being applied to the subscriber, a stored procedure called sp_MSins_RMAReplacedItem_msrepl_css gets created that handles an insert if the row already exists (ie it updates the row rather than inserting it). However, after all the data has been loaded into the tables, instead of calling this procedure, it tries to call one called sp_MSins_RMAReplacedIte_msrepl_cssm - it takes the last letter of the table name and adds it to the end of the procedure name.
The worst part is that this causes the application of the snapshot to fail, but it doesnt report what the error is, and instead it just tries applying the snapshot again. The only way i have managed to find which call is failing is to run profiler against the subscriber while the snapshot is being applied and see what errors.
I have run sp_broswereplcmds and the data in there is what is applied to the subscriber - ie the wrong procedure name.
All the servers involved are running sql 2005 service pack 2. The publisher and subscriber were both upgraded from sql 2000, but the distribution server is a fresh install of sql 2005.
View 1 Replies
View Related
Jul 15, 2001
We need to perform some maintainence on our database server which may take quite some time. We have a standby server which we constantly apply logs to.
We are planning to recover the standby server and use it while the production server is being maintained.
My question is how to I get back to using the original production machine.
The only way I can think of is to do a full backup on the standby machine,
do some transaction log backup and then restore these on the original production machine.
Is there any way to use the full backup from the original production machine and well as logs from the standby machine. When I try this I get the message that the database has not been rolled forward far enough.
In summary:
1. Backup full database on Prod Server
2. Restore full database on Standby Server
3. Backup transaction log (1) from Prod Server
4. Restore transaction log (1) on Standby Server
5. Recover database on Standby Server
6. Make modifications on Standby Server
7. Backup transaction log (2) on Standby Server
8. Restore full database on Prod Server
9. Restore transaction log (1) on Prod Server
10. Attempt to restore transaction log (2) fails.
View 3 Replies
View Related
Aug 3, 2015
I have user called DBA_USER he has db_owner access on (123DB) database ....
But when ever my machine restarted the user was getting access error (i.e.. you don't have access on this database) and i checked his access on that particular database his access got reverted back ....
Here my question is why this particular user getting this type of error ....
View 7 Replies
View Related
Feb 28, 2008
I have a mirred database and have snapshot created from the mirroed database. I can do data selecting from the snapshot. But when the pricipal server is down , I can re-active the mirroed database.( I did succesfully upto this). Then I need to restore the database from snapshot and which failing with following error message.
Code Snippet
Msg 5123, Level 16, State 1, Line 3
CREATE FILE encountered operating system error 3(error not found) while attempting to open or create the physical file 'E:sql_datadevitst_mirrorlog st_mirror_log.ldf'.
Msg 5024, Level 16, State 2, Line 3
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 3
The system could not activate enough of the database to rebuild the log.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
View 7 Replies
View Related
Jan 31, 2008
Hi...
Why is it that I encounter an error during execution of database snapshot i SQL Server 2005 Standard Edition. It says that database snapshot is not supported under standard versin. Is this true?
Thanks.
View 2 Replies
View Related
Dec 18, 2006
Need some help, i have some database snapshots files provided from an external source. Need to be able to understand how i get them back into a database format if possible.
Files for example are table1.bcp, table2.bcp with als a file called scheme.sql which sets up these tables in sql but does not populate them. Nothing else was provided except a .vcd file which i dont know whtat its for.
any clues?
Dan
View 6 Replies
View Related
Feb 28, 2015
I have a SQL Server 2008 R2 database.
I have modified the autogrowth configuration several times. The strangest thing... they keep reverting back to the original configuration.
View 7 Replies
View Related
Nov 9, 2007
Hi I've got a sql server 2000 database that when running is runnign fine. About 9 months ago I altered one of the stored procedures and ever since then when the machine is rebooted the stored procedure is "reverted" back to the old sproc... ???
is there any way I can recrete a sproc in a job that runs every day?? why would it be doing this?
View 1 Replies
View Related
Nov 2, 2001
Does anyone know of a script I can run to take a snapshot of a SQL server 7 database? If not what is the best way to go about getting a snapshot of the db?
Thanks!
View 1 Replies
View Related
Oct 31, 2007
Hi everyone,
I am looking for a way to check to see if a database is a snapshot or not. You can for example check different properties of a database by running the following:
SELECT DATABASEPROPERTYEX('databasename','Recovery')
SELECT DATABASEPROPERTYEX('databasename','IsInStandBy')
SELECT DATABASEPROPERTYEX('databasename','Status')
So I am trying to see if there is a way to check for a snapshot
Thanks,
Reghardt
View 2 Replies
View Related
Jul 28, 2006
When configuring snapshot replication of the OnePoint database used by MOM i am having the following error being reported in SQL Replication Monitor:
Command attempted:
CREATE TABLE "dbo"."Computer"(
"idComputer" "uniqueidentifier" ROWGUIDCOL NOT NULL,
"Name" "nvarchar"(255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
"Description" "nvarchar"(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
"CustomData1" "nvarchar"(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
"CustomData2" "nvarchar"(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
"Domain" "nvarchar"(100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
"DNSName" "nvarchar"(512) COLLATE SQL_Latin1_General_CP1
(Transaction sequence number: 0x000004670002E32300BF00000002, Command ID: 375)
Error messages:
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fn_ComputerHeartbeat", or the name is ambiguous. (Source: MSSQLServer, Error number: 4121)
Get help: http://help/4121
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.fn_ComputerHeartbeat", or the name is ambiguous. (Source: MSSQLServer, Error number: 4121)
Get help: http://help/4121
Unfortunately I can't find much help with this error.
Any suggestions?
View 4 Replies
View Related