Tuesday, March 20, 2012
query to obtain linked server properties
property info such as
For a login not defined in the list above, connections will:
Not be made
Be made without using a security context
Be made using the logins security context
Be made using this security context ..
I want to generate a query that will give me a list of all linked servers
defined along with these settings . Also what Server type it is..whether its
a SQL Server or another data source.. I looked at sysservers already
Hi Hassan,
Check out 'sp_helplinkedsrvlogin' That gives you what you are looking
for.
Regards,
-Manoj
query to obtain linked server properties
property info such as
For a login not defined in the list above, connections will:
Not be made
Be made without using a security context
Be made using the logins security context
Be made using this security context ..
I want to generate a query that will give me a list of all linked servers
defined along with these settings . Also what Server type it is..whether its
a SQL Server or another data source.. I looked at sysservers alreadyHi Hassan,
Check out 'sp_helplinkedsrvlogin' That gives you what you are looking
for.
Regards,
-Manoj
query to obtain linked server properties
property info such as
For a login not defined in the list above, connections will:
Not be made
Be made without using a security context
Be made using the logins security context
Be made using this security context ..
I want to generate a query that will give me a list of all linked servers
defined along with these settings . Also what Server type it is..whether its
a SQL Server or another data source.. I looked at sysservers alreadyHi Hassan,
Check out 'sp_helplinkedsrvlogin' That gives you what you are looking
for.
Regards,
-Manoj
Saturday, February 25, 2012
Query the Security Login or Security User of the current person logged in
How do you find out which group membership "Login or User" the current user has permissions to. I currently use Suser_name() for the current username but how do I see what security login or security user he is assosicated to?
I didn't understand what you meant by Security login/Security User.
Do you meant schema name of the current user.. If yes then the following query will help you.
Code Snippet
Select
Loginname = SUSER_SNAME()
, SchemaName = USER_NAME()
|||Hi,
I think you want this:
Code Snippet
SELECT
G.name As "group_name",
U.name As "user_name"
FROM
sys.database_role_members M
JOIN
sys.sysusers G WITH(NOLOCK)ON M.role_principal_id = G.uid
JOIN
sys.sysusers U WITH(NOLOCK)ON M.member_principal_id = U.uid
WHERE
U.name = @.user_name
Regards,
Janos
|||I ran this as my sysadmin and it through back dbo, but when running as a user I get blanks. Where is it pulling the information from?|||Hi,
why do not use the system stored procedure sp_helpuser?
Code Snippet
declare @.username sysname
set @.username =user_name()
execsp_helpuser @.username
Query the Security Login or Security User of the current person logged in
How do you find out which group membership "Login or User" the current user has permissions to. I currently use Suser_name() for the current username but how do I see what security login or security user he is assosicated to?
I didn't understand what you meant by Security login/Security User.
Do you meant schema name of the current user.. If yes then the following query will help you.
Code Snippet
Select
Loginname = SUSER_SNAME()
, SchemaName = USER_NAME()
|||Hi,
I think you want this:
Code Snippet
SELECT
G.name As "group_name",
U.name As "user_name"
FROM
sys.database_role_members M
JOIN
sys.sysusers G WITH(NOLOCK) ON M.role_principal_id = G.uid
JOIN
sys.sysusers U WITH(NOLOCK) ON M.member_principal_id = U.uid
WHERE
U.name = @.user_name
Regards,
Janos
|||I ran this as my sysadmin and it through back dbo, but when running as a user I get blanks. Where is it pulling the information from?|||Hi,
why do not use the system stored procedure sp_helpuser?
Code Snippet
declare @.username sysname
set @.username = user_name()
exec sp_helpuser @.username