def generateCreateAllScripts(self):
        if self.options.verbose:
            print("\nrunning generateCreateAllScripts() function")
            print("base_path=", self.options.base_path)
            for schema in self.schemas:
                print(schema + "_SCHEMA=", eval("self.options." + schema + "_SCHEMA"))
            print("system_user="******"system_pass="******"tns_name=", self.options.tns_name)
            for schema in self.schemas:
                f = open(self.options.base_path + "\\gen.sql", "w")
                f.write("begin\n\
                ibs_admin.Gen_script('" + eval("self.options." + schema + "_SCHEMA") + "', '" + schema + "');\n\
                END;\n\
                /\n\
                EXIT;")
                f.close()
                output = ibslib.runCommand("sqlplus " + self.options.system_user + "/" + self.options.system_pass + "@" + self.options.tns_name + " @" + self.options.base_path + "\\gen")
                print(output)
                output = ibslib.runCommand("pscp  -pw " + self.options.dbserver_pass + " " + self.options.dbserver_user + "@" + self.options.dbserver_name + ":/tmp/logfiles/*" + schema + "_*.sql " + self.options.base_path + "\\" + schema)
                print(output)
                copyfile(self.options.base_path + "\\" + schema + "\\ins_" + schema + "_objects.sql", self.options.base_path + "\\ins_" + schema + "_objects.sql")

                # Table CreateAll script output needs a bit of tweaking
                for line in fileinput.FileInput(self.options.base_path + "\\" + schema + "\\" + schema + "_tables.sql", inplace=1):
                    print(line.replace("(,0)", ""), end=' ')
Esempio n. 2
0
 def checkoutDLLs(self):
     print "Checking out DLLs..."
     ibslib.runCommand("tf.exe get \"" + self.options.base_path +
                       "\\*.dll\" /login:"******"," +
                       self.options.tfs_pass + " /noprompt /recursive")
     ibslib.runCommand("tf.exe checkout \"" + self.options.base_path +
                       "\\*.dll\" /login:"******"," +
                       self.options.tfs_pass + " /noprompt /recursive")
Esempio n. 3
0
    def generateCreateAllScripts(self):
        if self.options.verbose:
            print("\nrunning generateCreateAllScripts() function")
            print("base_path=", self.options.base_path)
            for schema in self.schemas:
                print(schema + "_SCHEMA=",
                      eval("self.options." + schema + "_SCHEMA"))
            print("system_user="******"system_pass="******"tns_name=", self.options.tns_name)
            for schema in self.schemas:
                f = open(self.options.base_path + "\\gen.sql", "w")
                f.write("begin\n\
                ibs_admin.Gen_script('" +
                        eval("self.options." + schema + "_SCHEMA") + "', '" +
                        schema + "');\n\
                END;\n\
                /\n\
                EXIT;")
                f.close()
                output = ibslib.runCommand("sqlplus " +
                                           self.options.system_user + "/" +
                                           self.options.system_pass + "@" +
                                           self.options.tns_name + " @" +
                                           self.options.base_path + "\\gen")
                print(output)
                output = ibslib.runCommand("pscp  -pw " +
                                           self.options.dbserver_pass + " " +
                                           self.options.dbserver_user + "@" +
                                           self.options.dbserver_name +
                                           ":/tmp/logfiles/*" + schema +
                                           "_*.sql " + self.options.base_path +
                                           "\\" + schema)
                print(output)
                copyfile(
                    self.options.base_path + "\\" + schema + "\\ins_" +
                    schema + "_objects.sql", self.options.base_path +
                    "\\ins_" + schema + "_objects.sql")

                # Table CreateAll script output needs a bit of tweaking
                for line in fileinput.FileInput(self.options.base_path + "\\" +
                                                schema + "\\" + schema +
                                                "_tables.sql",
                                                inplace=1):
                    print(line.replace("(,0)", ""), end=' ')
 def runUpdateScripts(self):
         if self.options.verbose:
             print("\nrunning runUpdateScripts() function")
             for schema in self.schemas:
                 print(schema + "_SCHEMA=", eval("self.options." + schema + "_SCHEMA"))
             print("tns_name=", self.options.tns_name)
         for schema in self.schemas:
             output = ibslib.runCommand("sqlplus " + eval("self.options." + schema + "_SCHEMA") + "/" + eval("self.options." + schema + "_SCHEMA") + "@" + self.options.tns_name + \
             " @" + self.options.base_path + "\\" + schema + "_Upgrades")
             print(output)
Esempio n. 5
0
 def runUpdateScripts(self):
     if self.options.verbose:
         print("\nrunning runUpdateScripts() function")
         for schema in self.schemas:
             print(schema + "_SCHEMA=",
                   eval("self.options." + schema + "_SCHEMA"))
         print("tns_name=", self.options.tns_name)
     for schema in self.schemas:
         output = ibslib.runCommand("sqlplus " + eval("self.options." + schema + "_SCHEMA") + "/" + eval("self.options." + schema + "_SCHEMA") + "@" + self.options.tns_name + \
         " @" + self.options.base_path + "\\" + schema + "_Upgrades")
         print(output)
Esempio n. 6
0
 def checkinDLLs(self):
     print "Checking in DLLs..."
     tfscheckincomment = "Updating Core service contracts to " + self.options.asm_version
     ibslib.runCommand("tf.exe checkin " + self.options.base_path + "\\*.dll /login:"******"," + self.options.tfs_pass + \
             " /noprompt /recursive /comment:\"" + tfscheckincomment + "\"")
Esempio n. 7
0
import os, sys
import ibslib

dirs = ibslib.runCommand("tf dir").split("\r\n")
for i in range(1, dirs.__len__() - 3):
    print("Cloaking %s" % dirs[i].lstrip("$"))
    ibslib.runCommand("tf workfold /cloak \"" + dirs[i].lstrip("$") + "\"")
print("Completed.")
Esempio n. 8
0
 def checkinDLLs(self):
     print "Checking in DLLs..."
     tfscheckincomment = "Updating Core service contracts to " + self.options.asm_version
     ibslib.runCommand("tf.exe checkin " + self.options.base_path + "\\*.dll /login:"******"," + self.options.tfs_pass + \
             " /noprompt /recursive /comment:\"" + tfscheckincomment + "\"")
Esempio n. 9
0
 def checkoutDLLs(self):
     print "Checking out DLLs..."
     ibslib.runCommand("tf.exe get \"" + self.options.base_path + "\\*.dll\" /login:"******"," + self.options.tfs_pass + " /noprompt /recursive")
     ibslib.runCommand("tf.exe checkout \"" + self.options.base_path + "\\*.dll\" /login:"******"," + self.options.tfs_pass + " /noprompt /recursive")
Esempio n. 10
0
import os,sys
import ibslib

dirs = ibslib.runCommand("tf dir").split("\r\n")
for i in range(1,dirs.__len__()-3):
    print("Cloaking %s" % dirs[i].lstrip("$"))
    ibslib.runCommand("tf workfold /cloak \"" + dirs[i].lstrip("$") + "\"")
print("Completed.")