Navision 3.7 and SQL Collation issues

Styvie
Member Posts: 77
Good day all,
I have a weird issue with a Navision 3.7 SQL database. We have about 8 companies, i.e. 8 tables per named table in Navision.
I would like to create a view for an external application which has all the data from all the companies in it, i.e.
Select No_,Name , 'Company 1' as Company from [Company 1$Resource]
UNION ALL
Select No_,Name , 'Company 2' as Company from [Company 2$Resource]
I have many such views to do....
That would work fine, except that I now find that some of my tables fields have different collations ?
For instance company 1 has collation Latin1_General_CS_AS and another has collation Latin1_General_CI_AS
There are so many examples in this database of this happening, and I am confused as to how this happens. I am 100% convinced that this has not been done manually, and it must have happened when the companies were created etc. Possibly the DB Collation was changed in between these 2 companies being created.
Has anyone else experienced this ? And is there any risk of this disrupting code from within Navision.. we are running W1 , English , with only normal characters (i.e. no accents, etc). Would like to do a full run through the db and make all the collations standard, but not 100% sure this is risk free either...
Any comments ?
I have a weird issue with a Navision 3.7 SQL database. We have about 8 companies, i.e. 8 tables per named table in Navision.
I would like to create a view for an external application which has all the data from all the companies in it, i.e.
Select No_,Name , 'Company 1' as Company from [Company 1$Resource]
UNION ALL
Select No_,Name , 'Company 2' as Company from [Company 2$Resource]
I have many such views to do....
That would work fine, except that I now find that some of my tables fields have different collations ?
For instance company 1 has collation Latin1_General_CS_AS and another has collation Latin1_General_CI_AS
There are so many examples in this database of this happening, and I am confused as to how this happens. I am 100% convinced that this has not been done manually, and it must have happened when the companies were created etc. Possibly the DB Collation was changed in between these 2 companies being created.
Has anyone else experienced this ? And is there any risk of this disrupting code from within Navision.. we are running W1 , English , with only normal characters (i.e. no accents, etc). Would like to do a full run through the db and make all the collations standard, but not 100% sure this is risk free either...
Any comments ?
0
Comments
-
Try to alter the collation for the database within Navision, may be that it will alter all collation on all tables to one value.0
-
Yeah, am going to try that.... just worried it may not finish overnight... the db is about 150gb, so just worried it takes too long... was going to do it with a script... bit by bit....
Going to try on a test copy i have of the db...
Will post my results...0 -
The collation is defined per database. How can the tables in the same db have differnt colation.0
-
You can have differing collation per colums in SQL 2000... so DB collation can differ to column collation...
DB collation is used as a default collation for the column, but i have cased where columns are differing collations..0 -
were they changed manually? I don't think Navision has any capability to change them.0
-
I somehow doubt they were changed manually. I think possibly someone changed the DB Collation via Enterprise Manager.. which does not update all the columsn collations as navision does when changing a collation.
So ... all companies tables created before this collation was changed have one collation, and any companies / tables created since then have a different collation. Navision creates new tables using the default database collation, and Enterprise Manager, does not re-update all the old data.
I have since tested, changing the collation of the database through Navision, will change the collation of each column in the database. This allows me to get back to one standard collation, but will take time, as each column needs to be resorted, and re-indexed.
Hopefully once done I will be back to one collation for my db.0 -
Good luck. Thanks for the info.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions