sp_addextendedproperty for transaction log file

  • hi there all,

    I am "playing around" with extended properties. I realized you can add them e. g. for the database files, using the logical file name, like this:

    execute sys.sp_addextendedproperty 
    @name = 'myOwnInformation'
    , @value = 'that works'
    , @level0type = 'FILEGROUP'
    , @level0name = 'PRIMARY'
    , @level1type = 'LOGICAL FILE NAME'
    , @level1name = 'DataFile1'
    , @level2type = null
    , @level2name = null
    go

    Unfortunately, this seems not to work for the transaction log file, as this seems not to have a filegroup. Giving NULL or empty string as filegroup returns in an error.

    Msg 15600, Level 16, State 1, Procedure sp_addextendedproperty, Line 37 [Batch Start Line 9]

    An invalid parameter or option was specified for procedure 'sp_addextendedproperty'.

    Is there no solution or do I just not find it?

    Thank you very much,

    Wolfgang

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • At least is says „database file“, class 22.

    when looking here it is written little bit different, saying @level1type can be „logical file name“.

    thanks for the answer, and ok, when not possible it is not 🙂 would just have been convenient

    • This reply was modified 4 years, 6 months ago by  WolfgangE.
  • It is a logical file name, but from my reading, that is bound below the Filegroup. There isn't a Filegroup for the log.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply