- Код: Выделить всё
Private Sub B_CreerSchema_Click(sender As Object, e As EventArgs) Handles B_CreerSchema.Click
If TB_BD_nom.Text = "" Or TB_MinX.Text = "" Or TB_MaxX.Text = "" Or TB_MinY.Text = "" Or TB_MaxY.Text = "" Or CBO_ListeProjection.Text = "" Then
MsgBox("проверте входные данные!")
Exit Sub
Else
If My.Computer.Network.Ping("Oracle") = False Then
MsgBox("сервер не доступен.")
Exit Sub
Else
If My.Computer.FileSystem.FileExists("\\ORACLE\k$\dev\DATAPUMP\SIGGABARIT.DMP") Then
My.Computer.FileSystem.DeleteFile("\\ORACLE\k$\dev\DATAPUMP\SIGGABARIT.DMP", FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
EXPDP_Shell()
If My.Computer.FileSystem.FileExists("\\ORACLE\k$\dev\DATAPUMP\SIGGABARIT.DMP") Then
IMPDP_Shell(TB_NewSchema)
CheckCreation(TB_NewSchema)
If SchemaExiste = True Then
Change_MOTdePASS(TB_NewSchema)
CreationREPERTOIRE(TB_NewSchema)
If My.Computer.FileSystem.DirectoryExists("\\ORACLE\k$\dev\" + TB_NewSchema.Text + "\01_CADASTRE") And My.Computer.FileSystem.DirectoryExists("\\ORACLE\d$\dev\" + TB_NewSchema.Text + "\01_CADASTRE\D01_POUR_TRAITEMENT") Then
CREATION_BAT1(TB_NewSchema)
CREATION_BAT2(TB_NewSchema)
CREATION_LISTE_BAT(TB_NewSchema)
DeleteSeqCadastre(TB_NewSchema)
DeleteSeqRole(TB_NewSchema)
CreationSeqCadastre(TB_NewSchema)
CreationSeqRole(TB_NewSchema)
ConnexionSchema(TB_NewSchema)
CreationRepDatapump(TB_NewSchema)
CreationRep2(TB_NewSchema)
CreationRep3(TB_NewSchema)
CreationRep4(TB_NewSchema)
CreationRep5(TB_NewSchema)
CreationRep6(TB_NewSchema)
CreationRep7(TB_NewSchema)
CreationRep8(TB_NewSchema)
ScriptSQL(TB_NewSchema, TB_MinX, TB_MaxX, TB_MinY, TB_MaxY, CBO_ListeProjection)
Else
Exit Sub
MsgBox("неудача.")
End If
Else
MsgBox(неудача" + TB_NewSchema.Text + "")
Exit Sub
End If
Else
MsgBox("неудача")
Exit Sub
End If
Else
'----------
EXP_Schema()
If My.Computer.FileSystem.FileExists("\\ORACLE\k$\dev\DATAPUMP\SIGGABARIT.DMP") Then
IMPDP_Shell(TB_NewSchema)
'IMP_Schema(TB_NewSchema)
CheckCreation(TB_NewSchema)
If SchemaExiste = True Then
Change_MOTdePASS(TB_NewSchema)
CreationREPERTOIRE(TB_NewSchema)
If My.Computer.FileSystem.DirectoryExists("\\ORACLE\k$\dev\" + TB_NewSchema.Text + "\01_CADASTRE") And My.Computer.FileSystem.DirectoryExists("\\ORACLE\k$\dev\" + TB_NewSchema.Text + "\01_CADASTRE\D01_POUR_TRAITEMENT") Then
CREATION_BAT1(TB_NewSchema)
CREATION_BAT2(TB_NewSchema)
CREATION_LISTE_BAT(TB_NewSchema)
DeleteSeqCadastre(TB_NewSchema)
DeleteSeqRole(TB_NewSchema)
CreationSeqCadastre(TB_NewSchema)
CreationSeqRole(TB_NewSchema)
ConnexionSchema(TB_NewSchema)
CreationRepDatapump(TB_NewSchema)
CreationRep2(TB_NewSchema)
CreationRep3(TB_NewSchema)
CreationRep4(TB_NewSchema)
CreationRep5(TB_NewSchema)
CreationRep6(TB_NewSchema)
CreationRep7(TB_NewSchema)
CreationRep8(TB_NewSchema)
ScriptSQL(TB_NewSchema, TB_MinX, TB_MaxX, TB_MinY, TB_MaxY, CBO_ListeProjection)
Else
MsgBox("неудача")
End If
Else
MsgBox("неудача + TB_NewSchema.Text + "")
Exit Sub
End If
Else
MsgBox("неудача")
Exit Sub
End If
End If
End If
End If
End Sub