Re: Get all stored procedures



I would further filter this to avoid system sprocs. The routine run to
populate Enterprise Manager is:

select o.name
, user_name(o.uid), o.crdate, xtype=convert(nchar(2), o.xtype)
, o.id, OBJECTPROPERTY(o.id, N'ExecIsStartup')
, OBJECTPROPERTY(o.id, N'ExecIsQuotedIdentOn')
, OBJECTPROPERTY(o.id, N'ExecIsAnsiNullsOn')
, OBJECTPROPERTY(o.id, N'IsMSShipped')
from dbo.sysobjects o
where (OBJECTPROPERTY(o.id, N'IsProcedure') = 1
or OBJECTPROPERTY(o.id, N'IsExtendedProc') = 1
or OBJECTPROPERTY(o.id, N'IsReplProc') = 1)
and o.name not like N'#%%'
order by o.name

where OBJECTPROPERTY(o.id, N'IsMSShipped') is used to determine if this is
a user sproc or a Microsoft system sproc. To simply get names, you can use:


SELECT o.name
FROM dbo.sysobjects o
where (OBJECTPROPERTY(o.id, N'IsProcedure') = 1
or OBJECTPROPERTY(o.id, N'IsExtendedProc') = 1
or OBJECTPROPERTY(o.id, N'IsReplProc') = 1)
and o.name not like N'#%%'
and OBJECTPROPERTY(o.id, N'IsMSShipped') = 0 -- important part
order by o.name

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"Steven Cheng[MSFT]" wrote:

> Hi Dave,
>
> For SQLSERVER, we can use the following SQL statement to query the SP
> objects of a certain database:
>
> select * from sysobjects where type='P'
>
> Also, I think there also exists the same object modal in SQLdmo.
>
> For oracle, I suggest you try checking the PL-SQL reference or have a
> search on the internet which may give you a quick awnser.
> Hope helps. Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
> --------------------
> | Thread-Topic: Get all stored procedures
> | thread-index: AcWFtSAIUweRsUVuQ4a/lObVML4j1A==
> | X-WBNR-Posting-Host: 199.45.247.98
> | From: "=?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=" <thielen@xxxxxxxxxxxxx>
> | References: <6430337F-0929-4A78-94C3-5A58CBE5A43F@xxxxxxxxxxxxx>
> <#UjDiDYhFHA.3316@xxxxxxxxxxxxxxxxxxxx>
> | Subject: Re: Get all stored procedures
> | Date: Sun, 10 Jul 2005 18:09:02 -0700
> | Lines: 47
> | Message-ID: <46378900-42B1-41F6-AC00-AC41ADB6C303@xxxxxxxxxxxxx>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.dotnet.framework.adonet
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.adonet:32388
> | X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
> |
> | Hello;
> |
> | Does anyone know the specific select for Sql Server and/or Oracle to get
> the
> | stored procedures?
> |
> | Any any idea how to get it from the OLE-DB connector
> |
> | --
> | thanks - dave
> |
> | ps - what is BHOM?
> |
> |
> |
> | "William (Bill) Vaughn" wrote:
> |
> | > Two of the data sources you mention have different interfaces and
> different
> | > ways to expose stored procedures--OLE DB is simply an interface to data
> | > sources.
> | > For SQL Server, you can use the sysobjects table to query for all
> objects in
> | > the database. For Oracle? BHOM.
> | >
> | > --
> | > ____________________________________
> | > William (Bill) Vaughn
> | > Author, Mentor, Consultant
> | > Microsoft MVP
> | > www.betav.com/blog/billva
> | > www.betav.com
> | > Please reply only to the newsgroup so that others can benefit.
> | > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> | > __________________________________
> | >
> | > "David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
> | > news:6430337F-0929-4A78-94C3-5A58CBE5A43F@xxxxxxxxxxxxxxxx
> | > > Hi;
> | > >
> | > > Is there a way under ADO .NET to get all stored procedures in a
> database.
> | > > I'd prefer a single solution but I can live with one that is specific
> to
> | > > each
> | > > driver: Sql Server, Oracle, and OLE-DB.
> | > >
> | > > --
> | > > thanks - dave
> | >
> | >
> | >
> |
>
>
.



Relevant Pages

  • Re: ORACLE CLIENT USERS BEWARE: Bug in Query Builder breaks SQL
    ... For what it's worth, none of this surprises me; Microsoft create all kinds of "providers" based on fashions and fads of the day, the press release reads "fully supports Oracle", then they lose interest and you are stuck with something that doesn't work anymore. ... Comparing the Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET ... When trying to use the Query Builder with Oracle, queries that create INNER JOIN syntax result in an error in Query Builder when trying to generate your schemas. ...
    (microsoft.public.vsnet.general)
  • Re: Oracle Database Access via IIS 6.0 ASP Pages on Windows 2003 S
    ... communicate back through IIS to SQL*NET installed for the Oracle Client. ... Microsoft SQL Server 2000 Standard with SP3a installed on same box. ... Microsoft OLE DB Provider for ODBC Drivers error '80004005' ...
    (microsoft.public.inetserver.iis)
  • Re: Database speed issues
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Those sold by Microsoft, Oracle itself and DataDirect. ... variety of data providers, but they're all ADO.Net Data Providers. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ODBC-error ORA-12535: TNS:operation timed out when trying to connect to Oracle 9.2.0
    ... I'm trying to connect to an Oracle 9.2 database via TCP from Microsoft ... Microsoft Windows Server 2003 SP1 ... I suppose the problem to be connected with the ODBC-driver on the client ...
    (comp.databases.oracle.misc)
  • Re: Getting rid of stored procedures
    ... William (Bill) Vaughn ... Please reply only to the newsgroup so that others can benefit. ... > Have an opinion on the effectiveness of Microsoft Embedded newsgroups? ... I want to move away from>> stored procedures for these cases because it's a maintanence ...
    (microsoft.public.dotnet.framework.adonet)