Anonymous
Asked in
Cars &Transportation
·
2 weeks ago
Can move LDF file to another drive?
Contents
- How do I move MDF and LDF files to another drive in SQL Server?
- How do I change the location of a SQL log file?
- How do I move a SQL Express database to another drive?
How do I move MDF and LDF files to another drive in SQL Server?
Solution1USE master GO CREATE DATABASE TestDB GO USE TestDB GO CREATE TABLE TestTable ( ID INT, Val CHAR (1) ) INSERT INTO TestTable(ID, Val) VALUES (1,'A'), (2,'B'),(3, 'C')2SELECT name AS FileLogicalName, physical_name AS FileLocation FROM sys.
How do I change the location of a SQL log file?
View or change the default locations for database files1In Object Explorer, right-click on your server and click Properties.2In the left panel on that Properties page, click the Database settings tab.3In Database default locations, view the current default locations for new data files and new log files.
How do I move a SQL Express database to another drive?
Right click the database that needs the files to be moved to another location. Select "Tasks => Detach...". In the Detach Database window, check the box "Drop Connections". Click "OK".
Related Questions
Relevance
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago
Write us your question, the answer will be received in 24 hours