English 中文(简体)
Oracle 数据库从. net 通过代码备份到 Oracle 数据库
原标题:Backup of Oracle database from .net through code

I want to take backup or restore of my oracle database through .Net code. I searched a lot but not found any correct solution. Like we do backup in SQL server by executing query.

backup database :DatabaseName to disk =  :DestinationPath

我也想在甲骨文做同样的事

最佳回答

I found an easy way to take backup of oracle database though code. I take credentials from user through code and make dynamically batch file of exp/imp commands. and run this batch command with process class.

感谢各位的回复。

问题回答

您可以使用甲骨文工具, 如 exp/ imp 或新甲骨文数据泵来创建数据库导出( 备份), 尽管您必须在数据库外的指令行/ 终点窗口中执行这些导出( 备份) 。 详情请见 : < a href=" http:// www. oracle- base. com/ articles/ oracle- data- pump- 10g. php" rel= "nofollow" > http:// www. oracle- base. com/ article/ 10g/ oracle- data- pump- 10g. php

数据抽取工作可以通过 PL/SQL 启动。 谢谢 @a-house-with-no-NAME 。

本文章显示如何从 sql 开始数据泵工作 : < a href="http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_api.htm#i1006925" rel=“nofollow” >http://docs.oracle.com/cd/B19306_01/server.102/b1421/dp_api.htm#i1006925

注意: 数据泵或ExpExport 不是一个 < em> real Oracle 备份, 您应该测试以确保您能够从您正在创建的垃圾文件中恢复。 Oracle 最接近 SQL 服务器的 备份 DATABASE 命令是 RMAN, 即便如此, 也非常不同 。 但从批量文件中调用非常有用 。 我既是 SQL 服务器和 Oracle 的 DBA, 而每个引擎进行备份的方式也是最大的差异之一 。 Exp and Imp 和 SQL s bcp 命令更相似( 但更强大 ) 。 Exp 将会备份您的控制文件或 AchiveLog, 在发生灾难时您可能需要这些 。 Expl, 请确保您使用 Consisterent=Y 选项( FLASHBACK_ TIME 用于更新数据泵导出) 。 SQL 服务器备份前更直接, 更容易恢复 。

OledbCommand cmd=new OledbCommand ("backup database databasename to disk = C:databasename.bak ",con);

con.open();

cmd.ExecutenonQuery();

con.close();




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签