• 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