Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
DB File Extension
DB File Extension
Rate Topic
Display Mode
Topic Options
Author
Message
jayoub1
jayoub1
Posted Monday, February 04, 2013 2:04 PM
Valued Member
Group: General Forum Members
Last Login: Saturday, May 18, 2013 6:32 PM
Points: 55,
Visits: 152
I noticed that one database file does not have an extension and the type is just File. I have an M:\ partition and when I look at the database files one just has the name and no .mdf extension. The file type is File. There are other .mdf files in the same folder and they are listed with the extension and type is SQL Server Database Primary Data File.
Also in the properties of the database under File Name it just shows the name and no extension.
Please let me know what I should do to correct this. Not sure if just renaming the file ABSdatabase.mdf will work without the database being detached or something. If I do rename the file with the extension are there any risks
Your help is appreciated
Jeff
Post #1415488
SQLRNNR
SQLRNNR
Posted Monday, February 04, 2013 2:07 PM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
You can leave the extension off if you wish. I wouldn't recommend it but it does work.
To rename it, detach perform the file rename and then reattach is what I would do.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1415489
george sibbald
george sibbald
Posted Monday, February 04, 2013 2:27 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 11:21 AM
Points: 5,268,
Visits: 11,199
my preferred method would be the alter database command
ALTER DATABASE yourdb
(
NAME = logicalfilename,
FILENAME = N'c:\t1dat2.mdf' --for example
);
then offline the database, actually rename the physical file and online the database again.
take a backup first whatever way you do it!
(backup\restore with move is in fact another option)
---------------------------------------------------------------------
Post #1415497
SQLRNNR
SQLRNNR
Posted Monday, February 04, 2013 2:37 PM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
george sibbald (2/4/2013)
my preferred method would be the alter database command
ALTER DATABASE yourdb
(
NAME = logicalfilename,
FILENAME = N'c:\t1dat2.mdf' --for example
);
then offline the database, actually rename the physical file and online the database again.
take a backup first whatever way you do it!
(backup\restore with move is in fact another option)
If this is a SQL 2008 database server, I'd go that route too.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1415500
george sibbald
george sibbald
Posted Monday, February 04, 2013 3:37 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 11:21 AM
Points: 5,268,
Visits: 11,199
works from 2005 up Jason.
---------------------------------------------------------------------
Post #1415515
SQLRNNR
SQLRNNR
Posted Monday, February 04, 2013 3:42 PM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
Yup. I always did the detach in 2005 after a bad experience. But yup - the syntax is supported in 2005. I don't recall the specifics of the bad experience.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1415516
jayoub1
jayoub1
Posted Tuesday, February 05, 2013 9:17 AM
Valued Member
Group: General Forum Members
Last Login: Saturday, May 18, 2013 6:32 PM
Points: 55,
Visits: 152
Thank you very much for the help.
Jeff
Jeff
Post #1415935
SQLRNNR
SQLRNNR
Posted Tuesday, February 05, 2013 9:20 AM
SSCoach
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
jayoub1 (2/5/2013)
Thank you very much for the help.
Jeff
You're welcome.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1415938
george sibbald
george sibbald
Posted Tuesday, February 05, 2013 9:21 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 11:21 AM
Points: 5,268,
Visits: 11,199
ditto
---------------------------------------------------------------------
Post #1415941
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.