I have a database which has one full back and 3 transaction log backups which were taken straight after the full backup.

As a test, before taking each transaction log backup I made a slight change to my data.

I then go onto my second SQL Server instance and do a restore of the full back and with no recovery.

This works fine.

Then I do a restore using a transaction log.

If I restore using the first transaction log out of the 3 (i.e. - the T log which was backed up straight after the full backup) then it restores my database successfully with the data.

If I try to restore using the 2nd or 3rd transaction log files it shows the message:-

System.Data.SqlClient.SqlError: The log in this backup set terminates at LSN 30000000010700001, which is too early to apply to the database. A more recent log backup that includes LSN 30000000013400001 can be restored.

So how can I get around this problem and restore my database using the 2nd or 3rd transaction log files?

You have to restore all log backups in the chain, not just the most recent. So if you want to bring the database to the latest point possible using the backups you have, you need to restore the full backup with norecovery, then the first log backup with norecovery, then the second, then the third. You can run RESTORE DATABASE MyDB WITH RECOVERY at the very end.

Was just wondering, is there no way for me to specify a specific date and time while doing the restore.

If for example I had 40 transaction log backups and wanted the latest log to be restored does this mean I would have to restore 39 transaction logs with norecovery (which were backed up previously) before I could reach the one I want?

Is there not a quicker way of doing this instead of going through and restoring one at a time?

Yes, it does mean that. If that's going to be a problem for you, consider taking differential backups. These backup every page (or maybe extent) that has been altered since the last full backup. So your recovery plan would then be: restore full with norecovery, restore latest diff with no recovery, restore all log backups since latest diff with no recovery, recover database.