• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Amrit Tiwana
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • 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
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic