Skip to content

Windows Psql connecting and running script command

ertemmstein edited this page Apr 17, 2019 · 19 revisions

Within the latest psql build on windows 10 you can use this command to run script:

**Create Schema : **

psql -f [output_before_script] -U [username] -h [destinationServerIp] -p [port] [destinationDBName]

Create kettle migration job(for each table)

PERL .\sqlserver2pgsql.pl -b output_before_script -a output_after_script -u output_unsure_script -k [FullPath]\data-integration -sd [MSSQLDBNAME] -sh [MSSQLHOSTIP] -sp [PORT] -su [MSSQLUSER] -sw [MSSQLPASSWORD] -pd [PQSQLUSER] -ph [PQSQLHOSTIP] -pp [PORT] -pu [PQSQLUSER] -pw [PQSQLPASSWORD] -f [MSSQLDBSCRIPT]

Start migration:

Note : You must run SpoonConsole.bat once then (In kettle base directory) .\kitchen.bat -file=C:\Users\ertemy.DATASEL\Desktop\Postgre_migrate\pdi-ce-8.2.0.0-342\data-integration\migration.kjb -level=detailed

Clone this wiki locally