change SQL Server error message to another language - sql

How I can change SQL Server error message to another . I am using SQL Server 2008 R2 with Windows server 2008 r2 enterprise and want to change error message to persion language.

SET LANGUAGE:
Specifies the language environment for the session. The session
language determines the datetime formats and system messages.
I don't think there is a Persian edition though, see the list at sys.syslanguages

try setting the language like this
SET LANGUAGE ENGLISH

Persian isn't a language supported on SQL Server 2008 R2
To see the supported languages click here
You could also find them by using
SELECT name, alias
FROM sys.syslanguages
If you then want to change the language to Italian for example use
SET LANGUAGE Italian
Further info on SET LANGUAGE here

Related

date issue after migrating to SQL Server 2012

I am facing an issue after we migrated our DB from SQL Server 2008 R2 to SQL Server 2012 in our production server. When we pass any date in yyyy-mm-dd format it changes it into yyyy-dd-mm and breaking all the applications. So in SQL itself datetime parameter in SP changed our value (to yyyy-dd-mm) passed from all our applications (live website and all other backend applications).
We have tried changing dbcc useroprions. Currently they are set like this:
language British
dateformat dmy
datefirst 1
We changed it to us-english but it does not work. Do I need to restart DB engine?
Kindly advise ASAP as it is affecting client. Thanks in advance
It worked after executing below SP.
sp_defaultlanguage 'DBUsername','us_english'
Thanks.

Add an other language to semantic_statistic_database

Can I add an other language like persian (that is not in default languages support by sql server 2012) to semantic_statistic_database of sql server 2012 or add words to one of existing default languages eg. english

How to check SQL Server 2008 script will work properly on SQL Server 2005

Is there a way (a tool) to check that a SQL Server 2008 script will run on SQL Server 2005?
Open up SQL Management studio, rt mouse click on the database name, select properties, select option, set compatability level. Test. A far as is known, when the compatabailty level is set to a (lower) level, functionality is disabled and errors raised entirely in line with the selected level. MS are a bit relctant to comit http://msdn.microsoft.com/en-gb/library/bb510680.aspx but in practice I've not found any issues. You can of course install an instance of the 2005 build and bulk insert for a really thorough check.
You can use SQL Fiddle for SQL Server 2008
At the left top you can select the RDMS

SQL Server datetime field issue

My personal computer is running Windows 7 (language turkish) and I installed SQL Server 2008. When I create a new database, the database language is Turkish_CI_AS
And I have a server with Windows Server 2003 (language english) and installed SQL Server 2008 on that server. I set the Regional and Language Options as Turkish. I am creating a database and selecting collation Turkish_CI_AS
But when I insert a row into a table on the server, an error occurrs:
The date format is invalid
You should always use unambigious formats like YYYYMMDD or YYYYMMDD HH:MM:SS so that no matter what setting the server/database is it will be added correctly. Read this for a better understanding http://beyondrelational.com/modules/2/blogs/70/posts/10898/understanding-datetime-column-part-ii.aspx

DATENAME(MONTH,GETADATE()) is returning numeric value of the month as '09'

When I run the following query [SELECT DATENAME(MONTH,GETDATE())], ideally speaking it should return value as 'September' but its returning value as '09'. I am running this query on MS SQL Server 2005. Is there anything I need to configure with MS SQL Server 2005?
Please find the details of the SQL Server 2005
Component Name Version
--------------------------------------------------------------------
Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00
Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 6.0.3790.3959
Microsoft .NET Framework 2.0.50727.42
Operating System 5.2.3790
SELECT ##LANGUAGE -> gives an Asian one?
SET LANGUAGE Japanese
SELECT DATENAME (month, GETDATE())
SET LANGUAGE us_english
SELECT DATENAME (month, GETDATE())
DATENAME depends on language, so need to change server default or your login default language...
Thank you and sayonara...
Hmmmm, I get "September", SqlServer 2005 9.00.3402.
Nope, SELECT DATENAME(month, GETDATE()); returns September for me. I just tried it in SQL 2005 and 2008. Where are you executing this query? That may help as to why this is happening to you.
The only thing I can think of would be collation causing that, but I can't find any specific examples of a collation that would do that. The other possibility could be the language which also sets date format. I'm a bit mystified, but these are places to start.
Try running:
select name ,alias, dateformat
from syslanguages
where langid =
(select value from master..sysconfigures where comment = 'default language')
To see what language the system thinks it's using. SqlServer changes its date format based on that.