Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-ignore_errors flag for schema conversion as well #173

Open
shubham-yb opened this issue Feb 21, 2023 · 1 comment
Open

-ignore_errors flag for schema conversion as well #173

shubham-yb opened this issue Feb 21, 2023 · 1 comment

Comments

@shubham-yb
Copy link

Hi Team,
The current behaviour of the tool is that it errors out during schema conversion if it finds some unknown clause.
Example

Cannot determine the PostgreSQL's datatype corresponding to hierarchyid. This is a bug
 at ./sqlserver2pgsql.pl line 379, <$file> line 690.
	main::convert_type('hierarchyid', undef, 'OrganizationNode', 'Employee', undef, 'HumanResources') called at ./sqlserver2pgsql.pl line 1424
	main::add_column_to_table('HumanResources', 'Employee', 'OrganizationNode', undef, 'hierarchyid', undef, undef, 'NULL') called at ./sqlserver2pgsql.pl line 1546
	main::parse_dump() called at ./sqlserver2pgsql.pl line 3316

And then it stops here without providing anything in the output files. Is there a way to skip/ignore such statements and go ahead with converting the rest?

The -ignore_errors flag exists for the data side but a similar flag during schema conversion will be a huge help.

Thank You in advance!

@usyadav3001
Copy link

Hi Team,
when I wiill be exicuting the below query give error how can I fix . plz help

aanchal@it-OptiPlex-5060:~/Documents/migrateDatabase$ perl sqlserver2pgsql.pl -f input_sql_dump.sql -b output_before_script -a output_after_script -u output_unsure_script
Types: $VAR1 = {
'bigint' => 'bigint',
'rowversion' => 'bytea',
'xml' => 'xml',
'datetimeoffset' => 'timestamp with time zone',
'nchar' => 'char',
'nvarchar' => 'varchar',
'varbinary' => 'bytea',
'binary' => 'bytea',
'time' => 'time',
'tinyint' => 'smallint',
'float' => 'double precision',
'timestamp' => 'bytea',
'real' => 'real',
'datetime' => 'timestamp',
'int' => 'int',
'money' => 'numeric',
'uniqueidentifier' => 'uuid',
'smallint' => 'smallint',
'smallmoney' => 'numeric(6,4)',
'text' => 'text',
'date' => 'date',
'image' => 'bytea',
'varchar' => 'varchar',
'datetime2' => 'timestamp',
'decimal' => 'numeric',
'smalldatetime' => 'timestamp',
'char' => 'char'
};
Cannot determine the PostgreSQL's datatype corresponding to public.xdtID. This is a bug
at sqlserver2pgsql.pl line 382, <$file> line 6.
main::convert_type("public.xdtID", undef, "item_id", "xtItem", undef, "public") called at sqlserver2pgsql.pl line 1445
main::add_column_to_table("public", "xtItem", "item_id", "dbo", "xdtID", undef, undef, "NOT NULL") called at sqlserver2pgsql.pl line 1567
main::parse_dump() called at sqlserver2pgsql.pl line 3338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants