tag:blogger.com,1999:blog-231653091796010968.post2752195937001927374..comments2023-08-16T18:02:18.077+05:00Comments on MS SQL Server Solutions: Script to get Login's Server and Database level permissionsWHAT IS A BLOG ?http://www.blogger.com/profile/16150461471279568272noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-231653091796010968.post-76176162578659040202013-10-25T23:28:58.441+05:002013-10-25T23:28:58.441+05:00Very nice script.
A valuable addition would be to ...Very nice script.<br />A valuable addition would be to add the actual name and type of the object on which a permission was given for example OBJECT_OR_COLUMN; usp_something; Stored ProcedureWilkonoreply@blogger.comtag:blogger.com,1999:blog-231653091796010968.post-12579552804832587632013-09-21T14:17:51.402+05:002013-09-21T14:17:51.402+05:00There are two things wrong with this.
1. Missing ...There are two things wrong with this.<br /><br />1. Missing single quote in the Database Fixed Role section, which causes the entire script parse to fail.<br /><br />2. The table alias specified in the join within the Server Fixed Roles section is incorrect. Should be 'SLogins' but is specified as 'Logins'. This does not cause the script parse to fail, but does cause the script Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-231653091796010968.post-55477489119174227302013-08-21T19:00:45.131+05:002013-08-21T19:00:45.131+05:00Script does not work.
Fails with err.
Msg 102, Lev...Script does not work.<br />Fails with err.<br />Msg 102, Level 15, State 1, Line 38<br />Incorrect syntax near 'DRoles'.<br />Msg 105, Level 15, State 1, Line 59<br />Unclosed quotation mark after the character string ') <br /><br />SELECT * FROM #DBPERMISSIONS ORDER BY 1<br /><br />Drop Table #DBPermissions<br /><br />Drop Table #DBs<br /><br />End<br />'.<br /><br />Anonymousnoreply@blogger.com