Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
I am facing problems to BackUp and Restore Oracle Database in vb.net,
Please Help...........
Posted
Comments
Sandeep Mewara 16-Jun-12 4:19am    
What problems? Sharing the issue/error might help.
Dave Kreskowiak 16-Jun-12 9:53am    
And the $64,000 question, WHAT KIND OF PROBLEMS ARE YOU HAVING???

SQL
txtPwd =User Password
txtHS =Host String
filename =e.g. c:\BackupFile.dmp
 Collapse | Copy Code
<pre lang="vb">

Shell("exp " & txtUser.Text.ToString.Trim & "/" & txtPwd.Text.ToString & "@" & txtHS.Text.ToString & " buffer=4096 grants=Y file=" & filename, vbNormalFocus)


Write above code on a button to execute. It takes backup of all data of one user from oracle database.

OR

VB
StreamWriter sw = new StreamWriter("reports\\backup.bat");
string name = "backUP-"+".dmp";string code1 = "exp "+orclUser+"/"+orclPass+"@"+orclService+" file = Backup\\"+name+" ";sw.WriteLine(code1);
sw.Close();
string strFilePath = System.IO.Path.GetFullPath("C:\\backup.bat");ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();psi.FileName = strFilePath ;
psi.Arguments = "1 2 3 4";
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo = psi;
p.EnableRaisingEvents = true;p.Start();
 
Share this answer
 
Take a look at this links - http://rockingtechnology.blogspot.in/2011/06/oracle-backup-and-restore-code-in-cnet.html[^] (this link is in C# but you should be able to convert to VB.Net)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900