Char detected as byte on production server.
mcnamaragio
Posts: 28
I have the same table on two different servers but char columns are detected as byte on the production server. Here is how it looks:
It would be nice if there was an option to at least ignore the error. It would be better if the error didn't happen at all.
It would be nice if there was an option to at least ignore the error. It would be better if the error didn't happen at all.
Comments
You can either post the information here or email to support@red-gate.com.
Also your image didn't work
Project Manager
Red Gate Software Ltd
If you're using the tool getting the SCO_Comparison.log file would be really helpful as it helps identify what we thought was different when we compared - details on how to enable logging are at http://documentation.red-gate.com/displ ... +log+files
Project Manager
Red Gate Software Ltd
I tried comparing it myself with all_tab_cols and found this:
CHAR_USED - production has B, local C. DATA_LENGTH - production has 1, local 4.
PL/SQL developer shows VARCHAR2(1) in both cases. Can this be caused by server configuration?
A quick google came across https://community.oracle.com/thread/1029910
Project Manager
Red Gate Software Ltd
As I understand it if something is a VARCHAR2(1) in CHAR then it can store a character - always.
However to store a single character in BYTE you would need up to a VARCHAR2(4 BYTE).
Can you send in the screenshot so I can see what you're seeing to try to really understand what the problem is as I'm still struggling.
Project Manager
Red Gate Software Ltd
Project Manager
Red Gate Software Ltd
We report the difference in the CHAR_USED for the tables - correctly. But that isn't the desired behaviour you are after. You want to consider the tables equal even if the column CHAR_USED is different - even though the capacity of a 1 BYTE is different to that of a 1 CHAR.
Is that correct?
Project Manager
Red Gate Software Ltd
CHAR_USED can actually be set per column on each table independently I believe so having an option to ignore it due to the server default wouldn't work - as like you have encountered I'm not sure we can guarantee to even be able to determine the server default with non-dba credentials.
I could fairly easily add an option to ignore CHAR_USED for the project but then I'd be concerned as I say above that data that would fit in a CHAR in development wouldn't fit in the BYTE in production.
Project Manager
Red Gate Software Ltd
Project Manager
Red Gate Software Ltd
Just a thought.
(I'm about to head off today so won't reply quite as quickly as I have been)
Project Manager
Red Gate Software Ltd
Actually a quick thought is that Oracle may be scripting according to the local defaults of the server. Which makes sense..... unless you want to run it on another server where the default are different, like in your case. As a VARCHAR2(1 CHAR) has a very different meaning to a VARCHAR2(1 BYTE) even though CHAR and BYTE may be local server defaults.
Project Manager
Red Gate Software Ltd
What are the results are your two servers do you happen to know - and is that information available even to a restricted user?
I'm still concerned that the databases are technically different and that's what we're noticing.
Project Manager
Red Gate Software Ltd
On live server both queries return NLS_LENGTH_SEMANTICS set to BYTE while on the development server it is set to CHAR.
Can you give the following build a go and see if it behaves as you expect.
ftp://support.red-gate.com/patches/Sche ... cad9f2.exe
Enjoy!
Project Manager
Red Gate Software Ltd
Project Manager
Red Gate Software Ltd
http://download.red-gate.com/Oracle/Sch ... cad9f2.exe
Project Manager
Red Gate Software Ltd
Project Manager
Red Gate Software Ltd