Results 1 to 4 of 4

Thread: Permissions

  1. #1
    Join Date
    Jul 2003
    Posts
    37

    Unanswered: Permissions

    Does anyone know where the actual code for a stored procedure is stored at? Is it in a system table?

  2. #2
    Join Date
    Feb 2003
    Location
    Montreal, Canada
    Posts
    117

    Re: Permissions

    your_database.syscomments - ctext field

    Originally posted by justastef
    Does anyone know where the actual code for a stored procedure is stored at? Is it in a system table?
    Steve

  3. #3
    Join Date
    Jul 2003
    Posts
    37
    Looking in the syscolumns table, I noticed that all of my procedures only have the first part and the last part located in it if they are long. The middle is missing... is this due to the column being only 8000 characters long at a time so its missing a chunk... If this is the case, how can I extract the entire contents of the code of a stored procedure (not through a tool just through t-sql)... is there a command to extract this information?

    I also noticed that I named the subject Permissions when I should have typed procedures... lol where is my head today.

  4. #4
    Join Date
    Feb 2003
    Location
    Montreal, Canada
    Posts
    117
    You're right. For each 8000 characters SQL inserts one row in syscomments table, so if you want to extract the text, you'll need to use a cursor and put the text somewhere in a flat file for instance.
    I'm not aware of any T-SQL command to extract that info automatically.

    Originally posted by justastef
    Looking in the syscolumns table, I noticed that all of my procedures only have the first part and the last part located in it if they are long. The middle is missing... is this due to the column being only 8000 characters long at a time so its missing a chunk... If this is the case, how can I extract the entire contents of the code of a stored procedure (not through a tool just through t-sql)... is there a command to extract this information?

    I also noticed that I named the subject Permissions when I should have typed procedures... lol where is my head today.
    Steve

Posting Permissions

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