Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Display Names and Locations of SQL Database Files and DB Owners

By Charles Brinkman,

As part of maintaining shared development servers, I frequently check that users aren’t placing SQL database files in places where they shouldn’t be (restricting this through the file system isn't practical since this is a sandbox).   I came up with the script below which displays the names of all of the SQL databases on a SQL Server instance, their data and transaction log files, their owner, and their physical location. I hope that this will be helpful to anyone who finds themselves in a similar situation.

Total article views: 1512 | Views in the last 30 days: 3
 
Related Articles
SCRIPT

List Database Users and their Corresponding Roles

Database Users and their Corresponding Roles and type login.

ARTICLE

Application Developers don’t own their data

As a data guy, I always smile when application developers refer to ‘their’ data. If only it were tha...

SCRIPT

Listing Subscribed SSRS Reports including Parameters & their Values

This script will allow user to analysis their Subscribed Reports.

BLOG

Microsoft Changing Their Lifecycle Support Policy

Microsoft’s Bob Ward has a new post up on the CSS SQL Server Engineers blog about a change in their....

ARTICLE

Going over their heads: IT Decisions

Phil factor points out that Marketing people who appeal directly to enterprise CIOs are generally wa...

Tags
 
Contribute