How to see all database-level roles?
Please so not move my question. My question is about SQL Server security. It not about SSIS, just using SSIS as an example.
Ok, first, excuse my ignorance on SQL Server security, roles, permissions, etc.
I am reviewing some of our sensitive data that is stored in SQL Server system tables. I am able to go to the sys.ssispackages table and see the sensitive data. Technet says that it is controlled by "database-level roles. Integration Services includes
three fixed database-level roles db_ssisadmin, db_ssisltduser, and db_ssisoperator for controlling access to packages".
So to test this theory, how can i tell if I have these database-level roles. I sign onto SQL Server using Windows Authentication/active directory. I cannot find my AD userid anywhere in SQL Server. So how can I find what login, server roles, and ultimately
if I have the three fixeded database-level roles listed above?
----Database roles
DECLARE @DBuser_sql VARCHAR(4000)
DECLARE @DBuser_table TABLE
DBName VARCHAR(200),
UserName VARCHAR(250),
LoginType VARCHAR(500),
AssociatedDatabaseRole VARCHAR(200)
SET @DBuser_sql='
SELECT ''?'' AS DBName,a.name AS Name,
a.type_desc AS LoginType,
USER_NAME(b.role_principal_id) AS AssociatedDatabaseRole
FROM ?.sys.database_principals a
LEFT OUTER JOIN ?.sys.database_role_members b ON a.principal_id=b.member_principal_id
LEFT OUTER JOIN ?.sys.server_role_members c ON a.principal_id=c.member_principal_id and a.principal_id=c.member_principal_id
WHERE a.sid NOT IN (0x01,0x00) AND a.sid IS NOT NULL AND a.type NOT IN (''C'')
AND a.is_fixed_role <> 1 AND a.name NOT LIKE ''##%'' AND ''?'' NOT IN (''master'',''msdb'',''model'',''tempdb'')
ORDER BY Name'
INSERT @DBuser_table
EXEC sp_MSforeachdb @command1=@dbuser_sql
SELECT DBName,UserName,LoginType,
max(case when AssociatedDatabaseRole ='db_owner' then '1' else '0' end )'db_owner',
max(case when AssociatedDatabaseRole ='db_securityadmin' then '1' else '0' end )'db_securityadmin',
max(case when AssociatedDatabaseRole ='db_accessadmin' then '1' else '0' end )'db_accessadmin',
max(case when AssociatedDatabaseRole ='db_backupoperator' then '1' else '0' end )'db_backupoperator',
max(case when AssociatedDatabaseRole ='db_ddladmin' then '1' else '0' end )'db_ddladmin',
max(case when AssociatedDatabaseRole ='db_datareader' then '1' else '0' end)'db_datareader',
max(case when AssociatedDatabaseRole ='db_datawriter' then '1' else '0' end) 'db_datawriter',
max(case when AssociatedDatabaseRole ='db_denydatawriter' then '1' else '0' end )'db_denydatawriter',
max(case when AssociatedDatabaseRole ='db_denydatareader' then '1' else '0' end )'db_denydatareader',
max(case when AssociatedDatabaseRole is NULL then '1' else '0' end )'No Roles'
FROM @DBuser_table
group by DBName,UserName,LoginType
-----Server Roles
SELECT sp.name AS LoginName,sp.type_desc AS LoginType, sp.default_database_name AS DefaultDBName,slog.sysadmin AS SysAdmin,slog.securityadmin AS SecurityAdmin,slog.serveradmin AS ServerAdmin, slog.setupadmin AS SetupAdmin, slog.processadmin AS ProcessAdmin, slog.diskadmin AS DiskAdmin, slog.dbcreator AS DBCreator,slog.bulkadmin AS BulkAdmin
FROM sys.server_principals sp JOIN master..syslogins slog
ON sp.sid=slog.sid
WHERE sp.type <> 'R' AND sp.name NOT LIKE '##%'
Try the above SQL Statment to get a detailed view on permission
--Prashanth
Similar Messages
-
Team,
I got an error while creating a User for Domain Account. Below is the screen shot of the error (error : 15401)
Database instance is on SQL 2000 SP3. ( I know it is out of support, But the customer is relutanct to upgrade)
On Google search, i found below article which is best matching for this error
http://support.microsoft.com/kb/324321
I have follows each step of troubleshooting. But still the issue persists.
Step 1. The login does not exist == The login is very much exist in the domain as i am able to add the same domain id to other database instances
Step 2. Duplicate security identifiers == i have used this query to find duplicate SID
/* SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomain\YourLogin') */
But there was only one row returned with create date of today's.
Error while Assigning database level role (db_datareader) to SQL login (Domain Account)
Step 3. Authentication failure == Domain is available. User is able to login on other servers via RDP connection.
Step 4. Case sensitivity == Database collation is set to Case insensitivity. (CI)
Other two 5. Local Accounts & 6. Name resolution == is not applicable to me.
I tried other ways also.
A. Creating login and providing permission in one go only = User account is not created
B. Instead of GUI, use query to create login and provide required permission = Same error.
Does anybody has faced any such situation
ChetanSee the below output
srvid
sid
xstatus
xdate1
xdate2
name
password
dbid
language
isrpcinmap
ishqoutmap
selfoutmap
NULL
0x010500000000000515000000A1F66E1BFC1DC75D26E72530A2B80400
14
20:25.9
57:33.4
UKBAA\LHRAPPMuttavarapuS
NULL
1
us_english
0
0
0
Chetan -
How to see all the list of tables in APEX
Hi
COuld anyone of you help me find out how to see all the tables present in APEX ?
I can see all the list of tables when i give the command : select * from tab
But apart from finding like this , is there any way to find out all the list of tables ?
Regards,
TashaHi Tasha,
For Apex 3.2 ;
select * from dba_tables where owner in
(select workspace from APEX_030200.APEX_WORKSPACES)
tab is a synonym for user_tables
http://www.oreillynet.com/pub/a/network/2002/10/28/data_dictionary.html
hope this helps you
regards
mozkavra -
In ecatt - how to check at database level using ABAP
Hi,
How to check at database level using ABAP in Ecatt tool.
say,for example I want to check a particular sales order is invoiced or not ,at the database level and if it is invoiced I have stop proceeding to invoicing of that sales order number.
Could anybody suggest on this with an example?
thanks.Hi,
you can use the command GETTAB to access single db records.
Full specified or partitial specified keys can be use at GETTAB. It will return always only one record, also if a couple could match your selection.
For more advanced scenarios you can also use eCATTs Inline ABAP. In a block between the commands ABAP. ENDABAP. you can code ABAP statements, e.g. SELECT ... INTO TABLE ...
eCATT script parameters of type 'V' defined in that script using ABAP/ENDABAP will be transfered into the ABAP block and back to script after ABAP perform.
Best regards
Jens -
How to see all the tables in ABAP
how to see all the tables in ABAP
i need to see all the tables present in tcode se16.Hi Thiru ,
its tough to give all.so pls see the below links u can get all.
http://www.erpgenie.com/abap/tables.htm
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=listofalltablesin+abap&cat=sdn_all
http://www.guidancetech.com/people/holland/sap/abap/
http://www.sap-img.com/ab017.htm
http://abap-gallery.blogspot.com/
thanks
karthik -
Cannot see all database users in RAU
Hi,
I logged in as repos_owner and tried to maintain users. When I get the window for the new repositoy user properties I see nearly all users but 1 not.
Is there a filter or so or does this user need some grants. The user exists and I can connect to the database.
Please help me.
Regards
siegwinI found the solution in Metalink
Can Not See All Database Users in RAU, Maintain Users in Oracle Designer [ID 1086028.6]
Thanks -
Mobile Version: How to see all highlights and notes we made in a PDF document?
Mobile Version (Android): How to see all highlights and notes we made in a PDF document?
I'm moving your topic to the Android forum.
-
How to see all music categories in iTunes Store?
When I enter in iTunes Store I see just standard categories: pop, alternative, rock and even others.
But I often notice interesting categories like "music of 70s", "music of 2000s" and others. How to see all these additional subcategories?Click the Browse link under the Quick Links:
and the select "Music".
Regards. -
How to see all standard report in sap pm
hi
urgent
can somebody tail me
how to see all standard report in sap pmhi
manoj
youcan see all the reprts in sap
in trs SAP1
OF ALL MODULES
YOU REQUIRE ANY Ifurther information mailme back -
How to see all psa data in bi-7
how to see all psa data in bi-7 all info area
Hi,
In BI 7.0 you wont find PSA tab in RSA1 (data warehousing workbench), for that you need to use RSA1OLD tcode.
Other way is to go to the datasource and then right click->manage there you can find option to check all PSA requests which were staged from that datasource.
Hope it helps....
Cheers,
Habeeb -
How to see all my posts in OTN?
How to see all my posts in OTN?
If I click on my username it shows recent posts only.
Since I need to see all of my posts, I may not remember all key words to seachJohn,
Have a look at the following thread:
Searching for your own posts
Searching for your own posts
You can also use Google to find your own posts as most of the threads are indexed properly in Google search; I usually use this method to find my own posts.
Regards,
Hussein -
How to see all connected SSH users?
For lack of a better place, I'm putting this in the "installation" section...
I would like to know how to see all SSH connections. I thought I could use the command "who", but that only shows me as connected (when I know there are definitely others connected.
Does anyone know the command I can use to check?
Thanks!I'm not sure why 'who' isn't showing other ssh users (it seems to work fine for me) but I thought I'd also mention that OS X also ships with lsof, so you could also find all processes and users using the ssh port with:
lsof -i :ssh
Check the lsof man page for more information. It's a pretty handy command, although there are a lot of options to figure out... -
In Layoout how to see all the lead columns presented in that.
Hi Friends,
Could you please suggest me how to see all the lead columns presented in the Layout.
Appreciate your help through points.
Regards,
PJHi Ravi,
When I opend the layout in change mode we are able to see the Layout, when click on continue we can see Header area,lead coulmns,data columns. In Lead columns I am able to see only 20 rows only. But I want to see all rows in that lead columns. When click on continue we are able to see the layout in ALV grid format. In that we can see lot of rows. Now my question is How to see all the rows present in Lead columns. Still if you have any details please give me ur id I will send some screen shots or give ur no. I will talk to you.
Thanks & Regards,
PJ -
How to see all the enterprise services in a Discovery system
Hi,
Please let me know how to see all the enterprise sevices in a discovery system.
Please let me know how to load the enterprise services into webdynpro from discovry system
Thanks and Regards,
Naveen N MHello all,
I can't figurate how to list all the root directories
(C:/> , D:/>, E:/> etc.) in a system.
I know how to recursively check the content of a
directory and all its subdirectories when a
predefined path is defined. However what I' d like to
do is actually give the option to pick one of the
root directories to start the iteration. I have been
looking around but I can' really find anything
helpful.
If any of you has any idea on how to achieve the
above objective some clarification would be really
appreciated.
Thanks in advance for your help!How to installing the Javax.comm package -
How to see all GL A/c List & Chart of Accounts list
Pls tell me, How to see all created GL A/c List & Chart of Accounts list
Dear Jaheer,
For all Gl account please use T code-S_ALR_87012333,Just give company code and execute.
For All COA list Please use T code-S_ALR_87012326,just execute after entering the T code.
Hope this will solve your requirement.
Regards
Eugene
Maybe you are looking for
-
Hello How do i Transfer information from my Laptop to my Desk top Mac for printing?? can I do this without getting a new app to do this ,or will I need to get an new program or application for this ?? Regards Mar
-
Is there an easy way to generate a site map of an APEX application ?
Hi. Is there an easy way to generate a site map of an APEX application ? Thanks.
-
Is there any documentation on Peoplesoft CRM 9 HelpDesk for Human Resource?
Hi, We are looking into the possibility of acquiring the HelpDesk HR module. Currently we are using the Human Capital Management (HRMS) and Customer Relationship Management (CRM) Help Desk modules. I am looking for any sort of documentation which wou
-
how do I add the filename for the clips (800) in my video without doing this manually using 'Title'! PP CS4 Thanks
-
Firefox not responding to keyboard input
I'm having issues with Firefox temporarily no longer responding to keyboard input. I have two machines, both running Windows 7. On my laptop, I never have any issues but on my desktop, I find that Firefox sometimes blocks keyboard input. It will allo