Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Diagnostics;
- using System.Threading;
- using System.Net.NetworkInformation;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text.RegularExpressions;
- using System.Text;
- namespace Import
- {
- class Program
- {
- public static void Main(string[] args)
- {
- string tabela;
- Program p = new Program();
- string dane = za.tabele;
- string[] table = dane.Split('\n');
- Process cmd = new Process();
- cmd.StartInfo.RedirectStandardInput = true;
- cmd.StartInfo.RedirectStandardOutput = true;
- cmd.StartInfo.UseShellExecute = false;
- cmd.StartInfo.CreateNoWindow = false;
- cmd.StartInfo.FileName = "cmd.exe";
- cmd.Start();
- string last = table.Last();
- for(int i=0; i<table.Length; i++)
- {
- cmd.StandardInput.WriteLine($"imp market3_user/for8667319com CONSTRAINTS=n INDEXES=n STATISTICS=none file=expm.dat log=impm.log tables={table[i]}");
- if(i>0){
- tabela = table[i-1];
- p.Compres(tabela);
- }
- else if(table[i]==last){
- p.Compres(table[i]);
- }
- }
- Console.ReadKey(true);
- }
- public void Compres(string tabela)
- {
- SQLplus query = new SQLplus("market3_user/for8667319com");
- string result = query.execute($"alter table {tabela} move ROW STORE COMPRESS ADVANCED storage (INITIAL 65536);");
- logger.Info(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement