With Standby UNDO
Feb 9, 2007I'm confused how the undo works when you restore WITH STANDBY
Suppose I restore WITH STANDBY
FULL
DIFF
LOG A
LOG B
LOG C
How do I undo LOG C? Do I restore LOG B again?
I'm confused how the undo works when you restore WITH STANDBY
Suppose I restore WITH STANDBY
FULL
DIFF
LOG A
LOG B
LOG C
How do I undo LOG C? Do I restore LOG B again?
I've been reading a million and one posts on replication
My scenario is that i have a live SQL 2000 server. In a DR invokation, i'e i've lost my live sever, i want to be able to access the same data at the DR (SQL 2000) site and have it accessable to the users. DR server has a different name to the live box.
Replicate
Master
CRMDatabase
Data changes all the time but can have hourly replication of transaction logs for this example. I've currently researched a sp called update logons but this has to be fed each account name to enable them on the new server. There must be a way to activate all CRMDatabase logons with the new server?
Could someone be kind enough to lead me through a step by step guide on the best solution.
Thanks a lot
David
Hi,
The standby file (.tuf file) got deleted accidentally on the secondary. How can I recover the database without the standby file?
Hello all,
I know that Oracle uses undo table spaces or rollback segments as its undo mechanism. what does Microsoft SQL Server use as its undo mechanism?
Krz
Hello !
I have a big problem. I need to go back un changes that had been since the a specific date (beginning of november in my case).
Thanks a lot for any help on how to do this !
Regards,
Fabianus
my favorit hoster is ASPnix : www.aspnix.com !
Is there anyway in SQL Server to rollback an SQL statement which wasalready executed. I know there is a transaction log but what itcontains and how it works is still a mystery to me.Assuming I delete all records from a table - can I somehow undo this?
View 5 Replies View Relatedif we kill sp, let's say, on the third statement, will the first two
be rolled back (undo) ?
How come Undo button does not work? Thanks.
View 2 Replies View RelatedI have update a table field and I like to know how do you "undo" the update? I set the field_length from 6 to 7 and like to undo this.Here is my command:
table = template_fileds
column= field_length.
filed name= field_name.
update template_fields set field_length='7' where field_name='assesscode9'
Muhammad Qasim writes "i hav query that i was just taking the backup of the database n by mistake i just clicked restore as the wizards are similar so i just restored the database to 10days old backup n now i have no latest backup so how can i just undo this restore if u hav any idea of how to overcome this plz reply as early possible lookin for replies"
View 4 Replies View Relatedhai to every one,
i am pavan working as oracle dba. in oracle we have undo table space.
when we issue rollback oracle gets old image from undo tablespace.
in sql server where it gets from old image.
who performs instance crash recovery(which back ground is responsible for it)
in sql server we have logwriter, lazy writers(back ground processes)
what are the other processess.
and some doubts are
how insert query works
how update query works,
how select query works.
means i issue update statement. command successfully executed. late issue rollback, from where sql server gets old imege of the data
please send me any archetecture book /pdf/online link
thanks
kumar
pavan
Associate Oracle DBA
Hello,Somebody accidently deleted a record with cascade deletesand took out about 80 records.The database has been used heavily since then.How do I put back the data?I have spent hours researching BOL and all I can findis how to restore the database to a point in time.But that will lose all the work done after the mistake.(We do a full backup every week and log backup every day)Is there a standard way to do this?Morgan
View 2 Replies View Related
Hi
Can somebody advice me on this:
I am trying to update a row, which is being pulled from another table.
i.e., I have two tables T1 and T2
I am getting a row from T2 and inserting it in T1
then I am updating that row in T1
What i want is if in case these is an error while updating this row I want to remove the row from T1
T1 and T2 are same.
declare @err1 int
--BEGIN TRANSACTION
INSERT INTO dbo.T1 SELECT * FROM dbo.T2 WHERE UpdateFlag = 'Y' AND ID = '12345'
BEGIN TRY
UPDATE dbo.T1 set ReportDate= '9910-12-2006'
SET @Err1 = @@error
END TRY
BEGIN CATCH
insert into errorlog values (error_message())
END CATCH
--if @err1<>0
--begin
--Rollback transaction
--end
This work fine but I am not able to roll back the transaction
When I activate the codes fro roll back, it not performing the Logging operation in CATCH also terminating
REQUIREMENT
1) Get the record in T1 from T2
2) Update the record in T1
3) IF step:3 good commit it, else remove the only the row which was pulled from T2. It must do this also log in dbo.ErrorLog the errored system message error_message()
Thanks a lot in advance
Hi ,
I was working in the SSIS designer and when I found that the DataFlow task I deleted was indeed something I needed, I tried to Undo the operation but Alas the option is not enabled :(
Is there a way we can undo the operations?
I often run queries in Query analyzer. Today I accidentaly deleted some data from a table. Is their a way to undo the last SQL command executed?I have heard of the rollback command, but I don't know if that is applicable or not?
View 6 Replies View RelatedI have full Recovery mode.
I just accidently deleted a handful of records out of a table about 10 minutes ago. My last backup was last night.
Can I go back 10 minutes ago for a specific table? If so how... DO I need to backup now, then use the trans-logs to recover up to a specific point?
Thanks!!
USE [master]
RESTORE DATABASE [EmployeeRecovered] FROM DISK = N'D:BackupsNormalEmployeeFULL.BAK' WITH FILE = 1,
MOVE N'Employee' TO N'D:MSSQLDATAEmployeeRecovered1.mdf',
MOVE N'Employee_log' TO N'D:MSSQLLOGEmployeeRecovered1_log.ldf',
NOUNLOAD, STATS = 5, NORECOVERY
[Code] ....
Now I realze the recovery point is somewhere in TranBackup2.trn and need to go back to the state where only TranBackup1.trn is applied. How can i do this ?
currently i m developing a web application with using sql server 2005
and i was testing yesterday a sql update query with sql server management studio.
in my update query i forgot to put where condition and now all the rows of table are updated. is there any solution to undo this and retrieve all rows back?
Regards Selena
Hi,
I am in a process of designing a web application (ASP.NET) which is mostly data driven. The application needs to provide an undo functionality to users for eg. Undo an Add, Update or Delete that has been already committed to the database.
We are using SQL Server 2005 at back end. What I need to know is how will I enable this feature at database level. I am sure we might have to play with triggers but that too might not help in achieving the UNDO functionality. If anyone can shed light on how to achieve this, it will be quite helpful. Thanks
1. A few months ago, I received a request to deny delete to a group (Windows AD login) against 3 databases. So I issued a DENY DELETE to the relevant Windows login.
2. Now, someone is having trouble updating data. The issue seems to be that a trigger fires during the update. In the trigger the code tries to delete from a table in the previously delete-denied databases. So the update fails.
-- In retrospect, perhaps I should have used REVOKE - not sure
-- Also, I can't seem to find a listing of the DENY permissions - or rather, how to list what permissions are denied. I guess maybe that is a hard thing to do if the result of a DENY is to leave certain permission columns NULL (vs adding 'DENY'). But it would be useful for me to see what the current permission state is.
-- Finally, I tried to undo the DENY without success. Here is my attempt.
a. I tried GRANT DELETE... - no luck
b. Then I saw an article explaining to use REVOKE, so I tried 'REVOKE DELETE' followed by 'GRANT DELETE' - still no luck.
I have a table with 1 million records. I want to update only 400 records. The update statement is provided by a 3rd party vendor. Once i run the update statement it will update all the 400 records. Once the table is updated the users will validate the table
if the update is successful or not. What i'm looking for is:
1) Is there a way to identify what records were updated.
2) If the update done is not what the users wanted i need to undo and bring back the 400 records to their previous values.
I'm on sql server 2008.
I received an alert from one of my two secondary servers (all servers are running 2012 SP1):
File 'E:SQLMS SQL ServerMSSQL11.MSSQLSERVERMSSQLDATAMyDatabaseName_DateTime.tuf' is not a valid undo file for database 'MyDatabaseName (database ID 8). Verify the file path, and specify the correct file.
The detail in the job step shows this additional information:
*** Error: Could not apply log backup file 'MyDatabaseName_DateTime.trn' to secondary database 'MyDatabaseName'.(Microsoft.SqlServer.Management.LogShipping) ***
*** Error: Table error: Page (0:0). Test (m_headerVersion == HEADER_7_0) failed. Values are 0 and 1.
Table error: Page (0:0). Test ((m_type >= DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 0.
Table error: Page (0:0). Test (m_freeData >= PageHeaderOverhead () && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.
Starting a few minutes later, the Agent Job named LSRestore_MyServerName_MyDatabaseName fails every time it runs. The generated log backup, copy, and restore jobs run every 15 minutes.
I fixed the immediate problem by running a copy-only full backup on the primary, deleting the database on the secondary and restoring the new backup on the secondary with NORECOVERY. The restore job now succeeds and all seems fine. The secondaries only exists for DR purposes - no one runs reports against them or uses them at all. I had a similar problem last weekend on a different database that is also replicated between the same servers. I've been here for over a year, and these are the first instances of this problem that I've seen. However, I've now seen it twice in a week on the same server.
Hi
Could you suggest me some of the ways to have standby database server?
All of a sudden my company is in a need for standby database server in sync upto the 10 minutes. Main production database is about 8 GB. It serves almost 6 main sites for the company. No body in my group has worked with standby server issue before.
Any suggestion would help.
Thanks,
Linea
Hello !
I need to have a hot backup of my Production db
and i going to set up StandBy server : restore Production's backup
to StandBy
could you help me ?????
We are planning to provide a disaster recovery facility for a production system. Clustering has been ruled out for technical reasons so we are considering either transactional replication or Log shipping.
Microsoft suggested the log shipping option but it seems a bit messy to me and only provides a warm standby in that it only copies log backups to the secondary machine.
Any ideas why log shipping was suggested in preference to transactional replication? Anyone have any experience in this area?
TIA Colin.
Hello,
I need to create standy server. My production server has SQL Server 7.0 and standby server has SQL Server 6.5. I've sync the data between two servers and is planning to do log shipping every 15 min. But I'm little confused, Can the version of Sql server be problemetic? Pls. anyone guide me.
Thanks.
Sejal
Can I implement the Standby SQL Server using the SQL Server Standard Edition? What's actually the difference between Standard and Enterprise Edition? As I know the Enterprise edition can be installed for up to 32 CPU while Standard edition can only be installed for up to 4 CPU.
Many Thanks in advance!
I have inherited a problem that I am hoping someone can help out with. A developer used a perl script to move some backup files from one server to another and then restore the databases on other server (at least we think that is what happened, no one is really sure at this point)
Now I need to take the databases ourt of read only mode and drop them but I get an error 5063 stating that the database is in warm standby and the alter database and sp_dboption statements both fail.
How do I get the databases out of warm standby mode?
Thanks in advance for any help you all can provide.
Brad
Hi:Anyone has a detailed procedure description about how to setup a standbyserver? Microsoft makes it sounds very easy which are more complicated.How to handle system databases, does standby server need to be exacthardware as the primary one?Thanks in advance,Xiaodong*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 1 Replies View RelatedHi everybody,
Consider this scenario: I have a production 2005 database and wanna have another one on the same system that contains just the same everything. What is the best way to do this?
Besides, pls give me usefull links to all HA concepts in SQL Server 2005.
Thank you!
Parastou
I'm setting up log shipping and am running into an issue with applying the transactions logs.
This is my 5th server that I'm setting up and I take a backup of the source database, restore it with replace on the standby server. Then I take a log backup, copy it over and try and restore on the standby server, but the LSN#'s are off. It tells me it's too late for the log and try an earlier..
The timestamp on my backup is 11:43 and my translog was at noon...
I ran a checkpoint on the source database, but that didn't seem to do anything.
What am I missing?
Thanks
Susan
Can I implement the Standby SQL Server using the SQL Server Standard Edition? What's actually the difference between Standard and Enterprise Edition? As I know the Enterprise edition can be installed for up to 32 CPU while Standard edition can only be installed for up to 4 CPU.
Many Thanks in advance!
Does sql server have hot standby database? what are the pros and cons of using replication vs hot standby database? Thanks for helping me.
View 1 Replies View Related