Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2006, 03:18 AM
Registered User
 
Join Date: Feb 2005
Location: bangalore, karnataka, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to itvenky
Default Oracle SP


How do i check if a stored procedure and sequence already exists in oracle DB ?
Do we have something like sysobjects in SQL?

Thanks
-Venky

 
Old November 22nd, 2006, 03:15 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can check DBA_PROCEDURES and DBA_SEQUENCES (or USER_PROCEDURES and USER_SEQUENCES, if you are the schema owner). Do a DESCribe on these to see what you might want to query, or SPOOL the SELECT and examine the output via Notepad. Or you can try to create a procedure or sequence, using the name you think might already exist. Oracle will give you an error if an object of that type already has that name. (But don't use "OR REPLACE" in your create clause for this check, because then if something does exist by that name it will be replaced by your code).

 
Old November 23rd, 2006, 03:13 AM
Registered User
 
Join Date: Feb 2005
Location: bangalore, karnataka, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to itvenky
Default

Thanks. was helpful.





Similar Threads
Thread Thread Starter Forum Replies Last Post
fill dataset with oracle sp p2pMember ASP.NET 1.0 and 1.1 Professional 1 October 4th, 2006 04:19 AM
exec sp within another sp collie SQL Server 2000 1 December 22nd, 2004 05:46 AM
Using a Pass-Through Query to call an Oracle SP Richelou Access VBA 1 September 17th, 2004 04:56 AM
Can a SP run another SP as sa? dbradley SQL Server 2000 0 July 17th, 2003 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.