July 17, 2009 at 2:14 pm
Comments posted to this topic are about the item The Complete SQL Server 2005 Permissions Report
August 3, 2009 at 12:40 am
Thanks! This is great. Do you have a version that is compatible with SQL 2008?
Adam Durr
Remote DBA support
www.bluegecko.net
August 3, 2009 at 5:28 am
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
August 3, 2009 at 6:32 am
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
August 3, 2009 at 7:25 am
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.
August 3, 2009 at 7:45 am
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
August 3, 2009 at 8:24 am
This is cleaned up. Works great. Thanks for the great script.
Jon
August 3, 2009 at 8:36 am
Thank you very much it works!
August 3, 2009 at 9:12 am
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.
August 3, 2009 at 10:00 am
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
August 3, 2009 at 11:07 am
I have run this against SQL 2008 Enterprise x64 and it works the same as SQL 2005 Enterprise x64.
August 3, 2009 at 11:10 am
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.
August 3, 2009 at 11:31 am
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.
August 3, 2009 at 12:46 pm
The format problem is resolved. The script in the original post should work now.
January 28, 2010 at 10:18 am
Richard, what kind of use policy does this script concern?
Viewing 15 posts - 1 through 15 (of 19 total)
You must be logged in to reply to this topic. Login to reply