Home > Archive > microsoft.public.sqlserver.server > October 2002 > execute sp_cycle_errorlog





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author execute sp_cycle_errorlog
maris

2002-10-31, 8:23 am

I am trying to execute stored procedure sp_cycle_errorlog
and am getting the following message:

Server: Msg 15003, Level 16, State 1, Procedure
sp_cycle_errorlog, Line 5
Only members of the sysadmin role can execute this stored
procedure.

My userID is a member of the sysadmin role. Is there
a command to see who I am logged on as?

Thanks,
Dejan Sarka

2002-10-31, 8:23 am

The SUSER_SNAME() function gives you Win login and USER_NAME() db user:

SELECT SUSER_SNAME(), USER_NAME()

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"maris" <mritley@kent.edu> wrote in message
news:d8cd01c280e0$46094f00$39e
f2ecf@TKMSFTNGXA08...
> I am trying to execute stored procedure sp_cycle_errorlog
> and am getting the following message:
>
> Server: Msg 15003, Level 16, State 1, Procedure
> sp_cycle_errorlog, Line 5
> Only members of the sysadmin role can execute this stored
> procedure.
>
> My userID is a member of the sysadmin role. Is there
> a command to see who I am logged on as?
>
> Thanks,



Tibor Karaszi

2002-10-31, 9:23 am

I assume that you are on SQL7?

There's a bug in the sp_cycle_errorlog in SQL7. It does a check against "sa" instead of
sysadmin. I would assume that this is fixed on some service pack. You can also execute the dbcc
command directly (read the source code for sp_cycle_errorlog to find which DBCC command).

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ublic.sqlserver


"maris" <mritley@kent.edu> wrote in message news:d8cd01c280e0$46094f00$39e
f2ecf@TKMSFTNGXA08...
> I am trying to execute stored procedure sp_cycle_errorlog
> and am getting the following message:
>
> Server: Msg 15003, Level 16, State 1, Procedure
> sp_cycle_errorlog, Line 5
> Only members of the sysadmin role can execute this stored
> procedure.
>
> My userID is a member of the sysadmin role. Is there
> a command to see who I am logged on as?
>
> Thanks,



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net