Search code examples
sql-servert-sqlsql-server-expressssms

SQL Server: enable remote connections without SSMS


I've got a SQL Server Express 2008 install on my web server, which by default does not allow remote connections (probably a good thing.) I opted not to install SQL Server Management Studio Express along with it for disk space and other reasons.

I need to enable remote connections but any instructions I can find involve using SSMS to change that setting. Surely there's a transact-sql statement of some kind i can from from sqlcmd.exe to change the setting?!

Thanks!


Solution

  • I went into my SMS and my local instance properties -> Connections -> checked "Allow remote connections to this server" and scripted the change.

    EXEC sys.sp_configure N'remote access', N'1'
    GO
    RECONFIGURE WITH OVERRIDE
    GO