Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Thursday, March 29, 2012

Database start trigger 2005

Hi,

I have searched high and low, and can not find any mention of SQL2005 and mount/start database DDL triggers.

I need a trigger/job/event to update a column in a table to indicate that the database has been restarted. I can not have an application connect to the database and set this value as I am afraid one of my other computers may connect first and get the wrong state from the database.

Is there any way to have SQL2005 update a table on MOUNT/Service Start/DB start?

Regards,
Derek

I solved it on my own. I use a StoredProcedure in the MASTER database and set it to start automatically.

~Derek

Wednesday, March 7, 2012

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
HTH
Andreas
"Ben Rum" wrote:
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?
Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/default...b;en-us;224071
HTH
Andreas
"Ben Rum" wrote:

> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>
|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/de...kprst_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/defaul...kb;en-us;224071
HTH
Andreas
"Ben Rum" wrote:

> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/d... />
t_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>