Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Chapter 4 SECURING THE INSTANCE 113 GRANT CONNECT ON ENDPOINT::[TSQL Default TCP] to [public] Example 4.5: T/SQL code showing how to restore the default connection rights to the default TCP endpoint. After you have created a new TCP endpoint for the application account to use for a connection, you will need to revoke the public rights to connect to that endpoint, grant the application account rights to connect to that endpoint, and deny the appli- cation account rights to connect to the default endpoint as shown in Example 4.6. /*Create the new endpoint*/ CREATE ENDPOINT SampleEndpoint AS TCP (LISTENER_PORT¼12345, LISTENER_IP¼ALL) FOR TSQL() /*Remove default rights for all users to connect to the new endpoint.*/ REVOKE CONNECT ON ENDPOINT::[SampleEndpoint] to [public] /*Prevent application account from connecting to default endpoint*/ DENY CONNECT ON ENDPOINT::[TSQL Default TCP] to