GoogleCloudPlatform / database-assessment

Database Migration Assessment
https://googlecloudplatform.github.io/database-assessment/
Apache License 2.0
62 stars 35 forks source link

BUG: Databases that are using "," as decimal separator causes the CSV files to break #100

Closed ersantosnet closed 2 years ago

ersantosnet commented 2 years ago

Description

Some customer that are using "," as decimal separator are breaking the CSV file.

This could be solved by: (Ordered)

1) Alter session in the SQL Script I.E: alter session set NLS_NUMERIC_CHARACTERS = ',.';

2) Change the CSV field separator from "," to ";"

3) Usage of to_number everyone where there is a number I.E: to_number('100,12', '99999D99', 'NLS_NUMERIC_CHARACTERS='',.''')

Version

No response

Priority

priority:0

What oracle database version are you seeing the problem on?

All

Relevant log output

Error to import the data
smancinijr commented 2 years ago

Added a variable to specify the column separator.

Didn't included the "alter session" because it causes issues in multiple files.

Example from awrsnapdetails:

With Alter Session: vm-orcl-19c-multitenant_DB19C_031522225721,2218961670,1,00,2077,2269,07-MAR-22 12.00.01,200 AM,15-MAR-22 12.00.15,082 AM,9,32431,3603,3617,3617,3554,3619

Without Alter Session: vm-orcl-19c-multitenant_DB19C_031622004505,2218961670,1,00,2101,2269,08-MAR-22 12.00.20.386 AM,15-MAR-22 12.00.15.082 AM,8,28812,3602,3617,3617,3554,3618