Getting Started with Adobe After Effects - Part 6: Motion Blur
A collection of quick technology learning tips from what people around you learn every day

Get the definition of all the database programmable objects using a single query

Jun 29 2011 6:45AM by Hardik Doshi   

Do you know we can get the definition of all the database programmable objects using a single query only? You can get the definition of procedure, view, trigger and function using following query:

SELECT  OBJECT_NAME(object_id),
        definition,
        is_schema_bound,
        uses_ansi_nulls,
        uses_quoted_identifier,
        uses_database_collation
FROM    sys.all_sql_modules

We can also get the information about object is schema bound or not, ansi nulls on or off, quoted identifier on or off.

Read More..   [0 clicks]

Published under: SQL Server Tips ·  ·  ·  · 


Hardik Doshi
20 · 9% · 2839
15
 
1
 
15
 
0
Incorrect
 
0
Interesting
 
0
Forgotten



Submit

6  Comments  

  • I knew about all_sql_modules, but never thought of using it to get the definition. Good one! Thanks for sharing, Hardik!

    commented on Jun 29 2011 6:47AM
    Nakul Vachhrajani
    4 · 33% · 10585
  • Yes, same here like nakul, Though know about that, never used in that way... :) nice tip hardik..

    commented on Jun 29 2011 7:21AM
    Ramireddy
    2 · 41% · 12972
  • Cheers for sharing

    commented on Jun 14 2012 2:02AM
    mrahman
    1720 · 0% · 11
  • Does anyone know how to get the carriage return/line feeds back into the definition?

    commented on Jun 14 2012 7:36AM
    goco
    1493 · 0% · 13
  • If you are on SQL Server 2012, the grid control that displays the results will preserve CR/LF. On other versions, you will need to set output to TEXT either through the toolbar or by pressing CTRL+T

    commented on Jun 14 2012 9:05AM
    Jacob Sebastian
    1 · 100% · 32004
  • Interesting! Btw, when items are created WITH ENCRYPTION the definition is NULL.

    commented on Aug 10 2012 3:57AM
    Dimitrios Staikos
    792 · 0% · 36

Your Comment


Sign Up or Login to post a comment.

"Get the definition of all the database programmable objects using a single query" rated 5 out of 5 by 15 readers
Get the definition of all the database programmable objects using a single query , 5.0 out of 5 based on 15 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]