Welcome to Microsoft Q&A!
How can I prevent clients to connect to IPlistener for a while rather than removing it completely?
Obviously, the listener does not have a disable attribute. You can limit connections by removing and adding.
Using T-SQL makes the process easy.
--remove
ALTER AVAILABILITY GROUP TestAG1 REMOVE LISTENER 'TestAGListener'
--add
ALTER AVAILABILITY GROUP TestAG1
ADD LISTENER 'TestAGListener' ( WITH IP ( ('192.168.2.110','255.255.255.0') ) , PORT = 1433 );
The above is an example of mine, you can refer to it.
Here is the relevant documents from Microsoft: Create Listener and Remove Listener with using T-SQL.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.