List all the databases on SQL Server in the order they were created and their physical file path
SELECT name, crdate, filename FROM master..sysdatabases ORDER BY crdate
or
SELECT * FROM sys.databases ORDER BY create_date
Related Articles
Attach mdf file without ldf file in Database
SQL SERVER – Unable to Attach Database – File Activation Failure – The Log Cannot be Rebuilt Error: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) Could not open new database 'MyLostDB'. ...
How to setup printer to print into Generic/text only file?
Steps 1.Right click on My computer 2.Properties>>hardware>>device manager>> ports>> disable lpt1 3.start>> settings>>printers &faxes 4.right click>> add printer 5.select local>>next 6.create a new point>>next 7.enter a port name(path e.g ...
Query to search database for Column Name in tables
Use YourDatabase SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%MyColumn%' ORDER BY schema_name, table_name;