SQL Server Server Properties - sql-server

I want to change the following server properties and settings in the SQL Server 2012. I just want to change the language from English(United States) to English(United Kingdom). Please suggests me the possible ways in order to get through.

The language setting of the server doesn't matter, that's just a default setting for new added user, where you haven't define a language setting.
You have to change the language for your used account in SQL Server. In SSMS goto "Security" => "Logins" and open the properties of your account, at the bottom of the dialog you will find "Default language", I guess it's now "English", change it to "British English".
Or us a T-SQL Command:
USE [master]
GO
ALTER LOGIN [YourAccountName] WITH DEFAULT_LANGUAGE=[British]
GO
Source : https://social.msdn.microsoft.com/Forums/sqlserver/en-US/917d9534-ca26-4321-ab5a-1bf084cc7ee3/how-can-i-change-language-from-us-english-to-uk-english?forum=sqlexpress

This might help you out
https://dba.stackexchange.com/questions/52402/how-to-change-default-language-of-sql-server-management-studio-2008r2
But, see that this is for SQL server 2008 R2

Related

How to set language to english when using "master.dbo.sysmessages" in SQL

I used this Query retrieve all server error message but it giving me some unreadable language like:
Here's my script:
SET LANGUAGE us_english;
SELECT * FROM master.dbo.sysmessages
But it returns me the same from above result.
My Question is How to make this as English Language?
Any suggestion will be appreciated.
Thanks
To configure the default language with your sql server, Open sql server and follow below steps
In Object Explorer, right-click a server and select Properties.
Click the Misc server settings node.
In the Default language for users box, choose the language in which
Microsoft SQL Server should display system messages. The default
language is English.
for your reference please check attached image.

In SSRS, how do I force the reporting server locale from English-US to English-GB?

I have an issue where all dates in parameters are displayed as mm/dd/yyyy:
My goal is to change the date format to dd/mm/yyyy, which would require changing the locale to English-GB. Things which I've currently tried (and didn't work):
Changing the Language within the individual report settings to English-GB
Checking the Windows locale setting on the SQL Server instance (it was already set to English-GB and dd/mm/yyyy)
Changing the default SQL Server language using EXEC sp_configure 'default language', 23 ;
Changing the Reporting Server's service account language using ALTER LOGIN [XXXXX] WITH DEFAULT_LANGUAGE = British
Restarting the Reporting Service
Killing all connections to the SQL Server instance to force a reconnect
Non of the above worked and I'm still seeing the dates in the wrong format. Is there anything else I can do?
I think actually this comes from the Language of the browser rather than Report Server - I could be wrong. Try changing from US English to GB English in IE or whatever you're using.

SQL Server trigger to determine crud source

I have a web application and the database it is on my client building. I want to know if the CRUD (create, update, delete) actions made from my application of "someone" for any reason, done it from SQL Server Management Studio.
Thanks in advance
You could define a trigger for update/insert on the tables you want to audit, then adapt the following code from this MSDN article on AppName() :
DECLARE #CurrentApp varchar(40)
SET #CurrentApp = APP_NAME()
IF #CurrentApp <> 'SQL Server Management Studio - Query'
PRINT 'This process was not started by a SQL Server Management Studio query session.';
I believe it might be open to spoofing though, as I think programs can specify the application name in the connection string.

SQL Error: "Cannot use full-text search in user instance."

I'm using SSEUtil to automatically create a functional test database from the schema derived from my development database (SQL Server 2008 R2) as part of my build process. This allows me to keep the two databases in-sync (schema-wise) without running SQL repository tests against my development database.
I recently added a full text index to a table for the first time for this project in my development schema and now when I attempt to apply the schema to a newly created unit test database I get the following error when it executes the SQL to create the full text catalog:
CREATE FULLTEXT CATALOG [FullTextCatalog] AUTHORIZATION [dbo]
GO
Cannot use full-text search in user instance.
[SqlException Number 9982, Class 16, State 100, Line 1]
I've searched high and low. The only help I found was on another site where someone suggested "attaching to the parent database." I have no idea what that means. And I have no idea what this error means. What is a "user instance"?
Can anyone suggest a way around this? Is there a better way to keep two database schemas in-sync for continuous integration?
Either
User must have CREATE FULLTEXT CATALOG permission on the database, or be a member of the db_owner, or db_ddladmin fixed database roles.
or
you won’t be able to use full text catalogues if the SQL instance does not have it installed. Make sure the SQL server instance has the full text service running.
Here are two ways of testing whether this feature installed or not. This feature is available for all editions of SQL Server 2005 and 2008 (including SQL Express)
Check the services applet (run -> type 'services.msc') for this entry :
SQL Server FullText Search Or SQL Server FullText Search (SQLEXPRESS) (in case of SQL Express). Start this service of not running
Run the query "select fulltextserviceproperty('isfulltextinstalled')" in the Query analyzer. if the result is '1' then it is installed else not.
In the case of unavailability of this feature, you need to install by downloading the "SQLEXPR_ADV.EXE" from http://www.microsoft.com/express/sql/download/default.aspx
Reference taken from here
This is not really an answer to the question, but I came upon a similar issue with visual studio package manager when updating an entity framework code-first database (command update-database).
The problem was that I selected the wrong start-up project, and therefore visual studio was not using my connection string at all. It was connecting to a localdb instance, hence the cryptic error message "cannot use full text search in user instance". Once I made it connect to the actual database, it worked as expected.
I also came across this user instance issue. I have to admit that I only have basic knowledge of SSMS. Apparently I'm logged as the public user. How can I be a member of db_owner? I try to generate and script everything without using the GUI.
For example, if I execute this
ALTER AUTHORIZATION ON DATABASE::[dbname] TO sa;
EXEC sp_changedbowner 'sa';
I still get the Cannot use full-text search in user instance error with
USE [dbname]
CREATE FULLTEXT CATALOG [ftc_dbname] AS DEFAULT
GO

How do I set the default database in Sql Server from code?

I can't seem to figure out how to set the default database in Sql Server from code. This can be either .Net code or T-Sql (T-Sql would be nice since it would be easy to use in any language). I searched Google and could only find how to do it in Sql Server Management Studio.
ALTER LOGIN should be used for SQL Server 2005 or later:
http://technet.microsoft.com/en-us/library/ms189828.aspx
ALTER LOGIN <login_name> WITH DEFAULT_DATABASE = <default_database>
sp_defaultdb eventually will be removed from SQL Server:
http://technet.microsoft.com/en-us/library/ms181738.aspx
from: http://doc.ddart.net/mssql/sql70/sp_da-di_6.htm
sp_defaultdb [#loginame =] 'login' , [#defdb =] 'database'
Thanks Stephen.
As a note, if you are using Windows Authentication, the #loginname is YourDomain\YourLogin (probably obvious to everybody else, but took me a couple tries.
sp_defaultdb #loginame='YourDomain\YourLogin', #defdb='YourDatabase'
If you're trying to change which database you are using after you are logged in, you can use the USE command. E.g. USE Northwind.
https://www.tutorialspoint.com/sql/sql-select-database.htm

Resources