Error in using shell command from pl/sql (Oracle 11g)

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Error in using shell command from pl/sql (Oracle 11g)

Postby fahedakhter » Tue Jun 26, 2012 6:57 am

Dear Tim,

I have successfully used you code in oracle 8i,9i for a long time, But now when I want to use these code in oracle 10g(10.1.0.4.2) and oracle 11g(11.1.0.7.0) then it give me error while creating the java source name "Host"

ORA-29536: badly formed source: oracle.aurora.sqljdecl.TokenMgrError: Lexical error at line 9, column 31. Encountered: "w" (119), after : "\"C:\\"

Please suggest.

Regarding
Fahed Akhter
fahedakhter
Member
 
Posts: 4
Joined: Tue Oct 28, 2008 9:06 am

Re: Error in using shell command from pl/sql (Oracle 11g)

Postby Tim... » Tue Jun 26, 2012 7:08 am

Hi.

It seems to be a problem with this line:

Code: Select all
finalCommand[0] = "C:\windows\system32\cmd.exe";  // Windows XP/2003


Make sure the line provide the proper path the the cmd.exe file and doesn't contain any control characters.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Error in using shell command from pl/sql (Oracle 11g)

Postby fahedakhter » Tue Jun 26, 2012 7:14 am

Dear Tim,

I am using linux platform.

Regards
fahedakhter
Member
 
Posts: 4
Joined: Tue Oct 28, 2008 9:06 am

Re: Error in using shell command from pl/sql (Oracle 11g)

Postby Tim... » Tue Jun 26, 2012 8:04 am

Hi.

But that is the line that is complaining. Is this a compile time or run time error? If it is a compile-time error, get rid of the line.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Error in using shell command from pl/sql (Oracle 11g)

Postby fahedakhter » Tue Jun 26, 2012 9:03 am

Thanks a lot,It works.

Regards
Fahed Akhter
fahedakhter
Member
 
Posts: 4
Joined: Tue Oct 28, 2008 9:06 am

Re: Error in using shell command from pl/sql (Oracle 11g)

Postby Tim... » Tue Jun 26, 2012 11:25 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle SQL and PL/SQL Development

Who is online

Users browsing this forum: No registered users and 7 guests