Professional Web Applications Themes

exec sp_cycle_errorlog - Microsoft SQL / MS SQL Server

i logged in as a memeber (not SA account) of sysadmin server role. But when i executed this query: exec sp_cycle_errorlog it returned: Server: Msg 15003, Level 16, State 1, Line 1 Only members of the sysadmin role can execute this stored procedure. but when i logged in as SA, it worked fine. anyone can help i have SQL Server 7 SP4 installed on one machine (NT server sp6a) and SQL management tools (SP4 applied) installed on another machine (win2k sp3)....

  1. #1

    Default exec sp_cycle_errorlog

    i logged in as a memeber (not SA account) of sysadmin server role. But when
    i executed this query:

    exec sp_cycle_errorlog

    it returned:

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

    but when i logged in as SA, it worked fine.

    anyone can help

    i have SQL Server 7 SP4 installed on one machine (NT server sp6a) and SQL
    management tools (SP4 applied) installed on another machine (win2k sp3).


    Bill Guest

  2. #2

    Default Re: exec sp_cycle_errorlog

    I just tested this on SQL Server 2000, sp3, as a member of the sysadmin
    role, and it worked fine. Maybe things were different in in SQL 7, which I
    don't have now.

    Can you verify that you really are a member of the sysadmin role?

    After you connect as this other ID in Query yzer, run this:

    select is_srvrolemember('sysadmin')

    If it returns 1, you ARE in the sysadmin role.

    --
    HTH
    ----------------
    Kalen Delaney
    SQL Server MVP
    www.SolidQualityLearning.com


    "Bill Kan" <com> wrote in message
    news:phx.gbl... 
    when 


    Kalen Guest

  3. #3

    Default Re: exec sp_cycle_errorlog

    Ok, so it is different in SQL 2000. SQL 2000 tests for
    is_srvrolemember('sysadmin') < >1.

    You can actually recreate this procedure and change it to match the SQL 2000
    version.

    --
    HTH
    ----------------
    Kalen Delaney
    SQL Server MVP
    www.SolidQualityLearning.com


    "Bill Kan" <com> wrote in message
    news:phx.gbl... 
    > when [/ref]
    SQL 
    >
    >[/ref]


    Kalen Guest

Similar Threads

  1. exec()
    By manu in forum PHP Development
    Replies: 6
    Last Post: July 13th, 09:53 PM
  2. exec() function
    By Weapons of Mass Destruction in forum PHP Development
    Replies: 1
    Last Post: November 19th, 08:55 AM
  3. SSH and EXEC problem
    By Frederic Lhoest in forum PHP Development
    Replies: 0
    Last Post: September 16th, 02:17 PM
  4. How to exec PHP as CGI
    By Lowell Allen in forum PHP Development
    Replies: 0
    Last Post: August 27th, 08:49 PM
  5. Replies: 0
    Last Post: December 10th, 09:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139