How To Set MS-SQL "Auto Close" without the SQL Server Management Tools

How To Set Auto Close to "False" when SQL Server Management Tools are not installed.
  1. Open a DOS (Command Prompt).
  2. Enter "sqlcmd /S <SERVERNAME\INSTANCE> where <SERVERNAME\INSTANCE> is the server name and (sometimes optional) instance name of the SQL installation.
  3. At the sqlcmd command prompt, enter "ALTER DATABASE <DATABASE_NAME> set auto_close off" where <DATABASE_NAME> is the name of the database the you want to set Auto Close to False on.
  4. Hit Enter.
  5. Type "GO". Hit Enter.
  6. When the command prompt comes back, type "exit" to leave sqlcmd.
How did we do with this article?