#眉標=SQL Server 2008 #副標=SQL Server 2008新功能概覽(3) #大標=剖析資料庫集中控管機制 #作者=文/胡百敬 ===<反灰>============= C:\Documents and Settings\\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\RegSvr.xml ================ ===<反灰>============= SELECT @@SERVERNAME ServerName, @@VERSION Version, @@SPID spid ================ ===<反灰>============= USE [Northwind] CREATE APPLICATION ROLE [myAppRole] WITH PASSWORD = N'password' ================ ===<反灰>============= Policy 'CheckAppRoleName' has been violated by '/Server/(local)/Database/Northwind/ApplicationRole/myAppRole'. This transaction will be rolled back. Policy description: '' Additional help: '' : ''. Msg 3609, Level 16, State 1, Procedure sp_syspolicy_dispatch_event, Line 50 The transaction ended in the trigger. The batch has been aborted. ================ ===<反灰>============= CREATE APPLICATION ROLE [arAppRole] WITH PASSWORD = N'password' ================ ===<反灰>============= C:\Program Files\Microsoft SQL Server\100\Tools\Policies\DatabaseEngine\1033 ================ ===<反灰>============= Raiserror(N'自訂錯誤',16,1) WITH LOG ================ ===<反灰>============= IsNull(ExecuteWql('Numeric', 'root\CIMV2', 'select EventCode from Win32_NTLogEvent where EventCode=17063 and Logfile="Application"'), 0) ================