December 11, 2011 at 5:02 pm
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
December 11, 2011 at 5:34 pm
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
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply