Figure 6-19 Database-level and database security DDL events in Visual Studio .NET

Generator QR Code JIS X 0510 in Visual Studio .NET Figure 6-19 Database-level and database security DDL events

Figure 6-19 Database-level and database security DDL events
Draw Denso QR Bar Code In VS .NET
Using Barcode creation for Reporting Service Control to generate, create QR image in Reporting Service applications.
Bar Code Encoder In Visual Studio .NET
Using Barcode printer for Reporting Service Control to generate, create barcode image in Reporting Service applications.
DDL_DATABASE_LEVEL_EVENTS
Printing Quick Response Code In C#
Using Barcode creation for Visual Studio .NET Control to generate, create QR Code image in Visual Studio .NET applications.
QR-Code Creation In Visual Studio .NET
Using Barcode printer for ASP.NET Control to generate, create QR Code 2d barcode image in ASP.NET applications.
DDL_DATABASE SECURITY_EVENTS DDL_CERTIFICATE_EVENTS (CREATE CERTIFICATE, ALTER CERTIFICATE, DROP CERTIFICATE) DDL_USER_EVENTS (CREATE USER, ALTER USER, DROP USER)
QR Code JIS X 0510 Printer In .NET Framework
Using Barcode generator for VS .NET Control to generate, create QR Code image in VS .NET applications.
Paint QR Code 2d Barcode In VB.NET
Using Barcode generator for .NET framework Control to generate, create QR-Code image in .NET framework applications.
DDL_ROLE_EVENTS (CREATE ROLE, ALTER ROLE, DROP ROLE) DDL_APPLICATION_ROLE_EVENTS (CREATE APPROLE, ALTER APPROLE, DROP APPROLE)
Encoding UCC - 12 In .NET
Using Barcode encoder for Reporting Service Control to generate, create UPC-A image in Reporting Service applications.
Code 3/9 Creator In Visual Studio .NET
Using Barcode generation for Reporting Service Control to generate, create Code 39 image in Reporting Service applications.
DDL_SCHEMA_EVENTS (CREATE SCHEMA, ALTER SCHEMA, DROP SCHEMA)
EAN / UCC - 13 Drawer In Visual Studio .NET
Using Barcode generator for Reporting Service Control to generate, create GS1-128 image in Reporting Service applications.
Print EAN13 In VS .NET
Using Barcode creation for Reporting Service Control to generate, create EAN13 image in Reporting Service applications.
DDL_GDR_DATABASE_EVENTS (GRANT DATABASE, DENY DATABASE, REVOKE DATABASE)
Bar Code Drawer In .NET Framework
Using Barcode generator for Reporting Service Control to generate, create barcode image in Reporting Service applications.
Paint Data Matrix In Visual Studio .NET
Using Barcode drawer for Reporting Service Control to generate, create ECC200 image in Reporting Service applications.
DDL_AUTHORIZATION_DATABASE_EVENTS (ALTER AUTHORIZATION DATABASE)
USPS POSTNET Barcode Creation In .NET
Using Barcode creator for Reporting Service Control to generate, create Postnet image in Reporting Service applications.
Decode Code-39 In VS .NET
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET applications.
MCITP SQL Server 2005 Database Developer All-in-One Exam Guide
Encode DataBar In VS .NET
Using Barcode generator for Visual Studio .NET Control to generate, create GS1 DataBar Limited image in VS .NET applications.
Painting UPCA In None
Using Barcode maker for Microsoft Excel Control to generate, create UPCA image in Microsoft Excel applications.
Figure 6-20 Database-level and SSB DDL events
Making UPC Symbol In Java
Using Barcode creator for BIRT Control to generate, create UPC-A image in BIRT reports applications.
Draw Code-39 In None
Using Barcode printer for Font Control to generate, create Code39 image in Font applications.
DDL_DATABASE_LEVEL_EVENTS
USS Code 39 Generation In None
Using Barcode encoder for Office Excel Control to generate, create ANSI/AIM Code 39 image in Microsoft Excel applications.
Barcode Creator In Visual C#.NET
Using Barcode generator for .NET Control to generate, create bar code image in VS .NET applications.
DDL_SSB_EVENTS
DDL_MESSAGE_TYPE_EVENTS (CREATE MSGTYPE, ALTER MSGTYPE, DROP MSGTYPE) DDL_CONTRACT_EVENTS (CREATE CONTRACT, ALTER CONTRACT, DROP CONTRACT)
DDL_QUEUE_EVENTS (CREATE QUEUE, ALTER QUEUE, DROP QUEUE)
DDL_SERVICE_EVENTS (CREATE SERVICE, ALTER SERVICE, DROP SERVICE)
DDL_ROUTE_EVENTS (CREATE ROUTE, ALTER ROUTE, DROP ROUTE)
DDL_REMOTE_SERVICE_BINDING_EVENTS
(CREATE REMOTE_SERVICE_BINDING, ALTER REMOTE_SERVICE_BINDING, DROP REMOTE_SERVICE_BINDING)
Figure 6-21 Database-level, XML Schema Collection, and Partition events
DDL_DATABASE_LEVEL_EVENTS DDL_XML_SCHEMA_COLLECTION_EVENTS (CREATE XML SCHEMA COLLECTION, ALTER XML SCHEMA COLLECTION, DROP XML SCHEMA COLLECTION)
DDL_PARTITION_EVENTS
DDL_PARTITION_FUNCTION_EVENTS (CREATE PARTITION FUNCTION, ALTER PARTITION FUNCTION, DROP PARTITION FUNCTION)
DDL_PARTITION_SCHEME_EVENTS (CREATE PARTITION SCHEME, ALTER PARTITION SCHEME, DROP PARTITION SCHEME)
Using DDL Triggers for Auditing
One of the primary purposes of a DDL trigger is to use it for auditing changes to either the server or a database Change management has become an important concept to grasp and implement within the IT community The Gartner Group has released information from studies that indicate that as much as 80 percent of outages are due to people and processes Only about 20 percent of outage durations are due to actual hardware failure The other 80 percent is attributable to things like unauthorized changes, changes being made without following procedures, lack of procedures, human error, and other operator error or process failures With change management policies and procedures in place, when a need for a change occurs, instead of just implementing it, the process is slowed down so the impact of the change can be examined For example, modifying the schema of a table by deleting what appears to be an unused column, or renaming a column so it is more intuitive, may seem like a harmless change However, this change will adversely affect any other database objects referencing that column A critical stored procedure or a frequently queried VIEW could suddenly stop working A change management policy would allow key players to examine the change using tools such as sp_depends to identify any object dependencies In addition to change management policies and procedures, an auditing strategy can be implemented that records the changes, including who did it and when they did it
6: Advanced Database Objects
By creating an ALTER_TABLE trigger, you could catch any statements that altered a table and record the auditing information Once the change is caught, the trigger can be programmed to record it in a table within the database, record it in a table in a special auditing database, use tools like Database Mail to immediately send an e-mail to the appropriate personnel, or even roll back the change EXAM TIP Consider DDL triggers to audit schema changes to a database, or changes at the server level A DDL trigger can catch the change and then record it (such as in a database table), notify DBAs with Database Mail, and/or roll back the change In the following exercise, we ll create a DDL trigger that will prevent any changes to tables by monitoring the ALTER TABLE statement As with any trigger, you can change the content of the trigger to do what you want Exercise 66: Create a DDL Trigger to Prevent Changes to Tables 1 Open a New Query window in SSMS 2 Use the following query to create a database-scoped trigger to monitor for the ALTER TABLE statement The trigger will then give an error and roll back the statement
USE 6; GO CREATE TRIGGER NoTableChanges ON DATABASE FOR ALTER_TABLE AS RAISERROR ('Tables cannot be altered in this database', 16, 1) ROLLBACK;
3 Try to alter a table within the database with this statement:
ALTER TABLE dboZipState ADD NewColumn varChar(20) NULL;
The ALTER TABLE statement fails and is rolled back by the trigger In the following exercise, we ll create a DDL trigger that will monitor for the creation of databases and log the SQL script used to create the database in the application log We could just as easily create an audit database and log the creation of databases in a table within the audit database Exercise 67: Create a DDL Trigger to Monitor the Creation of Databases 1 Open a New Query window in SSMS 2 Use the following query to create a server-scoped trigger to monitor for the CREATE DATABASE statement The trigger gives feedback, saying the event occurred, and then logs it into the application log
Copyright © OnBarcode.com . All rights reserved.