May 5, 2008
Below is a script I found that will help me turn on C2 auditing. The problem is that I am generating trace files that take up way too much space.
I need to know what column id and event id, so I am only turning on "failed login" and nothing else.
exec sp_trace_setevent @TraceID, x, x, @on
Code Snippet
CREATE PROC AuditTrcProc AS
-- Create a Queue
declare @rc int
declare @TraceID int
declare @maxfilesize bigint
set @maxfilesize = 1
-- Please replace the test InsertFileNameHere with an appropriate
-- filename prefixed by a path, eg.. c:MyFolderMyTrace. The .trc extention
-- will be appended to the filename automatically. If you are writing from
-- remote server to local crive, please use UNC path and make sure server has
-- write access to your network share
declare @cmd sysname
set @cmd = 'copy c: empsessiontrace.trc c: empsession' + cast(cast(rand() * 1000000 as int) as varchar)
print @cmd
exec master..xp_cmdshell @cmd
set @cmd = 'del c: empsessiontrace.trc'
print @cmd
exec master..xp_cmdshell @cmd
exec @rc = sp_trace_create @TraceID output, 2, N'c: empsessiontrace.trc', @maxfilesize, null
if (@rc != 0) goto error
-- Client side file and table cannot be scripted
-- set the events
declare @on bit
set @on = 1
exec sp_trace_setevent @TraceID, 10, 1, @on
exec sp_trace_setevent @TraceID, 10, 6, @on
exec sp_trace_setevent @TraceID, 10, 9, @on
exec sp_trace_setevent @TraceID, 10, 10, @on
exec sp_trace_setevent @TraceID, 10, 11, @on
exec sp_trace_setevent @TraceID, 10, 12, @on
exec sp_trace_setevent @TraceID, 10, 13, @on
exec sp_trace_setevent @TraceID, 10, 14, @on
exec sp_trace_setevent @TraceID, 10, 16, @on
exec sp_trace_setevent @TraceID, 10, 17, @on
exec sp_trace_setevent @TraceID, 10, 18, @on
exec sp_trace_setevent @TraceID, 12, 1, @on
exec sp_trace_setevent @TraceID, 12, 6, @on
exec sp_trace_setevent @TraceID, 12, 9, @on
exec sp_trace_setevent @TraceID, 12, 10, @on
exec sp_trace_setevent @TraceID, 12, 11, @on
exec sp_trace_setevent @TraceID, 12, 12, @on
exec sp_trace_setevent @TraceID, 12, 13, @on
exec sp_trace_setevent @TraceID, 12, 14, @on
exec sp_trace_setevent @TraceID, 12, 16, @on
exec sp_trace_setevent @TraceID, 12, 17, @on
exec sp_trace_setevent @TraceID, 12, 18, @on
exec sp_trace_setevent @TraceID, 14, 1, @on
exec sp_trace_setevent @TraceID, 14, 6, @on
exec sp_trace_setevent @TraceID, 14, 9, @on
exec sp_trace_setevent @TraceID, 14, 10, @on
exec sp_trace_setevent @TraceID, 14, 11, @on
exec sp_trace_setevent @TraceID, 14, 12, @on
exec sp_trace_setevent @TraceID, 14, 13, @on
exec sp_trace_setevent @TraceID, 14, 14, @on
exec sp_trace_setevent @TraceID, 14, 16, @on
exec sp_trace_setevent @TraceID, 14, 17, @on
exec sp_trace_setevent @TraceID, 14, 18, @on
exec sp_trace_setevent @TraceID, 15, 1, @on
exec sp_trace_setevent @TraceID, 15, 6, @on
exec sp_trace_setevent @TraceID, 15, 9, @on
exec sp_trace_setevent @TraceID, 15, 10, @on
exec sp_trace_setevent @TraceID, 15, 11, @on
exec sp_trace_setevent @TraceID, 15, 12, @on
exec sp_trace_setevent @TraceID, 15, 13, @on
exec sp_trace_setevent @TraceID, 15, 14, @on
exec sp_trace_setevent @TraceID, 15, 16, @on
exec sp_trace_setevent @TraceID, 15, 17, @on
exec sp_trace_setevent @TraceID, 15, 18, @on
exec sp_trace_setevent @TraceID, 17, 1, @on
exec sp_trace_setevent @TraceID, 17, 6, @on
exec sp_trace_setevent @TraceID, 17, 9, @on
exec sp_trace_setevent @TraceID, 17, 10, @on
exec sp_trace_setevent @TraceID, 17, 11, @on
exec sp_trace_setevent @TraceID, 17, 12, @on
exec sp_trace_setevent @TraceID, 17, 13, @on
exec sp_trace_setevent @TraceID, 17, 14, @on
exec sp_trace_setevent @TraceID, 17, 16, @on
exec sp_trace_setevent @TraceID, 17, 17, @on
exec sp_trace_setevent @TraceID, 17, 18, @on
-- Set the Filters
declare @intfilter int
declare @bigintfilter bigint
exec sp_trace_setfilter @TraceID, 10, 0, 7, N'SQL Profiler'
-- Set the trace status to start
exec sp_trace_setstatus @TraceID, 1
-- display trace id for future references
select TraceID=@TraceID
goto finish
error:
select ErrorCode=@rc
return @rc
finish:
return @TraceID
View 6 Replies
View Related
Dec 28, 2003
I can not install SQl 2000 on my new win 2003 server.
It says: setup failed to configure the server.
What should I do?
This is my Sqlstp.log file
01:51:11 Begin Setup
01:51:11 8.00.194
01:51:11 Mode = Normal
01:51:11 ModeType = NORMAL
01:51:11 GetDefinitionEx returned: 0, Extended: 0x0
01:51:11 ValueFTS returned: 1
01:51:11 ValuePID returned: 1
01:51:11 ValueLic returned: 1
01:51:11 System: Windows NT Terminal Server
01:51:11 SQL Server ProductType: Standard Edition [0x2]
01:51:11 Begin Action: SetupInitialize
01:51:11 End Action SetupInitialize
01:51:11 Begin Action: SetupInstall
01:51:11 Reading SoftwareMicrosoftWindowsCurrentVersionCommonFi
lesDir ...
01:51:11 CommonFilesDir=C:Program FilesCommon Files
01:51:11 Windows Directory=C:WINDOWS
01:51:11 Program Files=C:Program Files
01:51:11 TEMPDIR=C:WINDOWSTEMP
01:51:11 Begin Action: SetupInstall
01:51:11 digpid size : 256
01:51:11 digpid size : 164
01:51:11 Begin Action: CheckFixedRequirements
01:51:11 Platform ID: 0xf00
01:51:11 Version: 5.2.3790
01:51:11 File Version - C:WINDOWSsystem32shdocvw.dll: 6.0.3790.94
01:51:11 End Action: CheckFixedRequirements
01:51:11 Begin Action: ShowDialogs
01:51:11 Initial Dialog Mask: 0x183000f7, Disable Back=0x1
01:51:11 Begin Action ShowDialogsHlpr: 0x1
01:51:11 Begin Action: DialogShowSdWelcome
01:51:12 End Action DialogShowSdWelcome
01:51:12 Dialog 0x1 returned: 1
01:51:12 End Action ShowDialogsHlpr
01:51:12 ShowDialogsGetDialog returned: nCurrent=0x2,index=1
01:51:12 Begin Action ShowDialogsHlpr: 0x2
01:51:12 Begin Action: DialogShowSdMachineName
01:51:14 ShowDlgMachine returned: 1
01:51:14 Name = ETOUCHHOST, Type = 0x1
01:51:14 Begin Action: CheckRequirements
01:51:14 Processor Architecture: x86 (Pentium)
01:51:14 ComputerName: ETOUCHHOST
01:51:14 User Name: Administrator
01:51:14 IsAllAccessAllowed returned: 1
01:51:14 OS Language: 0xc09
01:51:14 End Action CheckRequirements
01:51:14 This combination of Package and Operating System allows a full product install.
01:51:14 CreateSetupTopology(ETOUCHHOST), Handle : 0x1134168, returned : 0
01:51:14 CreateSetupTopology returned : 0, Handle : 0x1134168
01:51:14 Topology Type : 1, Return Value : 0
01:51:14 ST_GetPhysicalNode returned : 0, PNHandle : 0x11341b8
01:51:14 PN_EnumerateEx returned : 0
01:51:14 PN_GetSQLStates returned : 0, SqlStates : 0x0
01:51:14 PN_StartScan [0x11341b8] returned : 0
01:51:14 PN_GetNext [0x11341b8] returned : 18, Handle: [0x0]
01:51:14 No more items in enumeration.
01:51:14 ReleaseSetupTopology
01:51:14 Named instance limit: 100, quota: 0
01:51:14 End Action DialogShowSdMachineName
01:51:14 begin ShowDialogsUpdateMask
01:51:14 nFullMask = 0x183000f7, nCurrent = 0x2, nDirection = 0
01:51:14 Updated Dialog Mask: 0xbf00037, Disable Back = 0x1
01:51:14 Dialog 0x2 returned: 0
01:51:14 End Action ShowDialogsHlpr
01:51:14 ShowDialogsGetDialog returned: nCurrent=0x4,index=2
01:51:14 Begin Action ShowDialogsHlpr: 0x4
01:51:14 Begin Action: DialogShowSdInstallMode
01:51:15 ShowDlgInstallMode returned: 1
01:51:15 InstallMode : 0x1
01:51:15 End Action DialogShowSdInstallMode
01:51:15 begin ShowDialogsUpdateMask
01:51:15 nFullMask = 0xbf00037, nCurrent = 0x4, nDirection = 1
01:51:15 Updated Dialog Mask: 0x1bf40037, Disable Back = 0x1
01:51:15 Dialog 0x4 returned: 1
01:51:15 End Action ShowDialogsHlpr
01:51:15 ShowDialogsGetDialog returned: nCurrent=0x10,index=4
01:51:15 Begin Action ShowDialogsHlpr: 0x10
01:51:15 Begin Action: DialogShowSdRegisterUserEx
01:51:24 End Action DialogShowSdRegisterUserEx
01:51:24 Dialog 0x10 returned: 1
01:51:24 End Action ShowDialogsHlpr
01:51:24 ShowDialogsGetDialog returned: nCurrent=0x20,index=5
01:51:24 Begin Action ShowDialogsHlpr: 0x20
01:51:24 Begin Action: DialogShowSdLicense
01:51:27 End Action DialogShowSdLicense
01:51:27 Dialog 0x20 returned: 1
01:51:27 End Action ShowDialogsHlpr
01:51:27 ShowDialogsGetDialog returned: nCurrent=0x40000,index=18
01:51:27 Begin Action ShowDialogsHlpr: 0x40000
01:51:27 Begin Action: DialogShowSdCliSvr
01:51:27 DisplaySystemPreReq
01:51:28 ShowDlgClientServerSelect returned: 1
01:51:28 Type : 0x2
01:51:28 End Action DialogShowSdCliSvr
01:51:28 begin ShowDialogsUpdateMask
01:51:28 nFullMask = 0x1bf40037, nCurrent = 0x40000, nDirection = 1
01:51:28 Updated Dialog Mask: 0x1bfc0037, Disable Back = 0x1
01:51:28 Dialog 0x40000 returned: 1
01:51:28 End Action ShowDialogsHlpr
01:51:28 ShowDialogsGetDialog returned: nCurrent=0x80000,index=19
01:51:28 Begin Action ShowDialogsHlpr: 0x80000
01:51:28 Begin Action: DialogShowSdInstanceName
01:51:28 Begin Action: ShowDlgInstanceName
01:51:29 End Action: ShowDlgInstanceName
01:51:29 ShowDlgInstanceName returned : 1
01:51:29 InstanceName : MSSQLSERVER
01:51:29 CreateSetupTopology(ETOUCHHOST), Handle : 0x1134730, returned : 0
01:51:29 CreateSetupTopology returned : 0, Handle : 0x1134730
01:51:29 Topology Type : 1, Return Value : 0
01:51:29 ST_GetPhysicalNode returned : 0, PNHandle : 0x11341b8
01:51:29 PN_EnumerateEx returned : 0
01:51:29 PN_GetSQLStates returned : 0, SqlStates : 0x0
01:51:29 PN_StartScan [0x11341b8] returned : 0
01:51:29 PN_GetNext [0x11341b8] returned : 18, Handle: [0x0]
01:51:29 No more items in enumeration.
01:51:29 ReleaseSetupTopology
01:51:29 End Action DialogShowSdInstanceName
01:51:29 begin ShowDialogsUpdateMask
01:51:29 nFullMask = 0x1bfc0037, nCurrent = 0x80000, nDirection = 1
01:51:29 Updated Dialog Mask: 0x1bfc0037, Disable Back = 0x1
01:51:29 Dialog 0x80000 returned: 1
01:51:29 End Action ShowDialogsHlpr
01:51:29 ShowDialogsGetDialog returned: nCurrent=0x100000,index=20
01:51:29 Begin Action ShowDialogsHlpr: 0x100000
01:51:29 Begin Action: DialogShowSdSetupType
01:51:29 Begin Action: Setup Type
01:51:31 SQL program folder: C:Program FilesMicrosoft SQL Server
01:51:31 SQL data folder: C:Program FilesMicrosoft SQL Server
01:51:31 Windows system folder: C:WINDOWSsystem32
01:51:31 Prog req: 38205, Data req: 34432, Sys req: 182917
01:51:31 Prog avail: 73899760, Data avail: 73899760, Sys avail: 73899760
01:51:31 Prog req vs. avail, 255554, 73899760
01:51:31 Data req vs. avail, 34432, 73899760
01:51:31 Sys req vs. avail, 217349, 73899760
01:51:31 DisplaySystemPreReq
01:51:31 [SetupTypeSQL]
01:51:31 szDir = C:Program FilesMicrosoft SQL Server
01:51:31 szDir = %PROGRAMFILES%Microsoft SQL Server
01:51:31 Result = 301
01:51:31 szDataDir = C:Program FilesMicrosoft SQL Server
01:51:31 szDataDir = %PROGRAMFILES%Microsoft SQL Server
01:51:31 End Action: Setup Type
01:51:31 Setup Type: Typical (301)
01:51:31 End Action DialogShowSdSetupType
01:51:31 begin ShowDialogsUpdateMask
01:51:31 nFullMask = 0x1bfc0037, nCurrent = 0x100000, nDirection = 301
01:51:31 Updated Dialog Mask: 0x1bdc0037, Disable Back = 0x1
01:51:31 Dialog 0x100000 returned: 301
01:51:31 End Action ShowDialogsHlpr
01:51:31 ShowDialogsGetDialog returned: nCurrent=0x400000,index=22
01:51:31 Begin Action ShowDialogsHlpr: 0x400000
01:51:31 Begin Action: DlgServices
01:51:36 ShowDlgServices returned: 1
01:51:36 [DlgServices]
01:51:36 Local-Domain = 3855
01:51:36 AutoStart = 15
01:51:36 Result = 1
01:51:36 End Action DlgServices
01:51:36 begin ShowDialogsUpdateMask
01:51:36 nFullMask = 0x1bdc0037, nCurrent = 0x400000, nDirection = 1
01:51:36 Updated Dialog Mask: 0x1bdc0037, Disable Back = 0x1
01:51:36 Dialog 0x400000 returned: 1
01:51:36 End Action ShowDialogsHlpr
01:51:36 ShowDialogsGetDialog returned: nCurrent=0x800000,index=23
01:51:36 Begin Action ShowDialogsHlpr: 0x800000
01:51:36 Begin Action: DlgSQLSecurity
01:51:38 ShowDlgSQLSecurity returned: 1
01:51:38 LoginMode = 1,szPwd
01:51:38 End Action DlgSQLSecurity
01:51:38 begin ShowDialogsUpdateMask
01:51:38 nFullMask = 0x1bdc0037, nCurrent = 0x800000, nDirection = 1
01:51:38 Updated Dialog Mask: 0x1bdc0037, Disable Back = 0x1
01:51:38 Dialog 0x800000 returned: 1
01:51:38 End Action ShowDialogsHlpr
01:51:38 ShowDialogsGetDialog returned:
View 11 Replies
View Related
Nov 2, 2007
Hello Everyone,
I am new to the creation of SQL Servers and databases, I have only use SQL statements in code in the past, and I have encountered a problem in my first SQL Server 2000 setup...
I am trying to setup a database in SQL Server 2000 called Equipment, which will contain multiple tables corresponding to the names of different equipment being used. I am able to create that just fine, but my problem occurs when I try to create login names for that database. For the database to correctly interface with another program already in use I need two login names, "Equip" that has full access and "Equip_ReadOnly" that is unable to delete, insert, or update. The problem is that I wish for those two login names to be accessing the same tables within the database, so that any changes made by Equip will be seen by Equip_ReadOnly. However, when I try to do this I end up with two sets of tables, one owned by Equip and the other owned by Equip_ReadOnly.
I am able to accomplish what I want in SQL Server 2005 by using the dbo schema to contain the tables and then have Equip and Equip_ReadOnly as users of the dbo schema, but for this project I am unable to use SQL Server 2005. So far I have been unable to figure out how to accomplish this task using SQL Server Enterprise Manager. So, does anyone have any ideas or insight into this particular problem? I am stuck at the moment and any help would be appreciated.
Thanks
P.S. If this was the wrong forum to post this question in, please point me to the correct forum. Thanks Again.
View 5 Replies
View Related