|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 12:13 PM
Points: 115,
Visits: 288
|
|
I tried using Greg's script and it works perfectly for my needs on my production server, but when I attempt to run it on my test server, I'm getting a strange error. Both servers are running SQL Server 2005 sp2
Does anyone have any idea what might be causing this?
An error occurred while executing batch. Error message is: The directory name is invalid.
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:56 PM
Points: 754,
Visits: 1,891
|
|
Can you provide the script or link to it that you are using?
Are all the directories you have referenced in the script valid?
-------------------------------------------------------------- Shawn Melton @wshawnmelton
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 12:13 PM
Points: 115,
Visits: 288
|
|
This is the script. The username exists and has permissions. I can run this script on my local install of SSMS remotely connected to the test server. I can run the script on my production server. I just can't run it in SSMS on the test server itself. I'm not really referencing any directories. That's why this error message is so confusing.
declare @username as varchar(50) set @username = 'cashnet'
select O.name, permission_name from sys.database_permissions join sys.sysusers U on grantee_principal_id = uid join sys.sysobjects O on major_id = id where U.name = @username order by O.name
|
|
|
|