Showing posts with label specify. Show all posts
Showing posts with label specify. Show all posts

Tuesday, March 20, 2012

Conversation Group

I have not been successfull in getting conversation group to work. My understanding is that I can specify a 'guid' for a conversation group id in the create dialog and when I send a message on this conversation it will have that specific guid for its conversation group. When I do this it does not appear this way in the "target" queue.

I am looking for an example to help me understand how to use a conversation group. The MSDN has not really provided that run able example that I can run and verify and tweak.

The idea that I would like to try is that the initiator must send 5 different XML messages to a target. These 5 messages are all related and must exist together. What I assume is that if I want the target to get all 5 messages together out of the queue all messages must be sent in their own conversation but all linked with the same conversation group Id. I have not been able to get this to work.

The communication is really a one way where the initiator sends the data to the target and does not process or need a message sent back from the target.

Thank you for your time.

Here is how I am going to manage this. I have knowledge and control over the initiator and target. Which means I can make a few "assumptions"

I will define a message for each of the 5 messages to be sent to be used to identify the message in the conversation group. This will cut down on the processing of the data to determine its message type.

The contract is only one way and so the initiator will be listed as publishing each message type in the contract.

When sending to the target service the initiator will create a dialog and send all 5 messages in the same dialog.

The target will process the queue and get the conversation group. The target processing will need to account for undelivered messages and "poll" the queue for delivery. Plus a little more logic to stop polling after so many tries in case all five messages are never sent.

|||

You can also avoid pooling. You can turn on retention on the queue and have an activated procedure that is very simple: if the message is not the last one in the sequence, ignore it (commit the RECEIVE, though). If the message is the last one (5th, if there are 5 messages), the the procedure can use SELECT against the queue to find all the previous messages. When retention is ON, a queue keeps RECEIVEed messages until the conversation is ended.

HTH,
~ Remus

Conversation Group

I have not been successfull in getting conversation group to work. My understanding is that I can specify a 'guid' for a conversation group id in the create dialog and when I send a message on this conversation it will have that specific guid for its conversation group. When I do this it does not appear this way in the "target" queue.

I am looking for an example to help me understand how to use a conversation group. The MSDN has not really provided that run able example that I can run and verify and tweak.

The idea that I would like to try is that the initiator must send 5 different XML messages to a target. These 5 messages are all related and must exist together. What I assume is that if I want the target to get all 5 messages together out of the queue all messages must be sent in their own conversation but all linked with the same conversation group Id. I have not been able to get this to work.

The communication is really a one way where the initiator sends the data to the target and does not process or need a message sent back from the target.

Thank you for your time.

Here is how I am going to manage this. I have knowledge and control over the initiator and target. Which means I can make a few "assumptions"

I will define a message for each of the 5 messages to be sent to be used to identify the message in the conversation group. This will cut down on the processing of the data to determine its message type.

The contract is only one way and so the initiator will be listed as publishing each message type in the contract.

When sending to the target service the initiator will create a dialog and send all 5 messages in the same dialog.

The target will process the queue and get the conversation group. The target processing will need to account for undelivered messages and "poll" the queue for delivery. Plus a little more logic to stop polling after so many tries in case all five messages are never sent.

|||

You can also avoid pooling. You can turn on retention on the queue and have an activated procedure that is very simple: if the message is not the last one in the sequence, ignore it (commit the RECEIVE, though). If the message is the last one (5th, if there are 5 messages), the the procedure can use SELECT against the queue to find all the previous messages. When retention is ON, a queue keeps RECEIVEed messages until the conversation is ended.

HTH,
~ Remus

sqlsql

Monday, March 19, 2012

Controlling outbound IP address on a SQL Cluster

Hello,

Is there any way to specify which IP address is used when executing a SQL Job. We recently found that Jobs starting from our cluster (Windows 2003 SQL 2000 SP 4 in a Active / Passive configuration) use the IP address from the local node rather then the virtual IP address tied to the SQL cluster. Jobs executing from the remote SQL server are running. The use of the local address has caused a failure at the firewall.

Thanks

mjdenn

Moving to the right alias so SQL Agent experts can reply to your question.

Thanks,

Zhiqiang Feng

Sunday, March 11, 2012

Controlling export formats based on user role

I'm using Reporting Services 2000 and I have a situation where I need to specify the file formats available to export. I know I can change the RSReportServer.config file to change these at a global level, but what I really need is to be able to configure these differently for different user groups. For example:

group 1 - has all available export formats available

group 2 - only has the ability to export to excel

group 3 - has no option to export to any format.

Is there a way for this to be done? If so, can anybody give me any pointers on how it can be done?

Any help given will be most appreciated!!

In Report Manager there is no way to limit export formats by role.

You would need to create a custom application to host the reporting services control, and limit your users in this way.

cheers,

Andrew

|||

ok thanks I thought this might be the case but just wondered if any simpler solutions were about.

Thanks again for your reply

Thursday, March 8, 2012

continuous variable prediction

Hi All,

I was wondering if there was a way to specify a range when training a model to predict continuous variables. For instance, the predicted variable can only have a range of 1 - 10.

Thanks

Not really, and it's possible that even if you restrict the training data to the range 1-10 you can end up with predictions outside that range (e.g. if you found x=2y and put 8 as your input).

What you can do is use VBA or Excel MIN/MAX functions on your prediction result. For example you can call

SELECT [MAX]( [MIN]( Predict(MyColumn), 10), 1)

FROM MyModel

PREDICTION JOIN ...

Sunday, February 12, 2012

CONSTANTS in bcp .fmt files

Hi,
How can we insert CONSTANTS in table columns using bcp's .fmt files? In case SQLLoader, we can specify CONSTANTs in .ctl files. How can it be done in case of bcp utility?
Thanks in advance
VijayYou can't! BCP does not support this.|||Originally posted by Paul Young
You can't! BCP does not support this.

Any workaround used normally?

Thanks|||Either add the data to your file before BCPing or run an update script to add the data after BCPing the file.|||Originally posted by vijay_kumar74
Any workaround used normally?

Thanks

What do you mean by Constant?

UPDATE myTable SET col1 = 'Something'

???????????????|||Yes, I think I'll go by updating table columns with the "CONSTANT" (e.g. $PROGRAM_NAME) values after running bcp.

Thanks for the help!|||You can check %ERRORLEVEL% to see if the BCP went okay and then follow up with an OSQL command to update the table. Not eloquent but functional.