The Complete SQL Server 2005 Permissions Report

  • Richard Lu-422582

    SSC-Addicted

    Points: 417

    Comments posted to this topic are about the item The Complete SQL Server 2005 Permissions Report

  • Adam Durr

    SSCommitted

    Points: 1755

    Thanks! This is great. Do you have a version that is compatible with SQL 2008?

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • nhaberl

    SSC Veteran

    Points: 251

    Hello!

    I'm using SQL Server 2005 Standard and the script is not running.

    Always get a syntax error on the first select statement.

    Any suggestions?

    I can't find any error...

    beste regards

    Norbert

  • William Soranno

    SSCommitted

    Points: 1608

    I am using SQL Server 2005 Enterprise Edition (x64) and getting the following errors:

    Msg 102, Level 15, State 1, Line 11

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 41

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 68

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 74

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 85

    Incorrect syntax near '?'.

    Msg 137, Level 15, State 2, Line 90

    Must declare the scalar variable "@CurrentDB".

    Msg 137, Level 15, State 2, Line 96

    Must declare the scalar variable "@CurrentDB".

    Msg 137, Level 15, State 2, Line 131

    Must declare the scalar variable "@SQLCmd".

    Msg 137, Level 15, State 2, Line 133

    Must declare the scalar variable "@CurrentDB".

    Msg 102, Level 15, State 1, Line 141

    Incorrect syntax near '?'.

    RedGate SQLPrompt reports an error starting on line 32 ( as copied directly from the post):

    r.is_disabled,

    Bill Soranno
    MCP, MCTS, MCITP DBA
    Database Administrator
    Winona State University
    Maxwell 143

    "Quality, like Success, is a Journey, not a Destination" - William Soranno '92

  • MelS-512196

    SSC Eights!

    Points: 842

    If you copy the script from the web page into a SQL query it contains non-printing characters that Transact-SQL does not like. If you copy the script into notepad first, you will see the non-printing characters.

    To make the script runnable, you can use the find/replace function in notepad to replace the non-printing characters with an empty string.

  • odeddror

    SSC Eights!

    Points: 878

    Hi there,

    After copy and paste into notepad it still give me an syntax error

    Can you type it inside sql and attach it as a script

    no matter what I do it still give syntax error

    Thanks,

    Ed Dror

  • jon.malenfant

    Grasshopper

    Points: 19

    This is cleaned up. Works great. Thanks for the great script.

    Jon

  • odeddror

    SSC Eights!

    Points: 878

    Thank you very much it works!

  • randal.schmidt

    Mr or Mrs. 500

    Points: 501

    I am getting a bunch of syntax errors:

    Msg 102, Level 15, State 1, Line 11

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 41

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 68

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 74

    Incorrect syntax near '?'.

    Msg 102, Level 15, State 1, Line 85

    Incorrect syntax near '?'.

    Msg 137, Level 15, State 2, Line 90

    Must declare the scalar variable "@CurrentDB".

    Msg 137, Level 15, State 2, Line 96

    Must declare the scalar variable "@CurrentDB".

    Msg 137, Level 15, State 2, Line 131

    Must declare the scalar variable "@SQLCmd".

    Msg 137, Level 15, State 2, Line 133

    Must declare the scalar variable "@CurrentDB".

    Msg 102, Level 15, State 1, Line 141

    Incorrect syntax near '?'.

    Any ideas? I have tried to clean up the script but still get errors.

    Thanks.

  • Adam Durr

    SSCommitted

    Points: 1755

    Thanks for the help getting this script to work. It is not apparent immediately because you cannot see the extra spaces(blocks). You have to paste the script into notepad and then you can see the extra blocks at the beginning of each line.

    You also have to go to line 84 and add a space after @CurrentDB so the line looks like

    DECLARE @CurrentDB sysname

    Do this and the script works!

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • Rick Romack

    Ten Centuries

    Points: 1232

    I have run this against SQL 2008 Enterprise x64 and it works the same as SQL 2005 Enterprise x64.

  • lindsey.mundy

    SSC Journeyman

    Points: 79

    The version contained in the link from jon.malenfant above works great (even on SQL 2008). I could not see any issues in the script, even with notepad, so thanks jon.

  • Richard Lu-422582

    SSC-Addicted

    Points: 417

    Sorry Guys... There was something wrong with the web editor. I have just resubmitted the script by removing all the ?. But until the script gets published again here, you might have to DIY removing the ? in the script, or use jon.malenfant's attachment http://www.sqlservercentral.com/Forums/Attachment3739.aspx. Thanks jon.

  • Richard Lu-422582

    SSC-Addicted

    Points: 417

    The format problem is resolved. The script in the original post should work now.

  • tim.bosman

    Grasshopper

    Points: 19

    Richard, what kind of use policy does this script concern?

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic. Login to reply