Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Help with this CLR stored proc Expand / Collapse
Author
Message
Posted Saturday, December 14, 2013 5:20 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 17, 2013 4:44 AM
Points: 2, Visits: 4
Hi, please somebody help me with this store procedure. I am very confused. This is a CLR stored proc. I understand the basic is using a vb 'RODAssembly'. But what does exactly each line mean? I know this is rather basic, but didn't find help documents online.

exec sys.sp_addextendedproperty @name = N'AutoDepolyed', @value = N'yes',@level0type = N'Schema',@level0name = N'dbo',
@level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go

exec sys.sp_addextendedproperty @name = N'SqlAssemblyFile', @value = N'RODAssembly.vb',@level0type = N'Schema',@level0name = N'dbo',
@level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go

exec sys.sp_addextendedproperty @name = N'SqlAssemblyFileLine', @value =26,@level0type = N'Schema',@level0name = N'dbo', @level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go
Post #1522993
Posted Saturday, December 14, 2013 6:10 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:19 PM
Points: 1,796, Visits: 5,799
mqy37 (12/14/2013)
Hi, please somebody help me with this store procedure. I am very confused. This is a CLR stored proc. I understand the basic is using a vb 'RODAssembly'. But what does exactly each line mean? I know this is rather basic, but didn't find help documents online.

exec sys.sp_addextendedproperty @name = N'AutoDepolyed', @value = N'yes',@level0type = N'Schema',@level0name = N'dbo',
@level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go

exec sys.sp_addextendedproperty @name = N'SqlAssemblyFile', @value = N'RODAssembly.vb',@level0type = N'Schema',@level0name = N'dbo',
@level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go

exec sys.sp_addextendedproperty @name = N'SqlAssemblyFileLine', @value =26,@level0type = N'Schema',@level0name = N'dbo', @level1type = N'Procedure',@level1name = N'SendMessageWithPriority'
go


All you have there is the last few lines of a deployment script for a CLR procedure, there's not a lot to be learned from them except that you have a CLR proc called dbo.SendMessageWithPriority and the source code file was called RODAssembly.vb.

The three lines are just adding extended properties to an existing procedure (which the script will likely have created itself).

Extended properties can be thought of as metadata often used to document objects in the database.


MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1523002
    Posted Sunday, December 15, 2013 9:00 AM
    Forum Newbie

    Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

    Group: General Forum Members
    Last Login: Tuesday, December 17, 2013 4:44 AM
    Points: 2, Visits: 4
    This is what I was looking for. So it compiles and executes the source code on the fly? I guessed the meaning, but nice to see it's correct. Thanks.
    Post #1523041
    Posted Sunday, December 15, 2013 5:24 PM


    SSCommitted

    SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

    Group: General Forum Members
    Last Login: Yesterday @ 4:19 PM
    Points: 1,796, Visits: 5,799
    mqy37 (12/15/2013)
    ...So it compiles and executes the source code on the fly? I guessed the meaning, but nice to see it's correct. Thanks.


    That is not what I said and it is not what happens.

    The code you posted is just the last few commands from a bigger deployment script.

    You have not included the actual deployment, just a few "decorations".



    MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1523069
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse