Collections:
Location of Database Files in SQL Server
Where is my database stored on the hard disk in SQL Server?
✍: FYIcenter.com
If a database is created with simple CREATE DATABASE statement, the server will create two database files on the hard disk to store data and configuration information about that data bases:
To find out the location of database files, you can query the "sys.database_files" view as shown in this tutorial example:
USE FyiCenterData GO SELECT type_desc, physical_name, size FROM sys.database_files GO type_desc physical_name size ROWS c:\Program Files\Microsoft SQL Server \MSSQL.1\MSSQL\DATA\FyiCenterData.mdf 152 LOG c:\Program Files\Microsoft SQL Server \MSSQL.1\MSSQL\DATA\FyiCenterData_log.LDF 63
Go verify these two files with Windows Explorer.
2016-11-24, 717👍, 0💬
Popular Posts:
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and...
How do you know if SQL Server is running on your local system in SQL Server? After installing SQL Se...
How To Create a Stored Program Unit in Oracle? If you want to create a stored program unit, you can ...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
How To Create a Stored Function in Oracle? A stored function is a function with a specified name and...