i'm new in perl. I would like to know how to extract data from sql log file and stored it into 2 differents directory??
Here are a sample of sql log file:
2002-11-06 19:16:04.24 kernel Microsoft SQL Server 7.00 - 7.00.623 (Intel X86)
Nov 23 1998 21:08:09
Copyright (c) 1988-1998 Microsoft Corporation
Desktop Edition on Windows NT 5.1 (Build 2600: )
2002-11-06 19:16:04.31 kernel Copyright (C) 1988-1997
Microsoft Corporation.
2002-11-06 19:16:04.31 kernel All rights reserved.
2002-11-06 19:16:04.31 kernel Logging SQL Server
messages in
file 'd:\sql\log\ERRORLOG'.
2002-11-06 19:16:04.49 kernel initconfig: Number of user
connections limited to
32767.
2002-11-06 19:16:04.49 kernel SQL Server is starting at
priority class 'normal'(1
CPU detected).
2002-11-06 19:16:04.74 kernel User Mode Scheduler
configured for thread
processing
2002-11-06 19:16:06.27 server Directory Size: 5387
2002-11-06 19:16:06.29 spid1 Using dynamic lock
allocation. [500] Lock
Blocks, [1000] Lock Owner
Blocks
2002-11-06 19:16:06.29 spid1 Starting up
database 'master'.
2002-11-06 19:16:06.29 spid1 Opening file
d:\sql\data\master.mdf.
2002-11-06 19:16:06.33 spid1 Opening file
d:\sql\data\mastlog.ldf.
How can I extract this file into 2 directory such as USER and EVENT?
USER dir will contain date&time and user (example: spid1)
EVENT dir will contain all 3 types of data, date&time,user id and also event
How to escape from this few line?
7.00 - 7.00.623 (Intel X86)
Nov 23 1998 21:08:09
Copyright (c) 1988-1998 Microsoft Corporation
Desktop Edition on Windows NT 5.1 (Build 2600: )
THANK A LOT FOR YOUR HELP!!
Here are a sample of sql log file:
2002-11-06 19:16:04.24 kernel Microsoft SQL Server 7.00 - 7.00.623 (Intel X86)
Nov 23 1998 21:08:09
Copyright (c) 1988-1998 Microsoft Corporation
Desktop Edition on Windows NT 5.1 (Build 2600: )
2002-11-06 19:16:04.31 kernel Copyright (C) 1988-1997
Microsoft Corporation.
2002-11-06 19:16:04.31 kernel All rights reserved.
2002-11-06 19:16:04.31 kernel Logging SQL Server
messages in
file 'd:\sql\log\ERRORLOG'.
2002-11-06 19:16:04.49 kernel initconfig: Number of user
connections limited to
32767.
2002-11-06 19:16:04.49 kernel SQL Server is starting at
priority class 'normal'(1
CPU detected).
2002-11-06 19:16:04.74 kernel User Mode Scheduler
configured for thread
processing
2002-11-06 19:16:06.27 server Directory Size: 5387
2002-11-06 19:16:06.29 spid1 Using dynamic lock
allocation. [500] Lock
Blocks, [1000] Lock Owner
Blocks
2002-11-06 19:16:06.29 spid1 Starting up
database 'master'.
2002-11-06 19:16:06.29 spid1 Opening file
d:\sql\data\master.mdf.
2002-11-06 19:16:06.33 spid1 Opening file
d:\sql\data\mastlog.ldf.
How can I extract this file into 2 directory such as USER and EVENT?
USER dir will contain date&time and user (example: spid1)
EVENT dir will contain all 3 types of data, date&time,user id and also event
How to escape from this few line?
7.00 - 7.00.623 (Intel X86)
Nov 23 1998 21:08:09
Copyright (c) 1988-1998 Microsoft Corporation
Desktop Edition on Windows NT 5.1 (Build 2600: )
THANK A LOT FOR YOUR HELP!!