質問編集履歴
1
あ
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
本番環境とテスト環境の同期
|
test
CHANGED
@@ -2,188 +2,14 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
毎日、日時作業で本番サーバのダンプを取得してテスト環境に入れているのですが
|
6
6
|
|
7
|
-
|
7
|
+
これを自動化する方法をないのでしょうか。
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
エラー
|
12
|
-
|
13
|
-
|
11
|
+
ダンプ取得までは、バッチ化をしています。
|
14
12
|
|
15
13
|
|
16
14
|
|
17
|
-
追加情報:SQL logic error or missing database
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
no such table: PASS_KANRI
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
```C#
|
26
|
-
|
27
|
-
|
15
|
+
よろしくお願いいたします。
|
28
|
-
|
29
|
-
using System.Collections.Generic;
|
30
|
-
|
31
|
-
using System.ComponentModel;
|
32
|
-
|
33
|
-
using System.Data;
|
34
|
-
|
35
|
-
using System.Drawing;
|
36
|
-
|
37
|
-
using System.Linq;
|
38
|
-
|
39
|
-
using System.Text;
|
40
|
-
|
41
|
-
using System.Threading.Tasks;
|
42
|
-
|
43
|
-
using System.Windows.Forms;
|
44
|
-
|
45
|
-
using System.Data.SQLite;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
namespace WindowsFormsApplication4
|
50
|
-
|
51
|
-
{
|
52
|
-
|
53
|
-
public partial class Touroku : Form
|
54
|
-
|
55
|
-
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
public Touroku()
|
62
|
-
|
63
|
-
{
|
64
|
-
|
65
|
-
InitializeComponent();
|
66
|
-
|
67
|
-
textToday.Text = DateTime.Now.ToString("yy/MM/dd");
|
68
|
-
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
private void label4_Click(object sender, EventArgs e)
|
74
|
-
|
75
|
-
{
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
private void textToday_TextChanged(object sender, EventArgs e)
|
84
|
-
|
85
|
-
{
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
}
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
private void buttonLogin_Click(object sender, EventArgs e)
|
94
|
-
|
95
|
-
{
|
96
|
-
|
97
|
-
string random = Guid.NewGuid().ToString("N").Substring(0, 8);
|
98
|
-
|
99
|
-
textPasssei.Text = random;
|
100
|
-
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
private void button1_Click(object sender, EventArgs e)
|
106
|
-
|
107
|
-
{
|
108
|
-
|
109
|
-
string dbConnectionString = "Data Source = E:\\myfriend.sqlite3.db";
|
110
|
-
|
111
|
-
using (SQLiteConnection cn = new SQLiteConnection(dbConnectionString)) {
|
112
|
-
|
113
|
-
cn.Open();
|
114
|
-
|
115
|
-
using (SQLiteTransaction trans = cn.BeginTransaction()) {
|
116
|
-
|
117
|
-
SQLiteCommand cmd = cn.CreateCommand();
|
118
|
-
|
119
|
-
//DBにインサート
|
120
|
-
|
121
|
-
cmd.CommandText = "INSERT INTO PASS_KANRI (No,LoginId,Password,Todate,BIKO) VALUES(@No,@LoginId,@Password,@Todate,@BIKO)";
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
//パラメータのセット
|
126
|
-
|
127
|
-
cmd.Parameters.Add("No", System.Data.DbType.String);
|
128
|
-
|
129
|
-
cmd.Parameters.Add("LoginId", System.Data.DbType.String);
|
130
|
-
|
131
|
-
cmd.Parameters.Add("Password", System.Data.DbType.String);
|
132
|
-
|
133
|
-
cmd.Parameters.Add("Todate", System.Data.DbType.String);
|
134
|
-
|
135
|
-
cmd.Parameters.Add("BIKO", System.Data.DbType.String);
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
cmd.Parameters["No"].Value = textBox1.Text;
|
140
|
-
|
141
|
-
cmd.Parameters["LoginId"].Value = textSiteNm.Text;
|
142
|
-
|
143
|
-
cmd.Parameters["Password"].Value = textPW.Text;
|
144
|
-
|
145
|
-
cmd.Parameters["Todate"].Value = textToday.Text;
|
146
|
-
|
147
|
-
cmd.Parameters["BIKO"].Value = TextBIKO.Text;
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
cmd.ExecuteNonQuery();
|
152
|
-
|
153
|
-
trans.Commit();
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}
|
158
|
-
|
159
|
-
}
|
160
|
-
|
161
|
-
}
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
private void label8_Click(object sender, EventArgs e)
|
166
|
-
|
167
|
-
{
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
private void textBox1_TextChanged(object sender, EventArgs e)
|
176
|
-
|
177
|
-
{
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
}
|
182
|
-
|
183
|
-
}
|
184
|
-
|
185
|
-
}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
```
|