Current Lsn Number for user database and system database

  • Hi all

    Today i got one call from friend he is asking how find the current lsn number for system databases as well as user database and where it will store ..Please give information

    vivek

  • LSN is normally the Log Sequence Number and you can read about that here:

    http://msdn.microsoft.com/en-us/library/ms190411.aspx

    If you mean the databse ID number read about it here:

    http://msdn.microsoft.com/en-us/library/ms186274.aspx

    Now if you really mean Database ID (DB_ID) then:

    SELECT DB_ID('Master') AS 'MasterId',DB_ID('Model') AS 'ModelId',DB_ID('Msdb') AS 'MsdbId'

    ,DB_ID('AdventureWorks') AS 'User database ID'

    Results:

    MasterId' ModelId' 'MsdbId' AdventureWorks'

    1 3 4 6

    SELECT DB_Name(1),DB_Name(3),DB_Name(4),DB_Name(6)

    Results:

    mastermodelmsdbAdventureWorks

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

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