Skip to content

Windows Psql connecting and running script command

ertemmstein edited this page Apr 17, 2019 · 19 revisions

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(inside Kettle base folder) once then under the .kettle folder(Users/[Username]/.kettle) add this line to

  • kettle.properties file : KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL=Y
  • Run this command (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