Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Friday, March 23, 2012

MSMQ Connection Manager and input into a data flow

Firstly the disclaimer: im a total SSIS bunny.
Ok, with that out of the way...
What i want to do is have data read from an MSMQ message (which will be a simple XML message) and have it transformed and inserted into a simple table. Sound simple, but i cant work out how to do it.

I started a new Integration Services Project and dropped a Data Flow task on the Control flow tab, then double-click it to go to the data flow tab. I have added a MSMQ connection manager which points at my private queue and i can hit the test button and it sees it tests ok. How do i wire that into my data flow?

On my dataflow tab i have a SQL Server Destination (set to the local SQl server instance) and ive been trying a DataReader source and try setting the Advanced Editor "Connection Manager" column on IDBConnection row to point to my MSMQ connection manager. I get some error "cannot aquire a managed connection from the run-time connection manager". How do i get a Data Flow source which reads the XML message off my MSMQ connection manager?

On the Control Flow tab you can add a Message Queue Task and i can bind it to my MSMQ connection manager and set it up as a recieve task etc, but how do i use that?

Help!

Well, like yourself I am a complete MSMQ bunny but nevertheless....

You are right that the MSMQ Task will be of help here. I don't know much about it but I am guessing that it allows you to save the message to a Variable. Am I correct? If so you can do that and then manipulate the data that is in the variable.

That is as much as I know. Like I say I don't have any experience of using MSMQ with SSIS.

-Jamie

|||Hi, yer, i think i can save the message data to a variable, but im a bit lost on which component ill need to transform that message - the XML one would seem the logical choice but i cant seem to bind it to that variable.
|||

Hi

im new in msmQ TASK

I already configured the msmque task for sending. - > connected to dataflowtask -> msmque task for recieving is this the proper way to implement?

MSMQ Connection Manager and input into a data flow

Firstly the disclaimer: im a total SSIS bunny.
Ok, with that out of the way...
What i want to do is have data read from an MSMQ message (which will be a simple XML message) and have it transformed and inserted into a simple table. Sound simple, but i cant work out how to do it.

I started a new Integration Services Project and dropped a Data Flow task on the Control flow tab, then double-click it to go to the data flow tab. I have added a MSMQ connection manager which points at my private queue and i can hit the test button and it sees it tests ok. How do i wire that into my data flow?

On my dataflow tab i have a SQL Server Destination (set to the local SQl server instance) and ive been trying a DataReader source and try setting the Advanced Editor "Connection Manager" column on IDBConnection row to point to my MSMQ connection manager. I get some error "cannot aquire a managed connection from the run-time connection manager". How do i get a Data Flow source which reads the XML message off my MSMQ connection manager?

On the Control Flow tab you can add a Message Queue Task and i can bind it to my MSMQ connection manager and set it up as a recieve task etc, but how do i use that?

Help!

Well, like yourself I am a complete MSMQ bunny but nevertheless....

You are right that the MSMQ Task will be of help here. I don't know much about it but I am guessing that it allows you to save the message to a Variable. Am I correct? If so you can do that and then manipulate the data that is in the variable.

That is as much as I know. Like I say I don't have any experience of using MSMQ with SSIS.

-Jamie

|||Hi, yer, i think i can save the message data to a variable, but im a bit lost on which component ill need to transform that message - the XML one would seem the logical choice but i cant seem to bind it to that variable.
|||

Hi

im new in msmQ TASK

I already configured the msmque task for sending. - > connected to dataflowtask -> msmque task for recieving is this the proper way to implement?

Wednesday, March 7, 2012

MSDTC on server 'SERVER_NAME' is unavailable

Hi
I have two stored procedures that use a linked server to access an Access
database from SQL Server 2000.
The first takes no input:
CREATE PROCEDURE GetModules
AS
INSERT INTO datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime) SELECT * FROM
OPENQUERY(ProjAForcBCase0,'select * from datCase')
GO
This procedure runs fine and does exactly as expected.
The second parameterises the linked server name (the idea being that these
will be created dynamically in code) so that it can be passed in to the
stored procedure.
CREATE PROCEDURE GetModulesDynamic
@.LinkedServer nvarchar(4000)
AS
DECLARE @.TSQL nvarchar(4000)
DECLARE @.OPENQUERY nvarchar(4000)
SET @.OPENQUERY = 'SELECT * FROM OPENQUERY('+ @.LinkedServer + ','''
SET @.TSQL = 'select * from datCase'')'
Insert into datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime)
EXEC(@.OPENQUERY+@.TSQL)
GO
However if I run this second stored procedure I am met with the error
message "MSDTC on server 'SERVER_NAME' is unavailable".
Both these stored procedures were executed on my PC (win 2K) using a local
SQL Server 2000 instance and a localo access database. As such I do not
understand why I should require MSDTC for the second procedure and not for
the first.
Any explanation would be extremely useful.
Also can MSDTC be installed on Win 2K and if so where can I get it from?
Thanks
TomHave just dicovered that I didn't have DTC running (had been looking for a
service called MSDTC as defined in the error message)
As such this now works as expected for both procedures, but if anyone knows
why it worked without DTC for the first procedure and not the second I would
be interested in an explanation.
"TomPearson" wrote:
> Hi
> I have two stored procedures that use a linked server to access an Access
> database from SQL Server 2000.
> The first takes no input:
> CREATE PROCEDURE GetModules
> AS
> INSERT INTO datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
> UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime) SELECT * FROM
> OPENQUERY(ProjAForcBCase0,'select * from datCase')
> GO
> This procedure runs fine and does exactly as expected.
> The second parameterises the linked server name (the idea being that these
> will be created dynamically in code) so that it can be passed in to the
> stored procedure.
> CREATE PROCEDURE GetModulesDynamic
> @.LinkedServer nvarchar(4000)
> AS
> DECLARE @.TSQL nvarchar(4000)
> DECLARE @.OPENQUERY nvarchar(4000)
> SET @.OPENQUERY = 'SELECT * FROM OPENQUERY('+ @.LinkedServer + ','''
> SET @.TSQL = 'select * from datCase'')'
> Insert into datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
> UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime)
> EXEC(@.OPENQUERY+@.TSQL)
> GO
> However if I run this second stored procedure I am met with the error
> message "MSDTC on server 'SERVER_NAME' is unavailable".
> Both these stored procedures were executed on my PC (win 2K) using a local
> SQL Server 2000 instance and a localo access database. As such I do not
> understand why I should require MSDTC for the second procedure and not for
> the first.
> Any explanation would be extremely useful.
> Also can MSDTC be installed on Win 2K and if so where can I get it from?
> Thanks
> Tom|||Most likely because in the second procedure, you used an
insert exec which would promote the transaction to a
distributed transaction. The first procedure used an insert
select so was a local transaction.
-Sue
On Mon, 31 Jan 2005 07:45:03 -0800, "TomPearson"
<TomPearson@.discussions.microsoft.com> wrote:
>Have just dicovered that I didn't have DTC running (had been looking for a
>service called MSDTC as defined in the error message)
>As such this now works as expected for both procedures, but if anyone knows
>why it worked without DTC for the first procedure and not the second I would
>be interested in an explanation.
>"TomPearson" wrote:
>> Hi
>> I have two stored procedures that use a linked server to access an Access
>> database from SQL Server 2000.
>> The first takes no input:
>> CREATE PROCEDURE GetModules
>> AS
>> INSERT INTO datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
>> UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime) SELECT * FROM
>> OPENQUERY(ProjAForcBCase0,'select * from datCase')
>> GO
>> This procedure runs fine and does exactly as expected.
>> The second parameterises the linked server name (the idea being that these
>> will be created dynamically in code) so that it can be passed in to the
>> stored procedure.
>> CREATE PROCEDURE GetModulesDynamic
>> @.LinkedServer nvarchar(4000)
>> AS
>> DECLARE @.TSQL nvarchar(4000)
>> DECLARE @.OPENQUERY nvarchar(4000)
>> SET @.OPENQUERY = 'SELECT * FROM OPENQUERY('+ @.LinkedServer + ','''
>> SET @.TSQL = 'select * from datCase'')'
>> Insert into datCase( CaseNumber, DateCreated, DateLastRun, VisoObject,
>> UserVBA, VisoDiagram, CF, CaseDescription, LastRunTime)
>> EXEC(@.OPENQUERY+@.TSQL)
>> GO
>> However if I run this second stored procedure I am met with the error
>> message "MSDTC on server 'SERVER_NAME' is unavailable".
>> Both these stored procedures were executed on my PC (win 2K) using a local
>> SQL Server 2000 instance and a localo access database. As such I do not
>> understand why I should require MSDTC for the second procedure and not for
>> the first.
>> Any explanation would be extremely useful.
>> Also can MSDTC be installed on Win 2K and if so where can I get it from?
>> Thanks
>> Tom