Search

Monday, March 12, 2012

set the default language & default database for a login

Use below query to change default language:


-- Setting default language for login
use master

EXEC sp_defaultlanguage 'Deutsch', 'us_english'
GO

-- SQL Server 2005 and onward
ALTER LOGIN kimberlyhay WITH DEFAULT_LANGUAGE = British;
GO

-- Get languages information
EXEC sp_helplanguage
------------

-- Languages in SQL Server 2008 with dateformat
SELECT LanguageID = langid,
       name,
       alias,
       dateformat
FROM     sys.syslanguages
ORDER BY langid
GO


Use below query to change default Database:

-- Setting default database for login
EXEC sp_defaultdb ' Deutsch ', 'AdventureWorks'

-- SQL Server 2005 and SQL Server 2008
ALTER LOGIN kimberlyhay WITH DEFAULT_DATABASE = AdventureWorks;
------------

No comments:

Post a Comment