How can I write a SQL query to get the DB name ? Usually we use SELECT DB_NAME() AS DataBaseName, but at that time teh DB is in use. If we didn;t write use [dbname][/dbname], is there any way to get the DB name ?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!