x

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, 2011 at 04:58 AM in Default

pits gravatar image

pits
830 83 91 92

(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, 2011 at 05:00 AM

Magnus Ahlkvist gravatar image

Magnus Ahlkvist
16.6k 17 20 33

(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, 2011 at 05:01 AM

Kev Riley gravatar image

Kev Riley ♦♦
53.9k 47 49 76

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, 2011 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, 2011 at 05:04 AM

Tim gravatar image

Tim
36.4k 38 41 139

(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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x193
x4

asked: Jun 09, 2011 at 04:58 AM

Seen: 1358 times

Last Updated: Jun 09, 2011 at 04:58 AM