Sunday, March 25, 2012

Check log

Hi all,
where / which table could i check the access information from the MSSQL
(i.e. which PC sent query request to my SQL server with the domain login ID,
IP, time...etc..
Thanks a lot
Rena.
Rena,
This information is not logged in any table by default. You should read
about SQL Profiler and SQL traces to see how you might capture this
information. After that you may have more specific questions.
Russell Fields
"Rena" <Rena@.mail.hongkong.com> wrote in message
news:Ob1DDbEZEHA.808@.tk2msftngp13.phx.gbl...
> Hi all,
> where / which table could i check the access information from the
MSSQL
> (i.e. which PC sent query request to my SQL server with the domain login
ID,
> IP, time...etc..
> Thanks a lot
> Rena.
>
|||Hi,
Have a look into the below procedures as well
sp_who
sp_who2
and the master..sysprocesses system table.
Note:
All the above contains the information of currently connected users.
Thanks
Hari
MCDBA
"Rena" <Rena@.mail.hongkong.com> wrote in message
news:Ob1DDbEZEHA.808@.tk2msftngp13.phx.gbl...
> Hi all,
> where / which table could i check the access information from the
MSSQL
> (i.e. which PC sent query request to my SQL server with the domain login
ID,
> IP, time...etc..
> Thanks a lot
> Rena.
>
|||Thx Russell and Hari,
as I need to keep track whether my SQL Server in my Office is access by
hostile PC / outsider, so what should be done, or if there are any turn
around stuff to be done on SQL?
Profiler might keep a hug lock even open for one night, and i do not know
which event class is the most effiecient one in this case as I am not
familiar :p
Rena.
Thx.
"Russell Fields" <RussellFields@.NoMailPlease.Com> bl
news:ew1jNCGZEHA.3168@.TK2MSFTNGP10.phx.gbl g...
> Rena,
> This information is not logged in any table by default. You should read
> about SQL Profiler and SQL traces to see how you might capture this
> information. After that you may have more specific questions.
> Russell Fields
> "Rena" <Rena@.mail.hongkong.com> wrote in message
> news:Ob1DDbEZEHA.808@.tk2msftngp13.phx.gbl...
> MSSQL
> ID,
>
|||Rena,
Profiler will not keep a huge lock, but it does require some resources. You
might try tracing the Audit Login / Logout events and, if you are interested
in what SQL is running, the SQL:BatchCompleted.
A lighter weight look might serve you as well using sp_who2 to find out who
is active at whatever interval you run it.
sp_who2 active -- only lists the active connections
You can get the results of either approach sent to your file system or to an
internal table. (For sp_who2 use osql to run a looping script in order to
send the results to a file. For Profiler, use the trace properties.)
Tracing to a table adds to the overhead and is generally recommended
against, so it depends out what your system constraints are.
Russell Fields
"Rena" <Rena@.mail.hongkong.com> wrote in message
news:uTVn7XRZEHA.3144@.TK2MSFTNGP12.phx.gbl...
> Thx Russell and Hari,
> as I need to keep track whether my SQL Server in my Office is access
by[vbcol=seagreen]
> hostile PC / outsider, so what should be done, or if there are any turn
> around stuff to be done on SQL?
> Profiler might keep a hug lock even open for one night, and i do not know
> which event class is the most effiecient one in this case as I am not
> familiar :p
> Rena.
> Thx.
>
> "Russell Fields" <RussellFields@.NoMailPlease.Com> bl
> news:ew1jNCGZEHA.3168@.TK2MSFTNGP10.phx.gbl g...
login
>
|||Thx. alot
"Russell Fields" <RussellFields@.NoMailPlease.Com> bl
news:uoVJSUfZEHA.4092@.TK2MSFTNGP11.phx.gbl g...
> Rena,
> Profiler will not keep a huge lock, but it does require some resources.
You
> might try tracing the Audit Login / Logout events and, if you are
interested
> in what SQL is running, the SQL:BatchCompleted.
> A lighter weight look might serve you as well using sp_who2 to find out
who
> is active at whatever interval you run it.
> sp_who2 active -- only lists the active connections
> You can get the results of either approach sent to your file system or to
an[vbcol=seagreen]
> internal table. (For sp_who2 use osql to run a looping script in order to
> send the results to a file. For Profiler, use the trace properties.)
> Tracing to a table adds to the overhead and is generally recommended
> against, so it depends out what your system constraints are.
> Russell Fields
> "Rena" <Rena@.mail.hongkong.com> wrote in message
> news:uTVn7XRZEHA.3144@.TK2MSFTNGP12.phx.gbl...
> by
know[vbcol=seagreen]
read[vbcol=seagreen]
the
> login
>

No comments:

Post a Comment