.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL 2008 master database has wrong collation

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :Sql Server

I'm pretty new to SQL, so excuse me for landing in this situation in the first place.  Never again!

I had an old Windows 2003/SQL 2000 server which I wanted to retire, so installed a nice new Windows 2008 R2/SQL 2008 server to host all the databases.  I detached all the databases, copied them over, and attached them to the new server.  Everything appeared to be running OK.  However, the application is now complaining that I have different collations between the master database, and all the other ones.  the master (and other system databases) is Latin1_General_CI_AS and all the user ones are SQL_Latin1_General_CP1_CI_AS.

What I need to do is change the master to SQL_Latin1_General_CP1_CI_AS and ensure that any new databases which the application creates in future are also SQL_Latin1_General_CP1_CI_AS.  I have no idea how to do this!

I suppose one option wiould be to reinstall and start again, but I'm sure there must be an easier way.  Musn't there?  Help!



View Complete Post

More Related Resource Links

SQL Server 2008 R2 rebuild master database fails with error -2068643838

I want to change the server collation setting for SQL 2008 R2.  I'm using the command: Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MyServerName /SQLSYSADMINACCOUNTS="MyDomain\Special Account Group" "NT AUTHORITY\SYSTEM" "NT SERVICE\MSSQLSERVER" "NT SERVICE\SQLSERVICEAGENT" sa /SQLCOLLATION=Latin1_General_CI_AI The setup program starts, runs a while, then exits with a return code: Error result: -2068643838 Result facility code: 1203 Result error code: 2 The final lines of the Detail.txt file in the ...\Setup Bookstrap\Log\<specific timestamp>\ directory are: 2010-07-12 14:54:58 Slp: Running Action: ProduceStatusLogsBeforeFinishPage 2010-07-12 14:54:59 Slp: Completed Action: ProduceStatusLogsBeforeFinishPage, returned True 2010-07-12 14:55:00 Slp: Received request to add the following file to Watson reporting: C:\Users\<MyLoginName>\AppData\Local\Temp\2\tmpDAAF.tmp 2010-07-12 14:55:00 Slp: The following is an exception stack listing the exceptions in outermost to innermost order 2010-07-12 14:55:00 Slp: Inner exceptions are being indented 2010-07-12 14:55:00 Slp: 2010-07-12 14:55:00 Slp: Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException 2010-07-12 14:55:00 Slp:     Message: 2010-07-12 14:55:00 Slp:         The state of your

Cannot change the collation sequence of a Database in SQL Server 2008 R2


I tried two steps below separately: restricted user ran for 30 minutes then I stopped the execution; They obviously could not run simultaneously. I only want to operate at the database and not the server level. Our other key db is already in the desired collation. We'd like to have equijoins work on tables with the same collation sequences, and not have to use ETL or individual ALTERs for each table involved.

Second point: is CP1 below a 2000 only collation? That appears to be a patently false assumption in another forum posting. It appears to be a valid 2008 R2 collation is the point.




COLLATE SQL_Latin1_General_CP1_CI_AS ;


Many Regards,




SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Serve


So, we have an application that we've written to leverage SQL Express 2008 R2 - which our setup installs on the command line using the following instructions:


The code that does the installation can be found here:


//Path to the SQL Installation files 

string strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_86\\Setup.exe"; 

//If we're on a 64-bit OS use the 64 bit setup

if (Wow.Is64BitOperatingSystem == true)


strSQLPath = Application.StartupPath + "\\Install_Support_Files\\SQL_64\\Setup.e

SQL 2008 SP2 succefull but instance start fails - Script level upgrade for database 'master' faile


after installing SP2 instance starts and stops with error:

Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 5831, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

Already tried without success:
- enabled SA account (was disabled) http://support.microsoft.com/kb/960781/en-us
- uninstalled SP2 -> other error, but same problems with running the script



2008 R2- Restoring MASTER database from v10.00.1600 to v10.50.1600 fails with error..


Hey Guys,

I backed up the master database on a machine with SQL Server 2008 version 10.00.1600. Then I turned on SQL Server in single-user mode on the new machine with SQL Server 2008 R2 version 10.50.1600 with the following command (using sqlcmd)


Running this command gets me the following error.....

Msg 3168, Level 16, State 1, Server U15417546, Line 1
The backup of the system database on the device D:\master.bak cannot be restored because it was created by a different version of the server (10.00.1600) than this server (10.50.1600). Msg 3013, Level 16, State 1, Server U15417546, Line 1
RESTORE DATABASE is terminating abnormally.

Since i am restoring from a lower version, to a higher version, i assume the restore should be able to complete? I have not been able to find much help regarding this, so any information would be much appreciated.


SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'


I have created a setup application with SQLEXpress 2008 as a prerequisite. On test SQLExpress installs OK

after the application is installed it must create and install a database using a mixture of SMO and Scripting. I used SMO to add the current user (who is a Windows Administrator) as a Login to the SQL Express server.

Dim l As Login = New Login(srv, My.User.Name)
                l.LoginType = LoginType.WindowsUser
                l.DefaultDatabase = "MASTER"

It fails on srv.CreateDatabase with error message "permission denied in database MASTER"

this thread talks about converting the server to single user mode before adding a login


how is it possible to scrip this? there is no&nbs

SMO: SQL Server 2008, SP2: Attribute Database.ActiveConnections is still wrong!


When retrieving databases with SMO from a server, Database.ActiveConnections is still 1, after Database.Refresh() the value  is reset to 0.

But one value is always > 0 ???

Code looks like follows (taken from SQL Server samples ManageDatabases ..)


                foreach (Database db in Server.Databases)


                    if (db.IsSystemObject == false && db.IsAccessible == true)



                            = DatabasesListView.Items.Add(db.Name);

                        if ((db.Status & DatabaseStatus.Normal)

                            == DatabaseStatus.Normal)



sql server 2008 adventureworks database


dear Friends

For my MCTS 70 -433 examination, I recently installed sql server 2008 and installed the sample databases too. but my issue is, in that book they have mentioned a database called "AdventureWorks2008" and the nice thing is I don't have a such a database with me in my sql server 2008. 

And the query is 

-- MERGE Statement
USE AdventureWorks2008
MERGE INTO	Sales.SalesOrderDetailHistory AS SODH
USING Sales.SalesOrderDetail AS SOD
ON SODH.SalesOrderID = SOD.SalesOrderID
AND SODH.SalesOrderDetailID = SOD.SalesOrderDetailID
INSERT (LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, Cancelled)
VALUES(LineTotal, SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty
, ProductID, SpecialOfferID, UnitPrice, UnitPriceDiscount
, rowguid, ModifiedDate, DEFAULT)
UPDATE SET SOHD.Cancelled = 'True'
OUTPUT $action , inserted.* ;	

Please help me to overcome this issue and let me know where can I download that database too.

Thanking you

happy Coding

CalendarExtender wrong date from database



I'm about to go NUTS :)

I have 2 CalendarExtenders on page. And I want to show the date that I get from SQL SEVER:

select -> SELECT convert(datetime,  begin) as Begin, convert(datetime, end) as End FROM Table

The date field, on base,  is a char(8)  and the record is like YYYYMMDD. That's why I convert it to datetime.

But, on code behind when I do this :

CalendarExtender1.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(2))
CalendarExtender2.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(3)) 

Depend of the date, It's showing minus 1 day on page.

Like: If, on base, the date is 08/12/2010, on page it's showing 07/12/2010.

WHYYYYYYYYYYYY ??????????????? Cry Smile




what's the right collation for sql server 2008 to ignore french accent?

I want to  sql server 2008 collation using english as default(in Canada). when search for text, french accent can be ignore. For example, À,Â,Ä, à, â, ä will be treated same as a or A, but the data still is stored as different(such as for key). so what is the right collation need to be selected when install sql server 2008?. If existing instance collation is not the right one, how to change it to the right one?

MSSQL 2008 R2: Change Server Collation Steps, with user DBs already of desired collation

On the default instance of SQL Server 2008 R2, I want to change the server collation from the usual US default SQL_Latin1_General_CP1_CI_AS to an application vendor's required collation, Latin1_General_BIN.  I understand that changing the server collation is essentially the same as changing the collation of databases master and model -- is that a fair statement? But my main question is, since there are user databases on the server that I would like to preserve, can I not simply detatch the user DBs prior to performing the server collation change, and then reattach?  The database collation of the user databases is already set to Latin1_General_BIN.  This article, Setting and Changing the Server Collation, at http://msdn.microsoft.com/en-us/library/ms179254.aspx says that to preserve the user databases, I should script all DB objects out, and bulk-copy all data out, because the DBs will have to be recreated and repopulated.  Can someone explain why I ought not simply detach and reattach the user DBs, given that they are already of the desired collation (i.e., the same collation that I will be changing the server collation to)? Your help much appreciated. -Tom

Windows 7 CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 26

Hi I have migrated to a new computer using Windows 7, 6 gig memory, I7 chip (old machine had xp) and have installed Visual Studio 2008 and  SQL Server 2008 R2.  I get CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) when I try to create a new database.  Other posts (example:http://social.msdn.microsoft.com/forums/en-US/sqltools/thread/28fee0ed-c7e2-40df-8f79-f513c9848f09/) work for Vista but I cannot find how to grant permissions.  Run as administrator (vista fix) does not work. I have admin privaleges on my machine.  There are no other accounts.    What do I need to do to update privaleges? Thanks and have a nice day.    

attach sample database failed in sql 2008 express RTM

I'm having a trouble attaching sample database northwnd database,screen show me the error attach database failed for server 'computername\sqlexpress' additional inforamtion: the database 'northwind' cannot be opended because it is version 661.this server supports version 655 and earlier.a downgrade path is not supported.could not open new database 'northwind',create database is aborted,()microsoft sql server,error:948) my os is xp sp3,sql express version is  Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)   Jul  9 2008 14:43:34   Copyright (c) 1988-2008 Microsoft Corporation  Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)  I 'm sure database 'northwind' is ok.I can used database 'northwind' on my other computer.the other computer install express 2008R2 .    install RTM computer  ,database route is C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS,not C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. actually I 'm install sample database in sql express RTM on my computer.I just wonder why attach good database failed,how to solved this issue. http://sqlserversamples.codeplex.com/releases/view/45923 this link is avialable   thanks for you help

Getting "wrong" data out of a microsoft.sqlserver.management.smo.database object property (using pow

My problem:I do something like this:$dbsvr = new-object microsoft.sqlserver.management.smo.server "servername"$dbsvr.databases | ft name,size -autosizeWhen i run this from two different PC's i get database sizes that are all the same (5.25 mb), the size of the first database listed - which is master.I started to try out a few things, and found out that when i run the same command from one of our servers it returns the correct sizes...Anyone have any idea if this a SMO issue, or maybe some package software version issue...- or what?

SQL database display in visual studio 2008 express?

I jsut installed SQL server and management studio on my PC. For management studio, I created a database with tables. However, When I have data connection for SQL server in visual studio express, I couldn' t see the database I created. Any recommendations?   Xinguo  

Cannot Create Database Diagrams - SQL Server 2008 Management Studio

I cannot create a database diagram with my client-side SQL Server Management Studio.  I can do this if I am on the actual db server itself.  Please help.

Can SSAS 2005 run with Sql Server 2008 database engine?

Are there any known issues of running SSAS 2005 with SQL Server 2008 database engine?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend