fuzzyocelot
Programmer
I can’t seem to figure this out so hopefully someone has some good advice.
I’m trying to create administrative reports for DBAs to simplify our daily check of the database servers (SQL 2000 and 2005). Since we have many servers (15+), I was hoping to create a generic login across the servers that would be used for the data source connections in these reports. This way we wouldn’t have to modify lots of report data sources every time we change our dba passwords (which occurs on a regular basis). However, this whole thing is proving to be difficult.
As a starting point, I created a view in our utilities database on a development server that displays a list of all SQL logins that were recently created or updated along with some other information. The system views it uses are sys.sysdatabases and sys.syslogins. Since I have sysadmin permissions, it runs fine when I run it. However, it returns no data when I use the generic login I created. I created a user account for the generic login in the master database and utilities. I tried to give the generic login read permissions to the view I created and to the master database via db_datareader. It’s not working, though. I still don’t get any data returned when I use the generic login to select on the view. I really don’t want to grant select on the individual system views if I don’t have to.
I’m sure the system views were designed this way on purpose. How the heck do I report on system views or tables without assigning sysadmin permissions to this user? I’m stumped! Help please! Am I going about this the wrong way?
Thanks!
I’m trying to create administrative reports for DBAs to simplify our daily check of the database servers (SQL 2000 and 2005). Since we have many servers (15+), I was hoping to create a generic login across the servers that would be used for the data source connections in these reports. This way we wouldn’t have to modify lots of report data sources every time we change our dba passwords (which occurs on a regular basis). However, this whole thing is proving to be difficult.
As a starting point, I created a view in our utilities database on a development server that displays a list of all SQL logins that were recently created or updated along with some other information. The system views it uses are sys.sysdatabases and sys.syslogins. Since I have sysadmin permissions, it runs fine when I run it. However, it returns no data when I use the generic login I created. I created a user account for the generic login in the master database and utilities. I tried to give the generic login read permissions to the view I created and to the master database via db_datareader. It’s not working, though. I still don’t get any data returned when I use the generic login to select on the view. I really don’t want to grant select on the individual system views if I don’t have to.
I’m sure the system views were designed this way on purpose. How the heck do I report on system views or tables without assigning sysadmin permissions to this user? I’m stumped! Help please! Am I going about this the wrong way?
Thanks!