Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 How to create .TRN file in sql server 2005

Author  Topic 

mrpreethi
Starting Member

10 Posts

Posted - 2010-02-04 : 02:25:04
Hi All ,

How to create .TRN file in sql server 2005 using sql server management studio?Also once created how to read it ?Iam very new to SQL Server.Please help......

Kristen
Test

22859 Posts

Posted - 2010-02-04 : 02:33:30
What do you think that you want a .TRN file for?
Go to Top of Page

mrpreethi
Starting Member

10 Posts

Posted - 2010-02-04 : 02:36:52
Actually ,iam very new to SQL Server DBA .Iam asked to open a trn file which exists in production server.In development i dont have .trn file .So i want to create .trn in dev server and try to open the same .Please help
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-02-04 : 03:12:29
problem is a TRN file could be anything.

Most commonly it is a Backup of the Transaction log. Seems odd that you are being asked to "Create" a TRN file if what they want is a Backup - I would have expected them to say "Make a backup" instead.

Which is why I asked what you think they are asking you to do. Perhaps you should get them to clarify? My question would be "Do you want me to make a transaction backup? set up a scheduled transaction backup every 15 minutes? or something else ..."
Go to Top of Page

mrpreethi
Starting Member

10 Posts

Posted - 2010-02-04 : 05:01:38
I clarified ..Its just that i need to open .TRN file .but iam unable to open with notepad or wordpad .
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-02-04 : 08:29:25
If it's a transaction log backup file, then it can't be simply opened. It's part of a backup set. It's something that you would use when restoring a database from a backup.

I think you need to go to the person who asked you to open it and get more details on what it is they want you to do.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-02-04 : 09:53:29
For example, you could create a new, temporary, database and restore to that.

however, you can't restore a Transaction log backup file on its own. You must first restore a FULL Backup, then you can Restore one, or more, transaction log backups files after that (but they must be restored in chronological order and no files must be left out).

But I'm sure this is still not the answer to the question - because you would need a Full backup file too, and I'm sure the person who is asking you to do the job would know that.

So I think we are still not clear what you are being asked to do.

If you ONLY have a Transaction Log backup there is pretty much NOTHING that you can do with it (you could get a Transaction log Reader, but reading one TRN file, in isolation, is not going to make much sense)

SQL has a command to check what is "in" a Backup file, so you could use that to examine the header(s) in the file

RESTORE HEADERONLY FROM DISK = N'X:\Path\YourFile.TRN'
Go to Top of Page
   

- Advertisement -