473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Escape character + Oracle .NET

I wish to make a backup, with host copy operation but got problems with
double backslash \\ occuring in my OracleCommand, got always exception
"Invalid SQL", here's my command (.txt only as example):

OracleCommand oraCmdCopy = new OracleCommand(String.Format("host copy
{0} {1}", @"D:\a.txt", @"F:\b.txt"), oraConn);

I've put a watch there's always:
D:\\a.txt
F:\\b.txt

I've tried with String.Replace(@"\\",@"\")...

but there is no positive result..

Can anyone tell me how to handle that situation?
[Oracle accepts D:\a.txt, but not D:/a.txt, tried that also...]

Thanks
Aug 6 '06 #1
3 3700
christof wrote:
I wish to make a backup, with host copy operation but got problems with
double backslash \\ occuring in my OracleCommand, got always exception
"Invalid SQL", here's my command (.txt only as example):

OracleCommand oraCmdCopy = new OracleCommand(String.Format("host copy
{0} {1}", @"D:\a.txt", @"F:\b.txt"), oraConn);

I've put a watch there's always:
D:\\a.txt
F:\\b.txt

I've tried with String.Replace(@"\\",@"\")...

but there is no positive result..

Can anyone tell me how to handle that situation?
[Oracle accepts D:\a.txt, but not D:/a.txt, tried that also...]

Thanks
What sort of command is that?
Based on a quick google I cannot find any mention of oracle supporting
sql syntax like that.
Are you sure that oracle will accept that 'SQL' statement.
Bear in mind that that is _not_ a valid sql statement so if oracle does
it must be some sort of extension.

JB
Aug 7 '06 #2
What sort of command is that?
Based on a quick google I cannot find any mention of oracle supporting
sql syntax like that.
Are you sure that oracle will accept that 'SQL' statement.
Bear in mind that that is _not_ a valid sql statement so if oracle does
it must be some sort of extension.
Taken from "Expert Oracle9i Database Administration":

The following is the command you issue to perform hot backups. You'll
repeat the command for all the tablespaces in the database:

SQLalter tablespace proddata_01 begin backup;

Copy all the data files that are part of the proddata_01 tablespace. The
operating system copy command is invoked at this point to perform the
physical copy of all the data files.

SQLhost cp /u10/app./oracle/oradata/remorse/users01.dbf
/u01/app/oracle/remorse/backup

End the tablespace backup after the copying of all the files is
completed with the following statement:

SQLalter tablespace proddata_01 end backup;
Aug 7 '06 #3
Probably not all the command in Oracle can send from ADO.NET.

chanmm

"christof" <no****@nomail.dewrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>
>What sort of command is that?
Based on a quick google I cannot find any mention of oracle supporting
sql syntax like that.
Are you sure that oracle will accept that 'SQL' statement.
Bear in mind that that is _not_ a valid sql statement so if oracle does
it must be some sort of extension.

Taken from "Expert Oracle9i Database Administration":

The following is the command you issue to perform hot backups. You'll
repeat the command for all the tablespaces in the database:

SQLalter tablespace proddata_01 begin backup;

Copy all the data files that are part of the proddata_01 tablespace. The
operating system copy command is invoked at this point to perform the
physical copy of all the data files.

SQLhost cp /u10/app./oracle/oradata/remorse/users01.dbf
/u01/app/oracle/remorse/backup

End the tablespace backup after the copying of all the files is completed
with the following statement:

SQLalter tablespace proddata_01 end backup;


Aug 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Grant Allen | last post by:
I know this has been asked before - I've trawled through the mail archives and FAQs looking for any info, and only found "that's the way it works" answers. Basically, I want to turn off backslash...
3
by: beanweed | last post by:
I have an Oracle Procedure that returns xml. There was an exception thrown when I tried to load an XmlDocument (using LoadXml(String)) because the value returned from Oracle had an exclamation mark...
7
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %%...
18
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
4
by: Guadala Harry | last post by:
I need to place the following into a string... How can I properly escape the % " / < and > characters? <table width="100%" border="0" cellspacing="0" cellpadding="4px" class="hfAll"></Table> ...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
15
by: pkaeowic | last post by:
I am having a problem with the "escape" character \e. This code is in my Windows form KeyPress event. The compiler gives me "unrecognized escape sequence" even though this is documented in MSDN....
131
by: Lawrence D'Oliveiro | last post by:
The "escape" function in the "cgi" module escapes characters with special meanings in HTML. The ones that need escaping are '<', '&' and '"'. However, cgi.escape only escapes the quote character if...
5
by: vlsidesign | last post by:
The printf function returns "warning: unknown escape sequence: \040" for a backslash-space combination. If the ascii decimal number for space is 32 and the backslash is 92, why this particular...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.