Monday, February 20, 2012

logging of activity on database

I want to make an investigation on the activity of the sql-server. This
means not only logins , but I want to know also the sql-commands which are
done. Is this already logged and captured in a database (in msdb for
example).
A second question: can i also see the CPU-activity of the computer where the
sql-server is put on. I have full connection to the sql-server, but i do not
have administration permission to that computer.
Thank you.
Johan
Use SQL Server Profiler for this purpose
http://www.sql-server-performance.co...filer_tips.asp
"johan Goris" <johangoris@.rewah.com> wrote in message
news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
> I want to make an investigation on the activity of the sql-server. This
> means not only logins , but I want to know also the sql-commands which are
> done. Is this already logged and captured in a database (in msdb for
> example).
> A second question: can i also see the CPU-activity of the computer where
the
> sql-server is put on. I have full connection to the sql-server, but i do
not
> have administration permission to that computer.
> Thank you.
>
|||Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
though I understand SQL 2005 would not need that. If you want to see the
CPU activity, the best you can do is SELECT @.@.CPU_BUSY. For SQL related
counters, you can use SELECT * FROM master..sysperfinfo
You could set up Performance Monitor on your server to log counters to a
table on your database, though I think it's only available on WinXP and
Win2003 (someone correct me here). Alternatively, I use a custom built tool
to collect and store local and remote performance counters from Win2000
servers to a SQL Server table.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uq3zLjEVEHA.3512@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Johan
> Use SQL Server Profiler for this purpose
> http://www.sql-server-performance.co...filer_tips.asp
>
>
>
> "johan Goris" <johangoris@.rewah.com> wrote in message
> news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
are
> the
> not
>
|||Peter Yeoh wrote:
> Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
> though I understand SQL 2005 would not need that.
i don't like that. i hope there's a way to prevent people that aren't
SAs from running profiler.
|||Perhaps I misphrased my statement regarding SQL2005. What I meant to say
was that to run Profiler in SQL2005, you still need to assign rights, but
not the sysadmin rights. It's actually an improvement then.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"ch" <ch@.dontemailme.com> wrote in message
news:40D19EF9.5B69D37E@.dontemailme.com...
> Peter Yeoh wrote:
> i don't like that. i hope there's a way to prevent people that aren't
> SAs from running profiler.

No comments:

Post a Comment