<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Find Location of Data File Using T-SQL</title>
	<atom:link href="http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Wed, 19 Jun 2013 21:45:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: bill</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-410291</link>
		<dc:creator><![CDATA[bill]]></dc:creator>
		<pubDate>Sun, 20 Jan 2013 14:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-410291</guid>
		<description><![CDATA[This script works better
list database name, owner,filename and location

use master
Select 
sys.databases.name as [database name],
suser_sname(owner_sid) as [owner name],
sys.master_files.name as [file name],
sys.master_files.physical_name as [Location]
from sys.databases
right join sys.master_files on sys.databases.database_id = sys.master_files.database_id
order by location,sys.database.name]]></description>
		<content:encoded><![CDATA[<p>This script works better<br />
list database name, owner,filename and location</p>
<p>use master<br />
Select<br />
sys.databases.name as [database name],<br />
suser_sname(owner_sid) as [owner name],<br />
sys.master_files.name as [file name],<br />
sys.master_files.physical_name as [Location]<br />
from sys.databases<br />
right join sys.master_files on sys.databases.database_id = sys.master_files.database_id<br />
order by location,sys.database.name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #010 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-403899</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #010 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 05 Jan 2013 01:31:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-403899</guid>
		<description><![CDATA[[...] Find Location of Data File Using T-SQL [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Find Location of Data File Using T-SQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinod</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-355896</link>
		<dc:creator><![CDATA[Vinod]]></dc:creator>
		<pubDate>Thu, 04 Oct 2012 15:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-355896</guid>
		<description><![CDATA[thanks Again.]]></description>
		<content:encoded><![CDATA[<p>thanks Again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twerp</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-338394</link>
		<dc:creator><![CDATA[Twerp]]></dc:creator>
		<pubDate>Tue, 28 Aug 2012 14:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-338394</guid>
		<description><![CDATA[Thanks so very much!]]></description>
		<content:encoded><![CDATA[<p>Thanks so very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hervino14</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-312642</link>
		<dc:creator><![CDATA[hervino14]]></dc:creator>
		<pubDate>Thu, 12 Jul 2012 14:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-312642</guid>
		<description><![CDATA[Good script. I wonder how I can have the same result with a batch script]]></description>
		<content:encoded><![CDATA[<p>Good script. I wonder how I can have the same result with a batch script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muzzammil Shah</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-271774</link>
		<dc:creator><![CDATA[Muzzammil Shah]]></dc:creator>
		<pubDate>Wed, 04 Apr 2012 06:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-271774</guid>
		<description><![CDATA[Can any one tell that how should we query data in Dat Extenstion File in via Transact SQL??

i just need to know Select Query like its not working


Select * from &#039;D:\Data\abc.dat&#039;]]></description>
		<content:encoded><![CDATA[<p>Can any one tell that how should we query data in Dat Extenstion File in via Transact SQL??</p>
<p>i just need to know Select Query like its not working</p>
<p>Select * from &#8216;D:\Data\abc.dat&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonny</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-246176</link>
		<dc:creator><![CDATA[tonny]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 13:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-246176</guid>
		<description><![CDATA[that doesnt give you free space. sorry. i&#039;ll butt out now
please remove that article form the site]]></description>
		<content:encoded><![CDATA[<p>that doesnt give you free space. sorry. i&#8217;ll butt out now<br />
please remove that article form the site</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonny</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-246174</link>
		<dc:creator><![CDATA[tonny]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 13:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-246174</guid>
		<description><![CDATA[THe answer to Maksuda lies here:
http://blog.sqlauthority.com/2010/02/08/sql-server-find-the-size-of-database-file-find-the-size-of-log-file/]]></description>
		<content:encoded><![CDATA[<p>THe answer to Maksuda lies here:<br />
<a href="http://blog.sqlauthority.com/2010/02/08/sql-server-find-the-size-of-database-file-find-the-size-of-log-file/" rel="nofollow">http://blog.sqlauthority.com/2010/02/08/sql-server-find-the-size-of-database-file-find-the-size-of-log-file/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonny</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-246173</link>
		<dc:creator><![CDATA[tonny]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 13:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-246173</guid>
		<description><![CDATA[it should be Selvam :-)]]></description>
		<content:encoded><![CDATA[<p>it should be Selvam :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonny</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-246172</link>
		<dc:creator><![CDATA[tonny]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 13:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-246172</guid>
		<description><![CDATA[To selam - How does that give you the free space?]]></description>
		<content:encoded><![CDATA[<p>To selam &#8211; How does that give you the free space?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-219235</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 16 Dec 2011 07:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-219235</guid>
		<description><![CDATA[What do you mean by it? Do you want to know the name?

select db_name()]]></description>
		<content:encoded><![CDATA[<p>What do you mean by it? Do you want to know the name?</p>
<p>select db_name()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toystory</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-211798</link>
		<dc:creator><![CDATA[toystory]]></dc:creator>
		<pubDate>Tue, 06 Dec 2011 03:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-211798</guid>
		<description><![CDATA[Hi, how can I find the address of a database? I the website like and name, do I need anything else?]]></description>
		<content:encoded><![CDATA[<p>Hi, how can I find the address of a database? I the website like and name, do I need anything else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Selvam Krishnan</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-207910</link>
		<dc:creator><![CDATA[Selvam Krishnan]]></dc:creator>
		<pubDate>Wed, 30 Nov 2011 11:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-207910</guid>
		<description><![CDATA[use master
SELECT * FROM sys.database_files]]></description>
		<content:encoded><![CDATA[<p>use master<br />
SELECT * FROM sys.database_files</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maksuda</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-83165</link>
		<dc:creator><![CDATA[Maksuda]]></dc:creator>
		<pubDate>Thu, 05 Aug 2010 18:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-83165</guid>
		<description><![CDATA[Hi Pinal:
How could I know how much free space my SQL database has right now? Also what is the maximum size of SQL 2005 database can be. 
I have a server with more than 3 TB HD space. Already 8 databases are there and more are going to be in. Mots of them are 100 to 150 GB. I&#039;m afraid about thinking SQL 2005&#039;s space capacity.
 
Thanks in advance.

Maksuda...]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal:<br />
How could I know how much free space my SQL database has right now? Also what is the maximum size of SQL 2005 database can be.<br />
I have a server with more than 3 TB HD space. Already 8 databases are there and more are going to be in. Mots of them are 100 to 150 GB. I&#8217;m afraid about thinking SQL 2005&#8242;s space capacity.</p>
<p>Thanks in advance.</p>
<p>Maksuda&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-71288</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 17 May 2010 14:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-71288</guid>
		<description><![CDATA[If you dont want to use bcp, use BULK INSERT method
Refer this for more informations
http://beyondrelational.com/blogs/madhivanan/archive/2010/03/17/bulk-insert-to-table-with-specific-columns.aspx]]></description>
		<content:encoded><![CDATA[<p>If you dont want to use bcp, use BULK INSERT method<br />
Refer this for more informations<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2010/03/17/bulk-insert-to-table-with-specific-columns.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2010/03/17/bulk-insert-to-table-with-specific-columns.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vicky</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-71256</link>
		<dc:creator><![CDATA[vicky]]></dc:creator>
		<pubDate>Mon, 17 May 2010 11:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-71256</guid>
		<description><![CDATA[hi pinal

i wana import csv sheets data in sql server 2005 without using bulk cpoy.if u hv diff way plz  do somethink 

regards
vicky
web deveolper]]></description>
		<content:encoded><![CDATA[<p>hi pinal</p>
<p>i wana import csv sheets data in sql server 2005 without using bulk cpoy.if u hv diff way plz  do somethink </p>
<p>regards<br />
vicky<br />
web deveolper</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vicky</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-71255</link>
		<dc:creator><![CDATA[vicky]]></dc:creator>
		<pubDate>Mon, 17 May 2010 11:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-71255</guid>
		<description><![CDATA[hi pinal
i wana to store excel csv file data in sql server 2005 .
plz help me how this possible]]></description>
		<content:encoded><![CDATA[<p>hi pinal<br />
i wana to store excel csv file data in sql server 2005 .<br />
plz help me how this possible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-63545</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 09:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-63545</guid>
		<description><![CDATA[In SQL Server help file, goto index and type sp_
It will list out all procedures that start with sp_]]></description>
		<content:encoded><![CDATA[<p>In SQL Server help file, goto index and type sp_<br />
It will list out all procedures that start with sp_</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59786</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Fri, 15 Jan 2010 10:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59786</guid>
		<description><![CDATA[Hello Tom,

Use the sysfiles table as beow:

SELECT [filename] FROM dbName.dbo.sysfiles

Or you can use sp_helpdb dbName

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Tom,</p>
<p>Use the sysfiles table as beow:</p>
<p>SELECT [filename] FROM dbName.dbo.sysfiles</p>
<p>Or you can use sp_helpdb dbName</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59741</link>
		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Thu, 14 Jan 2010 17:05:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59741</guid>
		<description><![CDATA[Some of us are stuck with SS2K. How would you modify this script for SS2K?]]></description>
		<content:encoded><![CDATA[<p>Some of us are stuck with SS2K. How would you modify this script for SS2K?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vasant</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59423</link>
		<dc:creator><![CDATA[Vasant]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 06:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59423</guid>
		<description><![CDATA[Hi Pinal, 

I use for same purpose: - sp_helpdb &#039;master&#039; OR SELECT physical_name FROM master.sys.master_files WHERE name like &#039;master%&#039; AND FILE_ID = 1-- for DATA file.

Is it good?

Code which you provide  need database_id = 1, So firdt need to find out it using ‘sp_helpdb’
SELECT SUBSTRING(physical_name, 1,
CHARINDEX(N&#039;master.mdf&#039;,
LOWER(physical_name)) - 1) DataFileLocation
FROM master.sys.master_files
WHERE database_id = 1 AND FILE_ID = 1

Thanks

Vasant Jagtap]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, </p>
<p>I use for same purpose: &#8211; sp_helpdb &#8216;master&#8217; OR SELECT physical_name FROM master.sys.master_files WHERE name like &#8216;master%&#8217; AND FILE_ID = 1&#8211; for DATA file.</p>
<p>Is it good?</p>
<p>Code which you provide  need database_id = 1, So firdt need to find out it using ‘sp_helpdb’<br />
SELECT SUBSTRING(physical_name, 1,<br />
CHARINDEX(N&#8217;master.mdf&#8217;,<br />
LOWER(physical_name)) &#8211; 1) DataFileLocation<br />
FROM master.sys.master_files<br />
WHERE database_id = 1 AND FILE_ID = 1</p>
<p>Thanks</p>
<p>Vasant Jagtap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59408</link>
		<dc:creator><![CDATA[Saurabh]]></dc:creator>
		<pubDate>Wed, 06 Jan 2010 19:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59408</guid>
		<description><![CDATA[Hi pinal,
really its very good script. I need to know more abt sp_help commands, can we have list of all those? It will be very useful ! Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi pinal,<br />
really its very good script. I need to know more abt sp_help commands, can we have list of all those? It will be very useful ! Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramdas</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59331</link>
		<dc:creator><![CDATA[Ramdas]]></dc:creator>
		<pubDate>Mon, 04 Jan 2010 15:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59331</guid>
		<description><![CDATA[Thanks for the script.
Ramdas]]></description>
		<content:encoded><![CDATA[<p>Thanks for the script.<br />
Ramdas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudarshan</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59286</link>
		<dc:creator><![CDATA[Sudarshan]]></dc:creator>
		<pubDate>Sun, 03 Jan 2010 08:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59286</guid>
		<description><![CDATA[Hey Pinal,
Hope you are doing great!
is there any Chance to Get Access to Power point Presenatations or Any Videos.
Please guide me
Thanks

Have a great day ahead.]]></description>
		<content:encoded><![CDATA[<p>Hey Pinal,<br />
Hope you are doing great!<br />
is there any Chance to Get Access to Power point Presenatations or Any Videos.<br />
Please guide me<br />
Thanks</p>
<p>Have a great day ahead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/01/02/sql-server-find-location-of-data-file-using-t-sql/#comment-59278</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Sun, 03 Jan 2010 03:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7669#comment-59278</guid>
		<description><![CDATA[Hi Abdul,

Use the sp_helpdb to get the name of database files.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hi Abdul,</p>
<p>Use the sp_helpdb to get the name of database files.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
</channel>
</rss>
