Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Diagnostics;
  4. using System.Threading;
  5. using System.Net.NetworkInformation;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using System.Text;
  10.  
  11. namespace Import
  12. {
  13. class Program
  14. {
  15. public static void Main(string[] args)
  16. {
  17. string tabela;
  18. Program p = new Program();
  19. string dane = za.tabele;
  20. string[] table = dane.Split('\n');
  21. Process cmd = new Process();
  22. cmd.StartInfo.RedirectStandardInput = true;
  23. cmd.StartInfo.RedirectStandardOutput = true;
  24. cmd.StartInfo.UseShellExecute = false;
  25. cmd.StartInfo.CreateNoWindow = false;
  26. cmd.StartInfo.FileName = "cmd.exe";
  27. cmd.Start();
  28. string last = table.Last();
  29. for(int i=0; i<table.Length; i++)
  30. {
  31. cmd.StandardInput.WriteLine($"imp market3_user/for8667319com CONSTRAINTS=n INDEXES=n STATISTICS=none file=expm.dat log=impm.log tables={table[i]}");
  32.  
  33. if(i>0){
  34. tabela = table[i-1];
  35. p.Compres(tabela);
  36. }
  37. else if(table[i]==last){
  38. p.Compres(table[i]);
  39. }
  40. }
  41. Console.ReadKey(true);
  42. }
  43.  
  44.  
  45. public void Compres(string tabela)
  46. {
  47. SQLplus query = new SQLplus("market3_user/for8667319com");
  48. string result = query.execute($"alter table {tabela} move ROW STORE COMPRESS ADVANCED storage (INITIAL 65536);");
  49. logger.Info(result);
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement