How do I list all the databases for a given sql server 08 instance using sqlcmd?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Notes:
-E: Use a trusted connection ("Windows authentication"). Replace by-U username -P passwordfor SQL Server authentication.-S SERVER\INSTANCE: The instance of SQL Server to which to connect. If you don’t know the name of your instance, you can usesqlcmd -Lto get a list.-Q: The query to execute. The uppercaseQcauses sqlcmd to exit after executing the query.