on 2011 Jun 15 2:30 PM
Attempting to do a Alter Subscription statement to change the IP address. I get an error stating it can't recognize the subscription name Any suggestions? Thanks
Request clarification before answering.
In order to change the MobiLink address for this remote database, you will need to execute the following command :
ALTER SYNCHRONIZATION SUBSCRIPTION TO kokolink FOR "77" TYPE HTTPS ADDRESS 'host=[newIPAddress]; port=443; trusted_certificates=[fullPath]\\mobilink_public_cert.cer';
Replace [newIPAddress] with the new ip address of the ML Server, and replace [fullPath] with the full path to your public certificate.
You will need to execute a different ALTER SYNCHRONIZATION SUBSCRIPTION command on each remote database, since you've defined a different synchronization user at each location.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello I made the change I now get syntax error near 77 on line 1 Also you are saying I will need to create 2000 separate packages to push out this change to each lap top ouch!
ALTER SYNCHRONIZATION SUBSCRIPTION TO kokolink FOR 77 TYPE HTTPS ADDRESS 'host=host=hg.nspirehealth.com; port=443; trusted_certificates=c:program fileskokolinkpdsApp3mobilink_public_cert.cer';
AFAIK, userids starting with digits have to be put in double quotes, so try
... TO "77" ...
That did it! I had done this before I started the blog and forgot the "77" thanks for your help.
Sorry, forgot numeric identifiers needed double quotes. Thanks Volker.
You could probably send a single package that creates, then executes and then drops a stored procedure that looks something like (syntax not checked, but you should get the general idea ) :
create procedure ChangeIP () begin declare @mluser varchar(128); declare @newaddr long varchar; declare @sql long varchar; select site_name into @mluser, REPLACE( server_connect, '216.183.117.242', 'new.tcp.ip.addr' ) into @newaddr from SYS.SYSSYNC where site_name is not null and publication_id = ( select publication_id from SYS.SYSPUBLICATION where publication_name = 'kokolink' ); set @sql = 'ALTER SYNCHRONIZATION SUBSCRIPTION TO kokolink '; set @sql = @sql || 'FOR "' || @mluser || '" '; set @sql = @sql || 'TYPE HTTPS '; set @sql = @sql || 'ADDRESS ''' || @newaddr || ''''; message 'EXECUTING : ' || @sql; execute immediate @sql; end; call ChangeIP(); drop procedure ChangeIP;
The general idea being that you dynamically figure out the name of the synchronization user that is subscribed to the publication in question, and also get the current address being used, replacing the old IP address with the new IP address.
Executing this procedure manually on the clients works, however when i send this using a passthrough script it generates the following error Passthrough script 'test3 failed with SQL code -767. Cannot find synchronization subscription with the name 'imobpub' Any idea why this only works manually?
User | Count |
---|---|
68 | |
16 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.