Showing posts with label subscription. Show all posts
Showing posts with label subscription. Show all posts

Wednesday, March 21, 2012

Error creating Subscription to reports

Hi all,

I am having a HUGE issue with SSRS, I am running SQL 2005 on Win 2003 server, the SQL uses SQL and windows permissions.

I have a datasource which stores it credentials securely on the server but for some reason when i try to subscribe to the report it errors saying

"Subscriptions cannot be created because the credentials used to run the report are not stored, or if a linked server the link is no longer valid."

Beats me but the credentials are stored, I am connecting using a user account which can run the report fine (This is proven).

I have SP1 installed, and have literally tried every last option in the book.

N.B i have read all the existing post about this and i seem to have a different issue, I am not using any paraeters in the report i am trying to test and i dont use anything like USR!USERID

Please help!

Andy

Anyone! I really need to get this running asap otherwise the upgrade and migration ot SSRS was pointless!!!|||

When you say “but the credentials are stored” what exactly you mean? Did you go to report properties and entered credentials and marked them to be stored in the database?

-Igor

|||when i say the credentials are stored i mean within the dataset, I have 1 shared dataset for a few reports and the dataset is set to store credentials securely on the server, I have set this in the designer (VS2005) and on the report server properties for the shared datasource but no joy.....|||

There might be one more less obvious reason - can you check server’s rsreportserver.config whether it has TimedSubscription and SnapshotUpdated event handlers configured? It should have something like this:

<EventProcessing>

<Extension Name="SnapShot Extension" Type="Microsoft.ReportingServices.Library.HistorySnapShotCreatedHandler,ReportingServicesLibrary">

<Event>

<Type>ReportHistorySnapshotCreated</Type>

</Event>

</Extension>

<Extension Name="Timed Subscription Extension" Type="Microsoft.ReportingServices.Library.TimedSubscriptionHandler,ReportingServicesLibrary">

<Event>

<Type>TimedSubscription</Type>

</Event>

</Extension>

<Extension Name="Cache Update Extension" Type="Microsoft.ReportingServices.Library.ReportExecutionSnapshotUpdateEventHandler,ReportingServicesLibrary">

<Event>

<Type>SnapshotUpdated</Type>

</Event>

</Extension>

</EventProcessing>

|||

I have this in my config file which looks good and as you mention, Im really struggling with this one and i hate being beaten so any help would be great.

<EventProcessing>

<Extension Name="SnapShot Extension" Type="Microsoft.ReportingServices.Library.HistorySnapShotCreatedHandler,ReportingServicesLibrary">

<Event>

<Type>ReportHistorySnapshotCreated</Type>

</Event>

</Extension>

<Extension Name="Timed Subscription Extension" Type="Microsoft.ReportingServices.Library.TimedSubscriptionHandler,ReportingServicesLibrary">

<Event>

<Type>TimedSubscription</Type>

</Event>

</Extension>

<Extension Name="Cache Update Extension" Type="Microsoft.ReportingServices.Library.ReportExecutionSnapshotUpdateEventHandler,ReportingServicesLibrary">

<Event>

<Type>SnapshotUpdated</Type>

</Event>

</Extension>

</EventProcessing>

|||

Lets take a look on the data source again. Please make sure: 1) Enable this data source check box is checked 2) Credentials stored securely in the report server radio button is selected 3) Use as Windows credentials when connecting to the data source check box is checked 5) Impersonate the authenticated user after a connection has been made to the data source check box in not checked 6) Windows integrated security radio button is not selected.

|||I have set all those options, (thats how i had them anyway) still no joy, I have tried this on another clean build server to make to make sure i am not going mad and still the same thing happens.|||

Andy,

Does your report have the User!UserID parameter? I have known a number of people complaint that when they use this parameter they are unable to create a subscription for their report and if they remove it then the subscription works. It's a shot in the dark but it's all I have so far.

Ham

|||

Andy,

Here's a link explaining why:

http://msdn2.microsoft.com/en-us/library/ms156012.aspx

Ham

|||

No joy that didnt change anything I dont use the user! param.

Still stuck. no joy here at all, any more ideas?

|||

Hello Andy

Have you got a solution? - please let us know if...

I experince the same issue AFTER stepping up from SQL 2005 Standard to Enterprise

Maybe it has something to do with some stale credentials residing from the restore

Does anybody know how to erase old passwords ?

Looking forward to hear from you

/ geert

denmark

Error creating Subscription to reports

Hi all,

I am having a HUGE issue with SSRS, I am running SQL 2005 on Win 2003 server, the SQL uses SQL and windows permissions.

I have a datasource which stores it credentials securely on the server but for some reason when i try to subscribe to the report it errors saying

"Subscriptions cannot be created because the credentials used to run the report are not stored, or if a linked server the link is no longer valid."

Beats me but the credentials are stored, I am connecting using a user account which can run the report fine (This is proven).

I have SP1 installed, and have literally tried every last option in the book.

N.B i have read all the existing post about this and i seem to have a different issue, I am not using any paraeters in the report i am trying to test and i dont use anything like USR!USERID

Please help!

Andy

Anyone! I really need to get this running asap otherwise the upgrade and migration ot SSRS was pointless!!!|||

When you say “but the credentials are stored” what exactly you mean? Did you go to report properties and entered credentials and marked them to be stored in the database?

-Igor

|||when i say the credentials are stored i mean within the dataset, I have 1 shared dataset for a few reports and the dataset is set to store credentials securely on the server, I have set this in the designer (VS2005) and on the report server properties for the shared datasource but no joy.....|||

There might be one more less obvious reason - can you check server’s rsreportserver.config whether it has TimedSubscription and SnapshotUpdated event handlers configured? It should have something like this:

<EventProcessing>

<Extension Name="SnapShot Extension" Type="Microsoft.ReportingServices.Library.HistorySnapShotCreatedHandler,ReportingServicesLibrary">

<Event>

<Type>ReportHistorySnapshotCreated</Type>

</Event>

</Extension>

<Extension Name="Timed Subscription Extension" Type="Microsoft.ReportingServices.Library.TimedSubscriptionHandler,ReportingServicesLibrary">

<Event>

<Type>TimedSubscription</Type>

</Event>

</Extension>

<Extension Name="Cache Update Extension" Type="Microsoft.ReportingServices.Library.ReportExecutionSnapshotUpdateEventHandler,ReportingServicesLibrary">

<Event>

<Type>SnapshotUpdated</Type>

</Event>

</Extension>

</EventProcessing>

|||

I have this in my config file which looks good and as you mention, Im really struggling with this one and i hate being beaten so any help would be great.

<EventProcessing>

<Extension Name="SnapShot Extension" Type="Microsoft.ReportingServices.Library.HistorySnapShotCreatedHandler,ReportingServicesLibrary">

<Event>

<Type>ReportHistorySnapshotCreated</Type>

</Event>

</Extension>

<Extension Name="Timed Subscription Extension" Type="Microsoft.ReportingServices.Library.TimedSubscriptionHandler,ReportingServicesLibrary">

<Event>

<Type>TimedSubscription</Type>

</Event>

</Extension>

<Extension Name="Cache Update Extension" Type="Microsoft.ReportingServices.Library.ReportExecutionSnapshotUpdateEventHandler,ReportingServicesLibrary">

<Event>

<Type>SnapshotUpdated</Type>

</Event>

</Extension>

</EventProcessing>

|||

Lets take a look on the data source again. Please make sure: 1) Enable this data source check box is checked 2) Credentials stored securely in the report server radio button is selected 3) Use as Windows credentials when connecting to the data source check box is checked 5) Impersonate the authenticated user after a connection has been made to the data source check box in not checked 6) Windows integrated security radio button is not selected.

|||I have set all those options, (thats how i had them anyway) still no joy, I have tried this on another clean build server to make to make sure i am not going mad and still the same thing happens.|||

Andy,

Does your report have the User!UserID parameter? I have known a number of people complaint that when they use this parameter they are unable to create a subscription for their report and if they remove it then the subscription works. It's a shot in the dark but it's all I have so far.

Ham

|||

Andy,

Here's a link explaining why:

http://msdn2.microsoft.com/en-us/library/ms156012.aspx

Ham

|||

No joy that didnt change anything I dont use the user! param.

Still stuck. no joy here at all, any more ideas?

|||

Hello Andy

Have you got a solution? - please let us know if...

I experince the same issue AFTER stepping up from SQL 2005 Standard to Enterprise

Maybe it has something to do with some stale credentials residing from the restore

Does anybody know how to erase old passwords ?

Looking forward to hear from you

/ geert

denmark

sql

Error creating Push subscription

Hi All,
I've had this problem for about 4 weeks, and I cna't seem
to find a solution! I'm trying to create a puch
subscription but get the following error when EM tries to
create the records:
FHQRY: Error 515: Cannot insert the value NULL into
column 'step_name', table 'msdb.dbo.sysjobsteps'; column
does not allow nulls. INSERT fails.
I'm running SQL 2000 sp3a on Win 2k sp4. Also I've updated
to MDAC 2.8. I've tried using the stored procs but still
get the same error.
Any suggestions as to why this is happening?
I was told from a nother forum that this kind of problem
occurred with a SP update SQL 7.0 and MS isued a patch.
Should this patch be applied to my server if available? as
it the replication was working prior to a major rebuild.
thanks for any help
Davej
There are probably some missing messages in the sysmessages table in the
master database. Some of the messages are used for dexcriptiosn of the
various replication jobs. You can run a profiler trace while the push
subscription is being created and probably captiure which message is
missing.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Error creating programmatically a subscription with a parameter

Hi,
I'm using a script (through rs utility) to automate the creation of a
lot of subscriptions. Everything works fine if I don't use a parameter
in my report, but when I use it I always get the Error Code
"rsInvalidParameters", with the Error Message
"The value of parameter 'Parameters' is not valid. Check the
documentation for information about valid values"
What I'm doing is:
...
Dim parameter As New ParameterValue()
parameter.Name = "storeCod"
parameter.Value = "318"
Dim parameters(1) As ParameterValue
parameters(0) = parameter
then, when I call rs.CreateSubscription(), I pass the "parameters"
array as the last parameter of the method.
It seems weird because if I debug using the GetReportParameters method
to see exactly the parameter name and value, it's right, the name is
storeCod and one of the valid values is "318".
What can be wrong?
Thanks in advance,
Vinicius BellinoTry setting the DefaultValue for the parameter to that value.
--
| From: vbellino@.uol.com.br (Vinicius Bellino)
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| Subject: Error creating programmatically a subscription with a parameter
| Date: 30 Mar 2005 08:43:34 -0800
| Organization: http://groups.google.com
| Lines: 30
| Message-ID: <93d12908.0503300843.7da9f4f5@.posting.google.com>
| NNTP-Posting-Host: 200.215.178.109
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1112201014 31851 127.0.0.1 (30 Mar 2005
16:43:34 GMT)
| X-Complaints-To: groups-abuse@.google.com
| NNTP-Posting-Date: Wed, 30 Mar 2005 16:43:34 +0000 (UTC)
| Path:
TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!news.glorb.com!postnews.google.com!not-for-mail
| Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.reportingsvcs:46481
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hi,
|
| I'm using a script (through rs utility) to automate the creation of a
| lot of subscriptions. Everything works fine if I don't use a parameter
| in my report, but when I use it I always get the Error Code
| "rsInvalidParameters", with the Error Message
| "The value of parameter 'Parameters' is not valid. Check the
| documentation for information about valid values"
|
| What I'm doing is:
| ...
| Dim parameter As New ParameterValue()
| parameter.Name = "storeCod"
| parameter.Value = "318"
|
| Dim parameters(1) As ParameterValue
| parameters(0) = parameter
|
| then, when I call rs.CreateSubscription(), I pass the "parameters"
| array as the last parameter of the method.
|
| It seems weird because if I debug using the GetReportParameters method
| to see exactly the parameter name and value, it's right, the name is
| storeCod and one of the valid values is "318".
|
| What can be wrong?
|
| Thanks in advance,
|
| Vinicius Bellino
||||Brad,
If I set the default value, it works, but I need to create
subscriptions with different parameter values for the same Report. I'm
reading a text file that defines which email must receive each
parameter value. This text file is something like:
ReportName;SharedScheduleName;
email1;StoreCode1;
email2;StoreCode2;
email3;StoreCode3;
So, I can't set the default parameter to StoreCode1 then create the
subscription to email1 then set to StoreCode2 and create a new
subscription to email2 because it won't work properly. Both
subscriptions will use the last default value set.
Do you happen to know what is going on? Because I think that setting
parameters programmatically is supposed to work well since it's a
"standard" need.
Thanks,
Vinicius Bellino
bradsy@.Online.Microsoft.com ("Brad Syputa - MS") wrote in message news:<o#jQ82UNFHA.2136@.TK2MSFTNGXA03.phx.gbl>...
> Try setting the DefaultValue for the parameter to that value.
> --
> | From: vbellino@.uol.com.br (Vinicius Bellino)
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | Subject: Error creating programmatically a subscription with a parameter
> | Date: 30 Mar 2005 08:43:34 -0800
> | Organization: http://groups.google.com
> | Lines: 30
> | Message-ID: <93d12908.0503300843.7da9f4f5@.posting.google.com>
> | NNTP-Posting-Host: 200.215.178.109
> | Content-Type: text/plain; charset=ISO-8859-1
> | Content-Transfer-Encoding: 8bit
> | X-Trace: posting.google.com 1112201014 31851 127.0.0.1 (30 Mar 2005
> 16:43:34 GMT)
> | X-Complaints-To: groups-abuse@.google.com
> | NNTP-Posting-Date: Wed, 30 Mar 2005 16:43:34 +0000 (UTC)
> | Path:
> TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
> ne.de!news.glorb.com!postnews.google.com!not-for-mail
> | Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.reportingsvcs:46481
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | Hi,
> |
> | I'm using a script (through rs utility) to automate the creation of a
> | lot of subscriptions. Everything works fine if I don't use a parameter
> | in my report, but when I use it I always get the Error Code
> | "rsInvalidParameters", with the Error Message
> | "The value of parameter 'Parameters' is not valid. Check the
> | documentation for information about valid values"
> |
> | What I'm doing is:
> | ...
> | Dim parameter As New ParameterValue()
> | parameter.Name = "storeCod"
> | parameter.Value = "318"
> |
> | Dim parameters(1) As ParameterValue
> | parameters(0) = parameter
> |
> | then, when I call rs.CreateSubscription(), I pass the "parameters"
> | array as the last parameter of the method.
> |
> | It seems weird because if I debug using the GetReportParameters method
> | to see exactly the parameter name and value, it's right, the name is
> | storeCod and one of the valid values is "318".
> |
> | What can be wrong?
> |
> | Thanks in advance,
> |
> | Vinicius Bellino
> |

Error creating new push subscription after deleting the existing o

I created a transactional replication publication and pushed a subscriber,
and that works fine. I deleted existing push subscription in the publisher
with enterprise manager, and also deleted automatically generated replication
jobs related to that push subscription. I noticed that the push subscription
was not automatically deleted in the subscriber as it should. Moreover, when
I created a new push subscription with the same article, I encountered an
error. The error message is as following.
Subscriptions were created successfully at the following subscribers.

SQL Server Enterprise manager could not start the snapshot agent.
Error 14262:the specified @.job_id … does not exist.
Please help.
The error indicates that a replication agent job was deleted accidentally.
When this issue occurs, the most efficient way would be rebuilding the
replication from scratch.
Sincerely,
William Wang
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 19, 2012

error creating a new pull subscription

Hi

Using RMO, VB.net 2005 and SQL 2005

Trying to create a new pull subscription programatically - merge HTTPS ovfr the internet

Works fine when within out internal network - but when externally there is a problem....

I'm using the code from BOL - using their values - but pretty much cut and pasted.

' Define the Publisher, publication, and databases.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publisherName As String = instanceName
Dim subscriberName As String = instanceName
Dim subscriptionDbName As String = "AdventureWorksReplica"
Dim publicationDbName As String = "AdventureWorks"
Dim hostname As String = "adventure-works\garrett1"

'Create connections to the Publisher and Subscriber.
Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)
Dim publisherConn As ServerConnection = New ServerConnection(publisherName)

' Create the objects that we need.
Dim publication As MergePublication
Dim subscription As MergePullSubscription

Try
' Connect to the Subscriber.
subscriberConn.Connect()

' Ensure that the publication exists and that
' it supports pull subscriptions.
publication = New MergePublication()
publication.Name = publicationName
publication.DatabaseName = publicationDbName
publication.ConnectionContext = publisherConn

This last line gives me an error:

+ InnerException {"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"} System.Exception
The server/instance is obviously the name of the internal server / sql instance

What next - yikes - I've got to deliver this tomorrow

thanks as always.
BruceDoes the publisher allow remote connections as per the error message?

If that is the case, use SAC (Surface Area COnfiguration) to enable the remote connections, recycle the SQL server and try connecting again.

To access it Click on Start-->All Programs-->Microsoft SQL Server-->Configuration Tools-->SQL Server Surface Area Configuration-->Surface Area Configuration for Services and Connections-->DataBase Engine-->Remote Connections-->Local and Remote conenctions-->Using both TCP/IP and named pipes.
Then recycle the server|||

Hi

It was already marked as allowing remote connections, but named pipes was not enabled. I enabled named pipes and restarted but not difference. Looking at the code, I can't really see how it could work !

The sample code seems to assume that the server/instance is reachable from the client (unless I'm missing something) - in order to validate the publication.

Given that we are trying to synch via HTTPS and at this point no mention has been made of the URL, isn't the sample code a little bit wrong - again I'm not having the cleverest of weeks so I may be talking rubbish..

Look forward to your feedback

Bruce

|||When you are trying to create a subscription, it does not go through HTTPS. You need a connection to the publisher to first create the subscription. Only the sync uses HTTPS and the IIS machine. Alternatively you could create subscription by any other means and use HTTPS just for synching.

You could try something else, like creating a publication on the publisher using similar code and see if your connections to the publisher are going through from the machine you are using.|||Hi

So are you saying that if the machine is not on the network / a trusted connection, in order create a subscription then port 1433/1434 will have to be open ?

I hope not.

thanks
Bruce|||

try to set the subscription as anonymous, otherwise, when the sub.create() was called, it will try to connect to the publisher and setup the subscription entry there, hence the error.

sub.SubscriptionType = SubscriptionOption.Anonymous

Hope this helps.

Thanks
Yunwen

|||I can see BOL has been updated recently with this sort of scenario (web synch where the subscriber does not have a trusted connection) - that's great and responsive...

So can I take it when I create the subscription I can set the subscription.syncType to indicate whether I have the initial data ?

Also, one thing I noticed is that after I create the subscription this way (subscriberType being anonymous), that the subscription no longer shows up in the enumeration of the subscriberSubscriptions - is this a bug or is there another way of finding out whether the subscription has been created.....

Dim serverConnection As New ServerConnection(m_subscriberName)serverConnection.Connect()

Dim replicationServer As New ReplicationServer(serverConnection)availableSubscriptions = replicationServer.EnumSubscriberSubscriptions("", Convert.ToInt32(2))

For Each subscriber In availableSubscriptions
... nothing gets returned in the enumeration.....
Next


Thanks again.
Bruce|||

the syncType is actually used to determine if the initial data needed to be downloaded to the subscriber ( please refer to sp_addmergepullsubscription for details ).

regarding with the EnumSubscriberSubscriptions() method, it is equivalent to the sp_MSenumallsubscriptions ( you can give it a try ). if your call this method with the publisher, in this case, you will not get the anonymous subscriptions. you can call this method on a subscriber server to get the info you need. Please let us know if the RMO method returns anything different from what you get from the SP call.

Hope this helps.

Thanks
Yunwen

|||Hi

I ransp_MSenumallsubscriptions on the subscriber and it returned no entries. As did EnumSubscriberSubscriptions()

However, when I was creating the subscription on the internal network and was able to connect to the publisher prior to creating the subscription, then EnumSubscriberSubscriptions() did return the subscription details.....

I am executing this method against the subscriber (as per the code in my previous post)

thanks
Bruce|||

Thanks Bruce for reminding me to take a careful look at your code. This actually turn out to be a bug in replication( at least it is a document bug). For now, you can try to pass in 3 for the subscriptionType in EnumSubscriberSubscriptions() to get the subscription info returned. Similarly, you need to specify @.subscription_type='both' for the SP call.

Sorry for the inconvenience. Please let us know if there is any other issues you encountered in your application.

Thanks again for helping us to make it better.

Yunwen

error creating a new pull subscription

Hi

Using RMO, VB.net 2005 and SQL 2005

Trying to create a new pull subscription programatically - merge HTTPS ovfr the internet

Works fine when within out internal network - but when externally there is a problem....

I'm using the code from BOL - using their values - but pretty much cut and pasted.

' Define the Publisher, publication, and databases.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publisherName As String = instanceName
Dim subscriberName As String = instanceName
Dim subscriptionDbName As String = "AdventureWorksReplica"
Dim publicationDbName As String = "AdventureWorks"
Dim hostname As String = "adventure-works\garrett1"

'Create connections to the Publisher and Subscriber.
Dim subscriberConn As ServerConnection = New ServerConnection(subscriberName)
Dim publisherConn As ServerConnection = New ServerConnection(publisherName)

' Create the objects that we need.
Dim publication As MergePublication
Dim subscription As MergePullSubscription

Try
' Connect to the Subscriber.
subscriberConn.Connect()

' Ensure that the publication exists and that
' it supports pull subscriptions.
publication = New MergePublication()
publication.Name = publicationName
publication.DatabaseName = publicationDbName
publication.ConnectionContext = publisherConn

This last line gives me an error:

+ InnerException {"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"} System.Exception
The server/instance is obviously the name of the internal server / sql instance

What next - yikes - I've got to deliver this tomorrow

thanks as always.
BruceDoes the publisher allow remote connections as per the error message?

If that is the case, use SAC (Surface Area COnfiguration) to enable the remote connections, recycle the SQL server and try connecting again.

To access it Click on Start-->All Programs-->Microsoft SQL Server-->Configuration Tools-->SQL Server Surface Area Configuration-->Surface Area Configuration for Services and Connections-->DataBase Engine-->Remote Connections-->Local and Remote conenctions-->Using both TCP/IP and named pipes.
Then recycle the server|||

Hi

It was already marked as allowing remote connections, but named pipes was not enabled. I enabled named pipes and restarted but not difference. Looking at the code, I can't really see how it could work !

The sample code seems to assume that the server/instance is reachable from the client (unless I'm missing something) - in order to validate the publication.

Given that we are trying to synch via HTTPS and at this point no mention has been made of the URL, isn't the sample code a little bit wrong - again I'm not having the cleverest of weeks so I may be talking rubbish..

Look forward to your feedback

Bruce

|||When you are trying to create a subscription, it does not go through HTTPS. You need a connection to the publisher to first create the subscription. Only the sync uses HTTPS and the IIS machine. Alternatively you could create subscription by any other means and use HTTPS just for synching.

You could try something else, like creating a publication on the publisher using similar code and see if your connections to the publisher are going through from the machine you are using.|||Hi

So are you saying that if the machine is not on the network / a trusted connection, in order create a subscription then port 1433/1434 will have to be open ?

I hope not.

thanks
Bruce|||

try to set the subscription as anonymous, otherwise, when the sub.create() was called, it will try to connect to the publisher and setup the subscription entry there, hence the error.

sub.SubscriptionType = SubscriptionOption.Anonymous

Hope this helps.

Thanks
Yunwen

|||I can see BOL has been updated recently with this sort of scenario (web synch where the subscriber does not have a trusted connection) - that's great and responsive...

So can I take it when I create the subscription I can set the subscription.syncType to indicate whether I have the initial data ?

Also, one thing I noticed is that after I create the subscription this way (subscriberType being anonymous), that the subscription no longer shows up in the enumeration of the subscriberSubscriptions - is this a bug or is there another way of finding out whether the subscription has been created.....

Dim serverConnection As New ServerConnection(m_subscriberName)serverConnection.Connect()

Dim replicationServer As New ReplicationServer(serverConnection)availableSubscriptions = replicationServer.EnumSubscriberSubscriptions("", Convert.ToInt32(2))

For Each subscriber In availableSubscriptions
... nothing gets returned in the enumeration.....
Next


Thanks again.
Bruce|||

the syncType is actually used to determine if the initial data needed to be downloaded to the subscriber ( please refer to sp_addmergepullsubscription for details ).

regarding with the EnumSubscriberSubscriptions() method, it is equivalent to the sp_MSenumallsubscriptions ( you can give it a try ). if your call this method with the publisher, in this case, you will not get the anonymous subscriptions. you can call this method on a subscriber server to get the info you need. Please let us know if the RMO method returns anything different from what you get from the SP call.

Hope this helps.

Thanks
Yunwen

|||Hi

I ran sp_MSenumallsubscriptions on the subscriber and it returned no entries. As did EnumSubscriberSubscriptions()

However, when I was creating the subscription on the internal network and was able to connect to the publisher prior to creating the subscription, then EnumSubscriberSubscriptions() did return the subscription details.....

I am executing this method against the subscriber (as per the code in my previous post)

thanks
Bruce|||

Thanks Bruce for reminding me to take a careful look at your code. This actually turn out to be a bug in replication( at least it is a document bug). For now, you can try to pass in 3 for the subscriptionType in EnumSubscriberSubscriptions() to get the subscription info returned. Similarly, you need to specify @.subscription_type='both' for the SP call.

Sorry for the inconvenience. Please let us know if there is any other issues you encountered in your application.

Thanks again for helping us to make it better.

Yunwen

Friday, February 24, 2012

error changing subscription properties

Hi

Made a change to the publisher security parameters, tried to save and got the following message:

"An error occurred saving the changes to the subscription.

Additional information.

"Value" is longer than 128 that it should not exceed.
Parameter name: value (Microsoft.sqlserver.rmo)

Doesn't make much sense to me.
Tried to change it back and all I get is this error (i had set the userid to domain/userid which was obviously an error).Hi, Bruce

Would you like provide more repro steps? And which version of SQL server are you using?

BTW, did you really input authentication login/password which is londer than 128 characters or any change will cause this error?

Also, when you tried to change back, were you stucked with this error or you succeeded in changing back.

Thanks
Yunjing|||

SQL 2005 standard - current release version

No it wasn't longer than 128

I'm stuck with it - I can't change it back....

Steps:
a) Well I had a 2005 subscription which was working fine (anonymous merge over HTTPS)
b) I made the mistake of changing the subscription properties-> publisher connection -> Use sql server authentication-> Login to domain\userid
c) pressed ok + ok - then got that error

Thanks

Bruce

|||

Hi, Bruce

Thanks for the info you provided.

I tried with 2005 anonymous merge pull sub with sync through web. But I couldn't reproduce the problem by following the steps you showed. I also read the product related source code and didn't find any code work different for changing login no matter for standard or enterprise SKU.

Did you change other sub properties value besides this login? Could you check if the issue was caused by other changes?

Thanks a lot

Yunjing

|||

Hi

It's a bit hard now to provide further info - I'm pretty sure it was the only thing I changed at the time....

thanks for your help anyway - this is a great service....
Bruce

|||

Thanks for all info you provided. If I can reproduce the issue in the future, I will let you know as well.

-Yunjing

error changing subscription properties

Hi

Made a change to the publisher security parameters, tried to save and got the following message:

"An error occurred saving the changes to the subscription.

Additional information.

"Value" is longer than 128 that it should not exceed.
Parameter name: value (Microsoft.sqlserver.rmo)

Doesn't make much sense to me.
Tried to change it back and all I get is this error (i had set the userid to domain/userid which was obviously an error).

Hi, Bruce

Would you like provide more repro steps? And which version of SQL server are you using?

BTW, did you really input authentication login/password which is londer than 128 characters or any change will cause this error?

Also, when you tried to change back, were you stucked with this error or you succeeded in changing back.

Thanks
Yunjing|||

SQL 2005 standard - current release version

No it wasn't longer than 128

I'm stuck with it - I can't change it back....

Steps:
a) Well I had a 2005 subscription which was working fine (anonymous merge over HTTPS)
b) I made the mistake of changing the subscription properties-> publisher connection -> Use sql server authentication-> Login to domain\userid
c) pressed ok + ok - then got that error

Thanks

Bruce

|||

Hi, Bruce

Thanks for the info you provided.

I tried with 2005 anonymous merge pull sub with sync through web. But I couldn't reproduce the problem by following the steps you showed. I also read the product related source code and didn't find any code work different for changing login no matter for standard or enterprise SKU.

Did you change other sub properties value besides this login? Could you check if the issue was caused by other changes?

Thanks a lot

Yunjing

|||

Hi

It's a bit hard now to provide further info - I'm pretty sure it was the only thing I changed at the time....

thanks for your help anyway - this is a great service....
Bruce

|||

Thanks for all info you provided. If I can reproduce the issue in the future, I will let you know as well.

-Yunjing