x
login about faq Site discussion (meta-askssc)

full backup

Hello,

I manually run full back up but the file extension was mentioned as .trn hence the backup file saved with extension .trn however the same is full back up file.Can I simply rename the file extension from .trn to .bak

When I tried to rename the extension from .trn to .bak received message "If you change file name extension , the file may become unusable "...should I still can rename it from .trn to .bak file?

rgds,

more ▼

asked Jun 09 '11 at 04:58 AM in Default

pits gravatar image

pits
830 47 78 88

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

You can change the extension. It won't change the content of the file, and as far as SQL Server is concerned, when you make a restore, it expects whatever filename you provide to be a backupfile, the extension being .trn, .bak or whatever other extension it has.

more ▼

answered Jun 09 '11 at 05:00 AM

Magnus Ahlkvist gravatar image

Magnus Ahlkvist
13.7k 13 17 30

(comments are locked)
10|1200 characters needed characters left

You can call backup files whatever you like.

SQL doesn't care, the only place it presumes that backup files are called trn or bak, is in the SSMS GUI - and even there you can tell it to use another file.

The error message you are getting is simple an OS warning to say that if you have assigned extensions to particular programs, then changing them might break that functionality, but in essence you are not changing the contents of the file at all.

more ▼

answered Jun 09 '11 at 05:01 AM

Kev Riley gravatar image

Kev Riley ♦♦
46.1k 39 43 69

Correct-o-mundo - you don't need an extension at all, it's basically a Windows convention to help the O/S use the assigned application when working with a file.

You see this all the time from the other point of view when you try and open a file with an "unknown" extension and you get the Open With app. There's a checkbox with "Always use the selected program to open this kind of file". You create a relationship between an application and a file that the O/S can use going forward. It doesn't change the structure of the file in any way.

Jun 09 '11 at 05:18 AM Blackhawk-17
(comments are locked)
10|1200 characters needed characters left

Ditto to what @kev Riley and @magnus Ahlkvist have stated. The message you received is just that from the OS. SQL doesn't care what the file extension is called but rather that the file structure is that of a SQL Backup. If you have doubt, try restoring the file to a test server.

more ▼

answered Jun 09 '11 at 05:04 AM

Tim gravatar image

Tim
31.7k 23 32 116

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x170
x4

asked: Jun 09 '11 at 04:58 AM

Seen: 834 times

Last Updated: Jun 09 '11 at 04:58 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.