Change collation of sql2017 when freshly installed.

We have installed a fresh new SQL 2017 server but has wrong collation; what's the proper steps to successfully change the collation to the desired one?
rayluvsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
stop sql server service
from sqlcmd in the binn directory
sqlservr -m -T4022 -T3659 -q"SQL_Latin1_General_CP850_CS_AS"

https://blogs.msdn.microsoft.com/shreyasgowda/2018/04/29/to-change-sql-server-collation-without-rebuilding-the-instance/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
It's possible to change a SQL Server instance collation but that will require a full rebuild of the system databases, meaning that you'll loose all configurations, logins and any other server objects like linked servers and you'll also need to attach the existing databases.
Since you said you just installed the SQL Server instance, then it's probably that you didn't do nothing on the SQL Server instance, meaning that a full rebuild of the system databases can be done without any impact.
0
rayluvsAuthor Commented:
Yes, since it’s a new install and has no production databases just the database installed by the SQL install, we don’t need to rebuild right?

The databases that gets installed with a fresh new SQL don’t need rebuild?

If change collation as recommended by David, we will not lose any configurations, logins and any other server objects like linked servers?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Vitor MontalvãoMSSQL Senior EngineerCommented:
Yes, it will need a rebuild so yes, you'll lose all configurations from the SQL Server instance.
User databases have their own collation (usually from the SQL Server instance where they were created) but changing a database collation only affects the current database and not the SQL Server instance.
0
rayluvsAuthor Commented:
Understood, can you provide some link to full rebuild of the system databases.
0
David Johnson, CD, MVPOwnerCommented:
@victor the commands given do not require a rebuild

A few days ago, I came across an issue where we had to change the SQL server instance collation and we were just asking the clients to rebuild the system databases to do so in the previous cases. But this time the client could not afford to do that and asked for a plan B.
0
rayluvsAuthor Commented:
Ok.  Note the new sql install has no working database, just the system database that it install with a new installation.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
@David, I read that article but it's hard to me to believe that a SQL Server instance collation change doesn't need a rebuild. Of course rayluvs should give a try to confirm that. Unfortunately I don't have any available SQL Server instance to play with the -q parameter (btw, I checked in MSDN and couldn't find that parameter. It might be one of the hidden ones).
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
raylus, can you tell us if the SQL Server instance has been rebuilt or not?
I would like to confirm that the -q parameter doesn't rebuild the SQL Server instance, i.e., you don't loose any server object during the process.
0
rayluvsAuthor Commented:
No (seems to work fine)
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Thank you for the confirmation.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.