This article builds on the previous post in the series about how to setup local and remote working environments for MojoPortal.
Collation settings in SQL Server affects character set, sort order and case sensitivity.
It is not something I would normally pay much attention to, unless I had specific reason – for example, I was writing a site for use in a foreign language. Unfortunately, it is something I have needed to delve into far deeper than I would have wished, just now at least. That’s because of collation errors.
When an SQL database is created, its default collation is set. For many reasons, it’s at least reasonably likely that the default collation of your locally installed SQL Server will be different than that of your hosting provider. If that is the case, even if the collation is very similar, you may end up with collation errors crashing your site.
Install SQL Server Management Studio
To check collation for either your local or remote site, you first need to install SQL Server Management Studio. I recommend you do this via Microsoft Web Platform Installer. If you’ve been following this set of posts, you will already have this installed. Start it up. From the main menu, select Products. From the side menu, select All. Find and install SQL Server 2008 R2 Management Studio Express.
Check the collation of your local site
Start SQL Server Management Studio
It should automatically display the connect to server dialog. Enter the details and press Connect.
You should now see a tree of information, including databases. Expand the list of databases, right click on your database and select Properties.
You should now be able to see, amongst other things, Collation.
Now you can do the same for your remote database. First, select File and disconnect object explorer.
Then File | Connect object explorer
This time, use SQL Server Authentication to connect to your remote database
When connected, do the same as above to check the collation of your remote database. If it’s the same as your local one, you’re fine – no need to do anything!
If they’re different, your best bet is to change the collation of your local server. Notice I say server, not database. If you just change the collation for the database and not the server, you could run into other problems.
You can find instructions to change collation in the next post in the series.
Looking for quality mojoPortal Hosting? Look no further than Arvixe Web Hosting.