自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

教您如何實(shí)現(xiàn)sybase自動(dòng)備份

數(shù)據(jù)庫(kù)
sybase數(shù)據(jù)庫(kù)備份的方式很多,下文就對(duì)sybase數(shù)據(jù)庫(kù)自動(dòng)備份的實(shí)現(xiàn)方法作了詳細(xì)的介紹,如果您感興趣的話,不妨一看。

sybase自動(dòng)備份的方法我們經(jīng)常會(huì)用到,下面就為您詳細(xì)介紹sybase自動(dòng)備份的實(shí)現(xiàn)過程,希望對(duì)您學(xué)習(xí)sybase自動(dòng)備份方面能有所幫助。

  1. Imports System.IO  
  2. Module Module1  
  3.  
  4. Sub Main()  
  5.  
  6. Dim str_Path As String  
  7. Dim str_FileName As String  
  8. Dim str_Name As String  
  9. Dim i As Integer, weeknum As Integer  
  10. Dim f_file As System.IO.File  
  11. Dim F_write As System.IO.StreamWriter  
  12. Dim str_temp As String  
  13. str_FileName = gbackupdump_data.txt  
  14. If File.Exists(str_FileName) = True Then  
  15. File.Delete(str_FileName)  
  16. End If  
  17. F_write = File.CreateText(str_FileName)  
  18. F_write.WriteLine(use master)  
  19. F_write.WriteLine(go)  
  20. weeknum = Weekday(Now())  
  21. '每隔一天轉(zhuǎn)儲(chǔ)的文件名相同  
  22. Select Case weeknum  
  23. Case 1, 2, 4, 6  
  24. F_write.WriteLine(select getdate())  
  25. F_write.WriteLine(go)  
  26. F_write.WriteLine(dump database  bsjdw to 'g:\backup\dumpback\bsjdw_data0.dump')  
  27. F_write.WriteLine(go)  
  28. F_write.WriteLine(select getdate())  
  29. F_write.WriteLine(go)  
  30. F_write.WriteLine(dump database  system to 'g:\backup\dumpbacksystem_data0.dump')  
  31. F_write.WriteLine(go)  
  32. F_write.WriteLine(select getdate())  
  33. F_write.WriteLine(go)  
  34. Case 3, 5, 7  
  35. F_write.WriteLine(select getdate())  
  36. F_write.WriteLine(go)  
  37. F_write.WriteLine(dump database  bsjdw to 'g:\backupdumpbackbsjdw_data1.dump')  
  38. F_write.WriteLine(go)  
  39. F_write.WriteLine(select getdate())  
  40. F_write.WriteLine(go)  
  41. F_write.WriteLine(dump database  system to 'gbackupdumpbacksystem_data1.dump')  
  42. F_write.WriteLine(go)  
  43. F_write.WriteLine(select getdate())  
  44. F_write.WriteLine(go)  
  45.  
  46. End Select  
  47.  
  48. F_write.WriteLine(exit)  
  49. F_write.Close()  
  50.  
  51.  
  52. Dim ti As Date  
  53. Dim te As Date  
  54. ti = Now 
  55. Dim logfilename As String  
  56. logfilename = datafile + Trim(Str(Year(Now()))) + Trim(Str(Month(Now()))) + Trim(Str(Day(Now()))) + .txt  
  57. Shell(cmd k isql -Usa -PSjb81! -i + str_FileName +gbackupdumpbackdumplog + logfilename, AppWinStyle.NormalFocus)  
  58.  
  59. te = Now 
  60. Try  
  61. Dim myProcesses() As Process  
  62. Dim instance As Process  
  63. Do  
  64. myProcesses = Process.GetProcessesByName(cmd)  
  65. Dim j As Integer  
  66. j = 0 
  67. For Each instance In myProcesses  
  68. If instance.StartTime = ti And instance.StartTime = te Then  
  69. j = 1 
  70. End If  
  71. Next  
  72. If j = 0 Then  
  73. Exit Do  
  74. End If  
  75. Loop  
  76. myProcesses.Clear(myProcesses, 0, myProcesses.Length)  
  77. Catch  
  78. End Try  
  79.  
  80. Exit Sub  
  81. End Sub  
  82.  
  83. End Module  
  84.  

 

 

 

【編輯推薦】

設(shè)置SYBASE用戶口令為空

Sybase數(shù)據(jù)庫(kù)維護(hù)技巧總結(jié)

深入探究SYBASE數(shù)據(jù)庫(kù)日志

Sybase日期函數(shù)應(yīng)用示例

Sybase數(shù)據(jù)庫(kù)函數(shù)全介紹

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-10-26 10:48:16

ORACLE備份

2010-10-14 10:18:28

MySQL數(shù)據(jù)庫(kù)備份

2010-11-18 16:27:37

2010-09-26 13:56:43

SQL遠(yuǎn)程查詢

2010-11-16 09:49:22

Oracle重建索引

2010-11-22 16:05:53

MySQL多表插入

2010-11-25 14:56:46

MySQL全文查詢

2010-10-14 10:28:18

MySQL動(dòng)態(tài)視圖

2010-09-14 13:22:51

sql server備

2010-10-08 10:37:00

MYSQL添加新字段

2010-10-19 16:58:34

SQL Server日

2010-09-14 13:37:19

sql server備

2009-11-19 16:18:17

路由器功能

2010-11-03 14:28:15

DB2行轉(zhuǎn)列

2010-11-04 13:50:20

DB2在線導(dǎo)入

2010-09-27 16:32:46

SQL Server日

2010-11-18 16:41:13

oracle死鎖

2010-09-24 16:52:18

sql DATENAM

2010-10-12 14:53:31

mysql索引優(yōu)化

2010-11-25 14:49:08

MySQL查詢最大值
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)