Query All SQL 2008 Database File locations

I am using the following code to list all the DBs file location.
select CHAR(13) + 'use [' + name + ']' + CHAR(13) + CHAR(13) + 
' select physical_name from sys.database_files' + CHAR(13) 
+ 'GO' from sys.databases
Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.