| SQL 2005 Knowledgebase |
| Database Mirroring | |||
| How do I change the name of my SQL Server | |||
| Install Guide to install SQL 2005 on Client Servers | |||
Q: SQL 2005 SERVER Console Slow to Open?
A:Uncheck "Check for Publishers Certificate Revocation" checkbox, this is a known bug with microsoft. Log-off the server, log back on and the SQL 2005 will start much quicker

__________________________________________________________________________________________________________________________________________________________
The solution:
here are a few options to achieve my goal in SQL Server 2005, such as DDL triggers and event notifications. But SQL Server 2000 is more limited. To achieve my goal in both environments, I had to program a small utility that could run once a day or a few times a day, monitor changes in the respective system tables and send a message if changes are, in fact, detected. In order for that to work, SQL Mail (SQL 2000) or Database Mail (SQL 2005) must be configured already. I created a sp_send_dbmail stored procedure on my SQL 2000 instances that simply executes the xp_smtp_sendmail stored procedure.
Here are the example scripts I use in order to receive notification when new objects are created in my SQL Server instance. You can use these same scripts for modifications and deletions of the corresponding server objects:
A trigger can be created on the sysjobs table in the msdb database, so you don't need a daily job for that matter:
For the other system tables in the master database (such as syslogins and sysdatabases), it's impossible to create triggers, so you should take another approach.
I create a table in tempdb holding the login names from the last time the job was executed. Every time it executes, I compare the contents of this table with syslogins and send a message with the new logins, if there are any. If the content of the table changed, I update the one in tempdb accordingly. It is better to create the table in a DBA database instead of in tempdb -- this way the table will not be dropped when SQL Server service is restarted for any reason. The following script should be executed every period of time (such as once a day):
I do the same as I did with the new logins:
A more realistic solution:
You can apply the sample code – except for the trigger that will execute anyway – when a new job is added from a central location by executing it as remote stored procedures.
For example, create the following on server_A, server_B and server_C:
And run the following from server D (which is a central server) using Linked Servers:
exec Server_A.master.dbo.spDBA_NewDatabaseNotification
exec Server_B.master.dbo.spDBA_NewDatabaseNotification
exec Server_C.master.dbo.spDBA_NewDatabaseNotification
exec Server_D.master.dbo.spDBA_NewDatabaseNotification
Conclusion:
A simple way to receive notification about changes in your SQL Server objects, such as logins, databases and jobs, when you have both SQL Server 2000 and SQL Server 2005 is to monitor the delta of the system tables that hold the object's information or have a trigger on the object's table when it's possible.
________________________________________________________________________________________________
This script was originally created by Microsoft but has undergone some refinements, examples are that a 176GB log had grown out of control over many years, we execute the script which took 20 seconds and shrunk the log down to a staggering 102MB

WARRANTIES AND DISCLAIMERSEXCEPT WHERE EXPRESSLY PROVIDED OTHERWISE IN AN AGREEMENT BETWEEN YOU AND Intekdb, ALL INFORMATION, SOFTWARE, PRODUCTS AND SERVICES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
![]()
Copyright@
Is a legal concept, enacted by most governments, giving the creator of an original work exclusive rights to it, usually for a limited time. Generally, it is "the right to copy", but also gives the copyright holder the right to be credited for the work, to determine who may adapt the work to other forms, who may perform the work, who may financially benefit from it, and other, related rights. It is an intellectual property form (unlike the patent, the trademark, and the trade secret) applicable to any expressible form of an idea or information that is substantive and discrete.
All templates are the property of Technation, Intekdb & Dreamfall Design NZ
All designs are carefully created so that this doesn't compromise any ISO Quality Assurance Procedures.
Intekdb is managed in NZ but registered in the UK@ 2008