Showing posts with label starts. Show all posts
Showing posts with label starts. Show all posts

Tuesday, March 27, 2012

Does SQL Server 2005 exsit the trigger ?

When the database starts,I want to startup a trigger to do something,how can I do ?

I know there are two kinds of trigger in SQL Server 2005 ,one is DML trigger and the another is DDL trigger

Could you tell me ,Is there a trigger for database level in SQL Server 2005 ?

I know there is this kind of trigger in oracle .

Sure, in SQL 2005 you can create DDL triigers on DATABASE (even SERVER), please take a look at this link:
CREATE TRIGGER (Transact-SQL)|||

Hi,friend

I just want to know whether the instance started or not.

If the instance started ,I would monitor a table ,the trigger is not the kind of DDL

|||OK, how will you monitor the table? Then you can create a sp to "monitor" the table, and configure it as startup stored procedure using?sp_procoption.?You?can take a look at this link:
Automatic Execution of Stored Procedures

Friday, February 24, 2012

Does a Full Backup include data changes made during the backup?

If my backup starts at 8PM and take 1 hour to complete, will the changes made to the database during that hour be captured in the full backup?

Stated another way, will my backup be a snapshot of:
a) 8PM when the backup started
b) 8PM with some of the changes made between the hour
c) 9PM when the backup finished?

Anybody know the exact way SQL Server handles that logic?

Thanks,

MarcFrom BOL (full backups [SQL Server]):
"A full backup (formerly known as a database backup) backs up the entire database, including part of the transaction log (so that the full backup can be recovered). Full backups represent the database at the time the backup completed. The transaction log included in the full backup allows it to be used to recover the database to the point in time at which the backup was completed. Creating a full backup is a single operation, usually scheduled to occur at regular intervals. "|||I remember reading in SAMS SQL 2000 DBA Guide, that the backup processes uses logic to make certain that the backup represents the state of the database when the backup is completed.

Regards,

hmscott