Solved

Changing File In SQL 2005

Posted on 2009-05-17
4
174 Views
Last Modified: 2012-05-07
I have a database with mulitple files and one an .ldf file has a file type of "data". Since it's this type of file type I can't shink the log file due to it being in use. Can I change the file type back to "log" with no issues?
0
Comment
Question by:Robert Pollick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
cdaly33 earned 500 total points
ID: 24407918
Are you saying that you have an ldf that is listed in MS SQL Management Studio as a Rows Data file type?  You can't change a data file to a log file.
0
 

Author Closing Comment

by:Robert Pollick
ID: 31582434
Thanks... I finally found it in the Help area.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24410205
the file names do not matter. you can name your data files and log files with any name/extension you wish, although it's not really meaningful to name a data file .ldf.

and as cdaly indicates: you cannot change a data file to a log file or vice-versa.

I do not remember to have seen a "file in use" error when shrinking a data or a log file ...
can you clarify how do tried to isse the shrink file?
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with SQL - TOP 10 by date and by group 13 45
Replace Dates in query 14 56
LAG_ROWID - how do I get the right order using this query? 2 26
Need to find substring in SQL 5 52
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question