Quantcast
Channel: Authentication
Viewing all articles
Browse latest Browse all 8256

Re: LDAP Sync Collation

$
0
0
by Ryan Hanisco.  

Hey Folks,

I think I have an idea of what's going on here.  If I am right, I am surprised to see that this isn't an issue for more people. 

The instructions tell us that we have to set the collation of the Moodle database.  This is great, but the issue comes with the use of temp tables.  In MS-SQL, these are created in the TempDB which are created every time the database is restarted, inheriting their collation from the MasterDB.  This means that in any case where the default collation is different from the database collation we would see this conflict when using temp tables. 

With that, I am surprised that this isn't a common issue and can only think that either people are using single database instances for moodle or that creating temp tables isn't done often and only really comes out in the LDAP sync (since that is the only place I see people mention this in the forum.)

This means the solutions would be:

  • Create a separate SQL instance for Moodle
  • Rewrite the query with the 'collate database_default' in the code creating the temp table, though I don't know what this would do for users of other databases.
  • Change the collation of the database to match the default and hope nothing breaks

References:

http://msdn.microsoft.com/en-us/library/ms184391.aspx
http://www.sqlnotes.info/2012/05/07/collation-of-temp-tables/ 


Viewing all articles
Browse latest Browse all 8256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>