all groups > sql server programming > august 2007 >
You're in the

sql server programming

group:

How to get DEFAULT_SCHEMA for the login?


How to get DEFAULT_SCHEMA for the login? Zhou Xiang
8/14/2007 11:28:01 PM
sql server programming: In the database(SQL Server 2005), I want to get the DEFAULT_SCHEMA for the
Login(or a user), how I can get it easily?

Re: How to get DEFAULT_SCHEMA for the login? Uri Dimant
8/15/2007 12:00:00 AM
Hi
CREATE LOGIN res WITH password='pp'

CREATE USER res FOR LOGIN res

SELECT * FROM sys.database_principals WHERE name ='res'







[quoted text, click to view]

Re: How to get DEFAULT_SCHEMA for the login? Zhou Xiang
8/15/2007 5:24:00 PM
Thanks a lot.

I use the fuction to get login's default_schema

SELECT SCHEMA_NAME()

[quoted text, click to view]
AddThis Social Bookmark Button