Showing posts with label capture. Show all posts
Showing posts with label capture. Show all posts

Sunday, March 11, 2012

Auditing Question

Suppose I would like to mimic SQL Profiler. That is I would like to capture
every sql statement issued to my SQL Server.
What are my options? Obviously I could find a log reader and read
update,insert or delete statements but I would like to capture exec and
select statements too. I would like to capture all T-SQL statements just as
SQL Profiler does. Can I do this?You can start a trace using system procedures as well (Profiler is actually
client-side tool that uses those traces). Check the sp_trace* procedures.
Note that you can create a trace with Profiler and then save it as a script
as well, so you don't have to do the programming part.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"JI" <anonymous@.discussions.microsoft.com> wrote in message
news:uT6IDt$GEHA.2576@.TK2MSFTNGP11.phx.gbl...
> Suppose I would like to mimic SQL Profiler. That is I would like to
capture
> every sql statement issued to my SQL Server.
> What are my options? Obviously I could find a log reader and read
> update,insert or delete statements but I would like to capture exec and
> select statements too. I would like to capture all T-SQL statements just
as
> SQL Profiler does. Can I do this?
>
>

Wednesday, March 7, 2012

Audit Logins

We are having an issue with an application connecting to
our database. In order to capture the login failures, I
went into Enterprise Manager properties and went to the
security tab. I then selected that audit level = all,
which to me means it audits all logins. However, when I
connect either correctly or with erros, there is nothing
written to the SQL Server Logs.
I tried to find more info in BOL's but couldn't. Where is
the audit info logged?
I now have a trace set up via profiler, but would still
like to understand why the 'audit level' via enterprise
manager didn't work. (I even ran a reconfig)
Thanks
SusanYou have to stop/restart the sql server service for this to take effect, and
the login failures will be in the SQL Server log.
"Susan" <anonymous@.discussions.microsoft.com> wrote in message
news:8efc01c3e9b9$663bc300$a601280a@.phx.gbl...
> We are having an issue with an application connecting to
> our database. In order to capture the login failures, I
> went into Enterprise Manager properties and went to the
> security tab. I then selected that audit level = all,
> which to me means it audits all logins. However, when I
> connect either correctly or with erros, there is nothing
> written to the SQL Server Logs.
> I tried to find more info in BOL's but couldn't. Where is
> the audit info logged?
> I now have a trace set up via profiler, but would still
> like to understand why the 'audit level' via enterprise
> manager didn't work. (I even ran a reconfig)
> Thanks
> Susan
>

Audit Logins

We are having an issue with an application connecting to
our database. In order to capture the login failures, I
went into Enterprise Manager properties and went to the
security tab. I then selected that audit level = all,
which to me means it audits all logins. However, when I
connect either correctly or with erros, there is nothing
written to the SQL Server Logs.
I tried to find more info in BOL's but couldn't. Where is
the audit info logged?
I now have a trace set up via profiler, but would still
like to understand why the 'audit level' via enterprise
manager didn't work. (I even ran a reconfig)
Thanks
SusanYou have to stop/restart the sql server service for this to take effect, and
the login failures will be in the SQL Server log.
"Susan" <anonymous@.discussions.microsoft.com> wrote in message
news:8efc01c3e9b9$663bc300$a601280a@.phx.gbl...
quote:

> We are having an issue with an application connecting to
> our database. In order to capture the login failures, I
> went into Enterprise Manager properties and went to the
> security tab. I then selected that audit level = all,
> which to me means it audits all logins. However, when I
> connect either correctly or with erros, there is nothing
> written to the SQL Server Logs.
> I tried to find more info in BOL's but couldn't. Where is
> the audit info logged?
> I now have a trace set up via profiler, but would still
> like to understand why the 'audit level' via enterprise
> manager didn't work. (I even ran a reconfig)
> Thanks
> Susan
>

Audit Level None still auditing failed logins

Do I need to restart SQL Services when i change the audit level to none so
that i do not capture failed logins in the error logs.
If so, is there any other way i can avoid logging those changes without
restarting the SQL Server as its in production.
Also how to do i retain only maybe 10 SQL error log files . We run
sp_cycle_errorlog every 4 days and is there a way to roll over after 10
files only...cos now we see errorlog files that go through errorlog.21,
errorlog.22 and so on till i have to delete them manually. Id like to have
maybe just 5 or 10 of them before they can be overwritten.
ThanksYou will have to recycle SQL Server to stop the audit logging. There is not
another way to stop it.
Rand
This posting is provided "as is" with no warranties and confers no rights.