• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

How can I get the list of only user defined Stored Procedures?

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using getProcedures(.....) of DatabaseMetadata. I want to get list of only user defined stored procedures, but getProcedures gives me list of both(user+system).

Thanks
Amrit
 
author & internet detective
Posts: 39755
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amrit,
What database are you using? Many databases, such as db2 and Oracle, keep user defined stored procs under the userid/schema. This is one of the arguments that can be based to getProcedures().
 
Amrit Tiwana
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne, I'm using SQL Server 2000. As in default, Northwind database I want to filter out the stored procedures with TYPE = 'System'.
 
Jeanne Boyarsky
author & internet detective
Posts: 39755
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amrit,
It looks like Sql Server has an owner for each stored procedure too. Try filtering on that. You will need to know the owner of your stored proc because you can't say all except system.
 
BWA HA HA HA HA HA HA! Tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!