Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    1

    Post Unanswered: system vs non-system stored procedures

    How to access system SP's and non-system SP's using sysobjects table.

    if i use the following query to differentiate system stored procs, it skip user defined stored prcos started with 'sp_'.

    SELECT name FROM sysobjects WHERE type = 'P' and (name not like 'sp[_]%'

    Is there any way to retrieve system stored procedure and non-system stored procedure infor using sysobjects like sqlserver provides category field to differentiate but not sybase is there any way???

    SELECT name FROM sysobjects WHERE type = 'P' And category = 0

  2. #2
    Join Date
    Sep 2002
    Location
    Hong Kong
    Posts
    159

    Re: system vs non-system stored procedures

    You could maintain a table of sybase stored procedure name before adding use defined "sp_xyz" procedures.

    use sybsystemprocs
    go
    create table sybase_proc_names (
    name varchar(30) not null
    )
    go
    insert sybase_proc_names ( name )
    select name from sysobjects where type = 'P'
    go

    If you now add your procedures to sybsystemprocs you will be able to find out the names using the following...

    select name
    from sysobjects where name not in (select name from sybase_proc_names)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •