.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Triggers when Log-Shipping is used

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
When we restore a db using Log-shipping, do the triggers in the destination db get fired from the changes occured in the shipped log? I guess the answer is negative but just want to make sure I am not missing anything. Thanks in Advance.  

View Complete Post

More Related Resource Links

Data Points: Disabling Constraints and Triggers


What to do when you need to disable triggers and constraints to perform data synchronization and other tasks with an offline database.

John Papa

MSDN Magazine April 2007

Can I use TCP sockets within managed funcs, triggers and stored procedures?

I have seen nothing prohibiting this, but have not yet had time to write some test code. Does anyone know for sure if SQL Server 2008 prohibits or allows TCP sockets for communications, inside a C# SQL/CLR function or method? I guess it must because this is implict when creating data connections and so on, which are obvioulsy allowed. Thanks Cap'n  

I have 3 triggers defined on an sqlserver2008 table and I can't find them with c#

I've got the code below and when I run it, it always says there are 0 triggers in table.Triggers.  I added some debugging code checkin the table.HasDeleteTrigger, etc. and from that, I get the exception: "To accomplish this action, set property HasDeleteTrigger." when I try to set it to bool hasDeleteTrigger. I can get stored procedures find, just not triggers. Below is my problem code: foreach (Database database in databaseCollection) { if (database.Name.Equals(catalogName)) { // first we need to delete triggers associated with all tables that begin // with our prefix. we can skip our the framework tables because those // don't have triggers on them // grab all tables, filter for non prefixed ones in foreach loop so we can delete triggers from non prefixed ones results.AddRange(from Table table in database.Tables select table.Name); foreach (var tableName in results) { var table = new Table(database, tableName, CrSyncDbSchemaName); table.Refresh(); bool hasDeleteTrigger = table.HasDeleteTrigger; bool hasAfterTrigger = table.HasAfterTrigger; bool hasInsertTrigger = table.HasInsertTrigger;

Can I safely perform full backups without breaking log shipping? Can I do point in time restores if

I'm building a system using SQL Server 2008. I have log shipping set up across our WAN, and that's working fine. I need to perform local backups on the primary server so that I'm not relying on the (slow) WAN if it needs to be recovered from a server crash. Ideally, it would be nice to be able to perform point in time restores. I understand that I can use the transaction log backups, created for log shipping, to restore from. But I still need a full backup to start the restore from - and there seems to be some confusion regarding whether or not performing a regular full backup on the primary server will affect log shipping. Even on these forums, conflicting advice has been given, with some people saying it's fine as long as you don't do transaction log backups, and others saying you must run COPY ONLY backups (though they were talking about Server 2005). From what I understand, you can't do point in time if you use copy-only backups. I'm getting the impression that this used to be a problem under 2005, but under 2008 you can safely perform full backups while log shipping is running. Can anyone confirm my understanding before I make a career-altering error? :)



SQL Server 2005 Log Shipping and subsequent FULL backups that are needed

Afternoon,   I have a few Log Shipped DBs that are working great.   Currently they are set to fire off every 15 minutes 24/7.   My question is this ... I need to get FULL backups of the source DBs in order to restore them on certain Dev boxes.   If I were to execute the full backup on one of these Log Shipped DBs ... how would it affect the log shipping process?   Is there a special method to accomplish this?   As a side note, what would be some concerns/issues if in being able to create the FULL backups and not interupt log shipping, I were to create the backup using a 3rd party tool like Quest LiteSpeed?   I sure wish we were on Enterprise, then I could create a mirror and then snapshot off it to create my backups BUT ... that is not the case as we stand today.   Thanks

Log Shipping - Working or not working

Hi We are currently receiving error messages within our Windows Event Log on our main DB Server, a colleague has told me that this is normal with log shipping however I am not convinced. Event Id: 14421 Type: Error Description: The log shipping secondary database DRSQL.Database has restore threshold of 45 minutes and is out of sync. No restore was performed for 77873 minutes. Restored latency is 1425 minutes. Check agent log and logshipping monitor information. The Windows Event Log is completly full up with these entries. Regards D

Log Shipping

Her's my situation we have 2 SQl servers the first is running 2008 enterprise the backup server is running SQl 2008 r2 datacenter. Currently we are log shipping from  the enterprise to the datacenter version in no recovery mode. This is working fine. The problem is we want to have the backup databases in stand by mode. We upgraded the 2008 enterprise to 2008 r2 datacenter to match the backup server. The problem is when we try to log ship in standby mode sql is still  telling us  there is a database upgrade required. What am I missing? is there still something I need to do to the live database (besides the upgrade) to get them on the same version? any help would be appricated

How can I use triggers ?

I have a Database with some tables in an Asp.Net project (C#),I wanna to run a method in C# whenever some data was written in the tables. I know I have to use triggers, but I don't know how!!!It would be appreciated if you guide me. P.S:I'm using SQLExpress 2008,

Accessing database in STANDBY mode while log shipping

Hi,     I am testing with Log shipping, I have it setup and it is working just fine. The secondary database was restored with Standby mode and is readonly. I have no problem accessing and querying data from the secondary database but I noticed if changes are made to the primary and I am accessing the database when the restore step to the secondary runs it fails with the following error: Message2006-07-31 09:40:54.33 *** Error: Could not apply log backup file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\LogShip\CI_REPLICATION_TEST_20060731131501.trn' to secondary database 'CI_REPLICATION_TEST'.(Microsoft.SqlServer.Management.LogShipping) ***2006-07-31 09:40:54.33 *** Error: Exclusive access could not be obtained because the database is in use.RESTORE LOG is terminating abnormally.(.Net SqlClient Data Provider) *** This appears to be because you can not restore to a database that is in use? How do you get around this? Is it possible? How do I query data from the secondary db without worrying about causing log shipping to fail? Do I not worry about it because at somepoint when Exclusive access is obtainable all the logs will be rolled forward, but this could create a wide gap in sychronization between the primary and secondary db's, say if someone or something does not properly log off. I guess I could disconnect all users prior to applying tlogs but that kind

Update Panels, Postback Triggers, and GridViews, Oh my

I've been battling with this page for the past couple days and it works, but it's annoying, so I am hoping someone maybe has dealt with this and can help me a little.   I have an UpdatePanel that acts as a container for a number of other update panels, everything in this container works.  I got the bright idea to add a ModalPopup Extender to enhance the user experience a little when performing a certain function on the site.  The panel that acts as the container for the ModalPopup sits outside the UpdatePanel Container because if it's in the container, any interaction with a child control throws "Input string not in the correct format" error message.  Because this is outside the comfort of the UpdatePanel Container, any control that populates information into the Popup control has to register a Postback.  Thus my problem: the controls that populate the Popup are GridViews.  The only GridView Event I care to cause a PostBack is the SelectedIndexChanged, but PostBack Triggers don't care, they take all comers.  Want to go to the next page? PostBack. Sort? Hell Yeah, Postback. My initial solution is to provide a confirm type of a message under the gridview and have the user confirm their selection by clicking a button to avoid causing a postback until it's necessary, but you know what? That kinda sucks, so I sub

Log Shipping Error

hello there, I set up log shipping on a database server few months ago and it all worked fine, now I want to add another secondary server but I get the error below: *** Error: Could not retrieve copy settings for secondary ID '5c28a1a2-63f5-41c7-9c06-d179fd6ed753'.(Microsoft.SqlServer.Management.LogShipping) ***<nl/>2010-09-14 18:29:41.08 *** Error: The specified agent_id 5C28A1A2-63F5-41C7-9C06-D179FD6ED753 or agent_type 1 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***<nl/>2010-09-14 18:29:41.09 *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***<nl/>2010-09-14 18:29:41.09 *** Error: The specified agent_id 5C28A1A2-63F5-41C7-9C06-D179FD6ED753 or agent_type 1 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***,00:00:01,0,0,,,,0 I have read that the problem might be because I have to configure all the secondaries in one go , is this true? Regards Ana

EventHandler triggers another EventHandler

I have two EventHandlers - A and B. EventHandler A populates items in Child list, when Parent list creates a new item. Or vise versa, deletes items in Child list when Parent list deletes an item. There is a ParentID in Child list to refer back to ID column in Parent list. EventHandler B duplicates items from Site 1 to Site 2. i.e. creates a new item in Child list of Site 2, when Site 1 creates a new item in Child list. Or vise versa, deletes item in Child list in Site 2 when Site 1 deletes an item in Child list. The two Child lists are almost identical except Site 2 Child list has SourceID pointing back to ID column in Site 1 Child list ID field.   Site 1                                      Site 2 Parent    | EventHandler A    V Child   --- EventHandler B --->  Child   Now if I create/delete item in Parent list of Site 1, Child list of Site 2 will be affected, thanks to EventHandler A and B. Here A triggers B. If I create/delete item in Child list of Site 1, Child list of Site 2 will be affected as well, here only EventHandler B is triggered. My question is: Is there anyway to tell in EventHandler B, that it is triggered originally from Parent lis

Real Time Stored Procedures and Triggers..

hi ..I am learning  Dot Net and i am looking for a job  in it these days... Every Company looked   if am mainly good in Writing Real Time Stored Procedures and Triggers... I am able to grab the basic concepts , but am not able  to write real time examples.... Kindly let me know some Websites or source  where i can find some real Times examples for  Stored Procedures and Triggers, coz  am interested in  practicing it ... Thanks in Advance...

Why does Output clause have the INTO requirement for tables with enabled triggers?


What is the reason for this restriction for Output clause?

If the OUTPUT clause is specified without also specifying the INTO keyword, the target of the DML operation cannot have any enabled trigger defined on it for the given DML action. For example, if the OUTPUT clause is defined in an UPDATE statement, the target table cannot have any enabled UPDATE triggers.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend