copyData.ps1 1.3 KB

12345678910111213141516171819
  1. New-Item -ItemType Directory -Force -Path bcp/AlexisPTSTest
  2. $tables = @("dbo.CurrencyMaster", "dbo.CountryMaster", "dbo.Cards", "dbo.Configuration", "dbo.Cards_FX_Group", "dbo.Groups_FX_Master", "dbo.Groups_Fx_Details", "dbo.ProductType", "dbo.Bank", "dbo.VISA_CIB", "dbo.Response_source", "dbo.Payment_Token_Type", "dbo.Users", "dbo.Wallet_Provider", "dbo.Payment_Token", "ForeignExchange.ProductCCY")
  3. for ($i=0; $i -lt $tables.length; $i++) {
  4. $table = $tables[$i]
  5. $fmtOut = "AlexisPTSTest.${table} format nul -f bcp/AlexisPTSTest/${table}.fmt -n -S localhost -U gpspl -P yW2S6KXdY8"
  6. $bcpOut = "AlexisPTSTest.${table} out bcp/AlexisPTSTest/${table}.bcp -n -S localhost -U gpspl -P yW2S6KXdY8"
  7. Start-Process bcp -ArgumentList $fmtOut -Wait
  8. Start-Process bcp -ArgumentList $bcpOut -Wait
  9. }
  10. New-Item -ItemType Directory -Force -Path bcp/AlexisPTSTokenTest
  11. $tables = @("dbo.PANTokenMapping", "dbo.PriToken", "dbo.PubToken")
  12. for ($i=0; $i -lt $tables.length; $i++) {
  13. $table = $tables[$i]
  14. $fmtOut = "AlexisPTSTokenTest.${table} format nul -f bcp/AlexisPTSTokenTest/${table}.fmt -n -S localhost -U gpspl -P yW2S6KXdY8"
  15. $bcpOut = "AlexisPTSTokenTest.${table} out bcp/AlexisPTSTokenTest/${table}.bcp -n -S localhost -U gpspl -P yW2S6KXdY8"
  16. Start-Process bcp -ArgumentList $fmtOut -Wait
  17. Start-Process bcp -ArgumentList $bcpOut -Wait
  18. }