Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Shutdown" or "startup" from Delphi fails

Status
Not open for further replies.

BOrtolf

Programmer
Nov 24, 2002
4
CH
my company is running several instance of oracle 8i.
i was trying to write a little tool that will do oracle cold backups automatically.

therefore it should retrieve a list of all needed files for a db instance, then shut the instance down, process (copy) these files and then restart the files.

it all works fine except for the
"SHUTDOWN IMMEDIATE" and the "STARTUP OPEN ..." statements.
when i call them from my program (via ADODB.Connection.Execute) i get the following error: "[Oracle][ODBC][Ora]ORA-00900: invalid SQL statement"

i m sure the statements are correct because they do work from SQLPlus. and i m also sure the connection is properly opened because i can issue any other SQL statement correctly.


a possible reason may be that my connection string doesnt connect as sysdba/sysoper (though i used "/ AS SYSDBA" syntax). but even if it doesnt it should give me another error msg (e.g. SQLPlus says "insufficient privileges") than that.


any ideas why the statments issued from my little tool fail?

 
They run in sql*plus because they're sql*plus- (srvmgrl-), not sql- specific commands, so there's no chance to run them from third-party tool. I suppose they mask a number of sql operations such as ALTER SYSTEM and ALTER DATABASE. Though you may call sql*plus to execute them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top