copyData.ps1 1.9 KB

1234567891011121314151617181920212223242526272829
  1. New-Item -ItemType Directory -Force -Path bcp/AlexisPTSTest
  2. $tables = @("dbo.CardManufactureMaster", "dbo.IncorrectUserLogHistory", "dbo.Cards", "dbo.ProductType", "dbo.SchemeMaster", "dbo.Users", "dbo.UserType")
  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. }
  19. New-Item -ItemType Directory -Force -Path bcp/AlexisSecure
  20. $tables = @("Encryption.AccountRanges", "Encryption.AccountRangesKeys", "Encryption.CardSchemes", "Encryption.EncryptionTypes", "Encryption.KeyAsymmetricComponents", "Encryption.KeyExpiryActions", "Encryption.KeyFormats", "Encryption.KeyPermittedUses", "Encryption.Keys", "Encryption.KeyStatuses", "Encryption.KeyTypes", "Encryption.KeyUsages")
  21. for ($i=0; $i -lt $tables.length; $i++) {
  22. $table = $tables[$i]
  23. $fmtOut = "AlexisSecure.${table} format nul -f bcp/AlexisSecure/${table}.fmt -n -S localhost -U gpspl -P yW2S6KXdY8"
  24. $bcpOut = "AlexisSecure.${table} out bcp/AlexisSecure/${table}.bcp -n -S localhost -U gpspl -P yW2S6KXdY8"
  25. Start-Process bcp -ArgumentList $fmtOut -Wait
  26. Start-Process bcp -ArgumentList $bcpOut -Wait
  27. }