Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Friday, March 23, 2012

How many time dimensions can be created for a cube? And can different cubes share one time dimen

Hi, all experts here,

Thank you very much for your kind attention.

I have encountered some problems while creating time dimensions of cubes. I am wondering: Dose SQL Server 2005 Analysis Services allow to create more than one time dimension within a cube? and can different cubes share a time dimension?

Please could any experts here shed me any light on that and I am looking forward to hearing from you shortly and Thanks a lot in advance for your help.

With best regards,

Yours sincerely,

Helen999888 wrote:

Dose SQL Server 2005 Analysis Services allow to create more than one time dimension within a cube?

Yes, but a common practice is to define a single time dimension and give it aliases through the dimension relationship tab in the cube editor. Why do you need multiple time dimensions?

Helen999888 wrote:

and can different cubes share a time dimension?

Yes.

|||Yes - both are possible. In the Adventure Works sample, there are 3 different Time dimensions in the same cube (they are role playing dimensions, but don't have to be, although it usually does make sense to make all time dimensions role playing).|||AS 2005 allows more than one Time dimension in a cube and Time dimensions can be shared.|||

Hi, All,

Thank you so much indeed for your kind advices. It's been very helpful.

With best regards,

Yours sincerely,

How many SSRS reports the execution option can be set to run at the same time?

Hi

There shall be atleast 1000 reports that could be created and the execution option can be set for daily and at 00:00 hrs. So my question is how many reports can get refreshed at the same time?

Thanking you in advance

regards

Sai

There is no theoretical limit to the number of reports that can be scheduled for the same time. I would set them up to run off of a shared schedule. When the schedule fires the report executions will be queued up to run. The Report Server will attempt to run as many as possible without consuming to many resources. As it works through the reports, it will bring in more to process. This means that some reports will be run at 12, but others will run later as they are taken from the queue. It will depend on the type of reports and the speed of the machines to determine how long it will take.

If the reports take to long you can always add additional machines to the configuration to allow for more throughput.

Monday, March 19, 2012

how many databases can be set up in one Sql server instance

I am using sqlserver to its limitation ,So I am concerning how many
databases can be created in one Sql server instance. Anyboday know
this issue ? I am grateful for your answer>I am using sqlserver to its limitation, So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue? I am grateful for your answer
Databases per instance of SQL Server: 32,767
SQL Server 2005 Books Online > Maximum Capacity Specifications:
http://msdn2.microsoft.com/en-us/library/ms143432.aspx
Tom
http://kbupdate.info/ | http://suppline.com/|||I have a client with 6287 databases on a pretty small box and it works fine.
Note that most third party tools roll over and die when you try them against
such a server.
TheSQLGuru
President
Indicium Resources, Inc.
"csonnet" <haiming.chen@.gmail.com> wrote in message
news:1182844134.925881.299380@.o11g2000prd.googlegroups.com...
>I am using sqlserver to its limitation ,So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue ? I am grateful for your answer
>

how many databases can be set up in one Sql server instance

I am using sqlserver to its limitation ,So I am concerning how many
databases can be created in one Sql server instance. Anyboday know
this issue ? I am grateful for your answer
>I am using sqlserver to its limitation, So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue? I am grateful for your answer
Databases per instance of SQL Server: 32,767
SQL Server 2005 Books Online > Maximum Capacity Specifications:
http://msdn2.microsoft.com/en-us/library/ms143432.aspx
Tom
http://kbupdate.info/ | http://suppline.com/
|||I have a client with 6287 databases on a pretty small box and it works fine.
Note that most third party tools roll over and die when you try them against
such a server.
TheSQLGuru
President
Indicium Resources, Inc.
"csonnet" <haiming.chen@.gmail.com> wrote in message
news:1182844134.925881.299380@.o11g2000prd.googlegr oups.com...
>I am using sqlserver to its limitation ,So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue ? I am grateful for your answer
>

how many databases can be set up in one Sql server instance

I am using sqlserver to its limitation ,So I am concerning how many
databases can be created in one Sql server instance. Anyboday know
this issue ? I am grateful for your answer>I am using sqlserver to its limitation, So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue? I am grateful for your answer
Databases per instance of SQL Server: 32,767
SQL Server 2005 Books Online > Maximum Capacity Specifications:
http://msdn2.microsoft.com/en-us/library/ms143432.aspx
--
Tom
http://kbupdate.info/ | http://suppline.com/|||I have a client with 6287 databases on a pretty small box and it works fine.
Note that most third party tools roll over and die when you try them against
such a server.
--
TheSQLGuru
President
Indicium Resources, Inc.
"csonnet" <haiming.chen@.gmail.com> wrote in message
news:1182844134.925881.299380@.o11g2000prd.googlegroups.com...
>I am using sqlserver to its limitation ,So I am concerning how many
> databases can be created in one Sql server instance. Anyboday know
> this issue ? I am grateful for your answer
>

how many clusters can i set up ?

A slight confusion. I have created a windows cluster with 2 nodes and a
single instance of SQL 2K cluster
Is it possible to create many windows clusters? I was looking at the Cluster
Admin and there is an option to create a new cluster ... Why would one want
to do that especially with only 2 nodes ? Please let me know. Using windows
2003
One server can only be an active participant in one cluster at a time, but
the cluster administrator tool can be used to manage (and create) all
clusters in your environment. You can have as many clusters in your
environment as you'd like...obviously this is limited to the amount of
hardware that you own.
So, you don't need to run cluster administrator on the nodes that you are
using to form your cluster...it can be run on any host that has the utility
installed (all W2K3 Ent Servers).
Regards,
John
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23FJmV3TLEHA.4080@.TK2MSFTNGP12.phx.gbl...
> A slight confusion. I have created a windows cluster with 2 nodes and a
> single instance of SQL 2K cluster
> Is it possible to create many windows clusters? I was looking at the
Cluster
> Admin and there is an option to create a new cluster ... Why would one
want
> to do that especially with only 2 nodes ? Please let me know. Using
windows
> 2003
>

Monday, March 12, 2012

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How make script component output 2 asynchronous?

I am working with the Data Flow Task Script Component for the first time. I have created a second Output. In my script I add rows to this output.

I have found that Ssis does not release those rows to the second Output until it has processed all of the incomine pipeline records. This will not work for me as there are going to be a few million records coming down the pipe, so I need the Script Component to as soon as possible release these records downstream for insert into the destination component Ole Db component.

Any help would be greatly appreciated?

Hmm... I could not replicate.

How are you sending data to the 2nd output?|||

The only way I could figure to add a row to the dataset incode was to make the Synchronous property "None", to reference the Output Buffer, and then I could access the OutputBuffer.AddRow() method.

The problem is that then it tries to complete processing the entire pipeline before proceeding beyond the Script Component.

Is there a way to access the AddRow() method when the Output has the Input set as the SynchronousInput?

Here is my Script Component Code:

Code Snippet

Imports System

Imports System.Data

Imports System.Math

Imports System.Xml

Imports System.Windows.Forms

Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper

Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain

Inherits UserComponent

Private _Name As String

Private _Value As String

Private _Paco As String

Private _MessageId As Guid

Private _MessageStreamId As Guid

Private _LogDateTimeStamp As DateTime

Public Sub AddRow(ByVal message As String, ByVal row As Input1Buffer, ByVal xPathQuery As String, ByVal adduri As String, ByVal xPathPaco As String, ByVal removeuri As String)

If Not message Is Nothing Then

Dim doc As XmlDataDocument = New XmlDataDocument

Dim aXmlNode As XmlNode

doc.PreserveWhitespace = False

doc.LoadXml(message)

Dim namespaceManager As XmlNamespaceManager = New XmlNamespaceManager(doc.NameTable)

If Not removeuri Is Nothing Then namespaceManager.RemoveNamespace("ns0", removeuri)

namespaceManager.AddNamespace("ns0", adduri)

aXmlNode = doc.SelectSingleNode(xPathQuery, namespaceManager)

If Not aXmlNode Is Nothing Then

If aXmlNode.InnerText <> "0" Then

_Name = aXmlNode.Name

_Value = aXmlNode.InnerText

_MessageId = row.MessageID

_MessageStreamId = row.MessageStreamID

_LogDateTimeStamp = row.LogDateTimeStamp

aXmlNode = doc.SelectSingleNode(xPathPaco, namespaceManager)

If Not aXmlNode Is Nothing Then _Paco = aXmlNode.InnerText

CreateNewOutputRows()

End If

End If

End If

End Sub

Public Overrides Sub CreateNewOutputRows()

MyBase.CreateNewOutputRows()

With Output2Buffer

.AddRow()

.Name = _Name

.Value = _Value

.MessageId = _MessageId

.MessageStreamId = _MessageStreamId

.LogDateTimeStamp = _LogDateTimeStamp

.Paco = _Paco

End With

End Sub

Public Overrides Sub Input1_ProcessInputRow(ByVal row As Input1Buffer)

AddRow(row.StringMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringResponseMessageBody, row, row.xPathPrId, row.xPathPrNamespace, row.xPathPrPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, row.xPathPrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPpId, row.xPathPpNamespace, row.xPathPpPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, row.xPathPpNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathConId, row.xPathConNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, row.xPathConNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathEmailId, row.xPathEmailNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, row.xPathEmailNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPhoneId, row.xPathPhoneNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, row.xPathPhoneNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathAddrId, row.xPathAddrNamespace, row.xPathConPaco, Nothing)

AddRow(row.StringMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, row.xPathAddrNamespace)

AddRow(row.StringResponseMessageBody, row, row.xPathPtId, row.xPathPtNamespace, row.xPathConPaco, Nothing)

End Sub

End Class

|||You are correct that your component should be in asynchronous mode and you should be using AddRow. You should not, however, be calling CreateNewOutputRows the way you are. The engine will call that on its own. From what I can tell of you logic, you don't need to implement it. Just move the logic you currently have in CreateNewOutputRows to where you are calling it. The AddRow method can be called from anywhere in the script, not just CreateNewOutputRows. As it is, one of your rows will be duplicated when the engine makes its call.

Regarding your concern about the script task wanting to complete the entire pipeline, you need to understand that rows do not move through the pipeline, only buffers do, and buffers consist of about 10,000 rows by default. Buffers are only ejected from a component when they are full, or the pipeline is empty. I see you have some logic filtering the incoming rows. I don't know how many incoming rows you have, or how stringent the filtering is, but if your output is less than a full buffer, then yes, it will wait until the source is finished.
|||Are you only wanting one row coming out of output 2? Or do you want a row for every input row?|||

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

|||Calling AddRow() on the 2nd output in "Public Overrides Sub Input1_ProcessInputRow" should send rows to the 2nd output without waiting for the 1st output. That's what my tests yield.|||

Dotnet Fellow wrote:

Can I set the count of rows to cause the buffer to push the data downstream?

Each row that comes in contains an Xml document from which I am harvesting certain node values and sticking them into a structured table.

I originally did not use the CreateNewOutputRows. This was one attempt I made at trying to force the buffer data down through the pipeline. I am encountering the same results with or without the use of CreateNewOutputRows.

Again, my experience was that the script component was not pushing the output down the pipeline. My fear was/is that when I am processing millions of rows it will fill the Ssis Engine Memory space up before it pushes data down the pipeline.

Perhaps if I could set the count at which I want it to push data down the pipeline? Is that possible?

Yes, you can change the number of rows that go on a buffer. This will cause your buffers to fill and be ejected from your script earlier. I don't recommend it or think it is necessary, though. By default, buffers are 10,000 rows or 10 MB, whichever comes first. So memory should not be a concern. The DefaultMaxBufferRows property of the DataFlow controls the number of rows allowed on a buffer.

If you really expect to be running a million rows through this code, you may want to consider changing it so the XML documents are only loaded once for each row, instead of for each of the xpath nodes your are extracting. I count 14 document loads per row, when probably only 2 are necessary.

How long does it take to drop a FT index?

Yesterday I created a full text index on a single field in my database with
365000 rows in order to do some performance testing to see if moving to a
full text index would provide significant improvement over LIKE clauses for
looking up words in titles of products. I now need to create indexes on a
couple more rows, and so I need to drop the existing index and create a new
one. However, it's now 3 hours later and iSQL is still running my drop
statement. How long does it normally take to drop a full text index of 98045
unique words with 364704 items, totalling 13MB? If I right click on the
catalog in SQL Ent Manager and choose Properties it shows the catalog as
idle. No errors are being returned by iSQL, and there is nothing in either
the W2K Event Log or the SQL log to indicate there is a problem. Please help
:|
Dan
This should happen well within a minute. run sp_lock to see if there is any
locking.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Daniel Crichton" <msnews@.worldofspack.co.uk> wrote in message
news:emlT0SGrEHA.868@.TK2MSFTNGP10.phx.gbl...
> Yesterday I created a full text index on a single field in my database
with
> 365000 rows in order to do some performance testing to see if moving to a
> full text index would provide significant improvement over LIKE clauses
for
> looking up words in titles of products. I now need to create indexes on a
> couple more rows, and so I need to drop the existing index and create a
new
> one. However, it's now 3 hours later and iSQL is still running my drop
> statement. How long does it normally take to drop a full text index of
98045
> unique words with 364704 items, totalling 13MB? If I right click on the
> catalog in SQL Ent Manager and choose Properties it shows the catalog as
> idle. No errors are being returned by iSQL, and there is nothing in either
> the W2K Event Log or the SQL log to indicate there is a problem. Please
help
> :|
> Dan
>
|||"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eX8NLVGrEHA.896@.TK2MSFTNGP12.phx.gbl...
> This should happen well within a minute. run sp_lock to see if there is
any
> locking.
I knew I'd forgotten to do something :|
Thanks for the help. I found a stuck connection from a process that ran a
9:26 last night that for reason hadn't cleared - the process ended after
only a few seconds, yet SQL Server was maintaining the lock. In the end I
had to restart the SQL Server service to get rid of it, then the index
dropped in 5 seconds.
Dan
|||You have to be very careful with locking. SQL FTS does apply row level
locking while doing populations which can aggravate deadlocks and
maintenance operations like the one you have discovered.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Daniel Crichton" <msnews@.worldofspack.co.uk> wrote in message
news:eSpySqGrEHA.452@.TK2MSFTNGP09.phx.gbl...
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eX8NLVGrEHA.896@.TK2MSFTNGP12.phx.gbl...
> any
> I knew I'd forgotten to do something :|
> Thanks for the help. I found a stuck connection from a process that ran a
> 9:26 last night that for reason hadn't cleared - the process ended after
> only a few seconds, yet SQL Server was maintaining the lock. In the end I
> had to restart the SQL Server service to get rid of it, then the index
> dropped in 5 seconds.
> Dan
>

Wednesday, March 7, 2012

How is it possible that inserted and deleted are both empty in trigger?

I created manage update trigger to react on one column changes. There is an application which is working with DB, so I don't have access to SQL query which changes this column. In most cases trigger works fine, but in one case when this column changes, trigger is fired and IsUpdatedColumn is true for this column, but both inserted and deleted table are empty, so I can't get new value for this column. Any idea why is it happened? Is any way around?

This column type is uniqueidentifier. Inserted and deleted tables are empty when application is changing value from NULL to not null value, but if I change it myself from Management Studio inserted table contains right values. Most like problem is in query which is changing that value.

I'm doing that on Sql Server 2005.

Triggers are also firing when no rows is affected, it is fired on a per statement basis not per row.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Friday, February 24, 2012

How I solve this ?

I get this error when i try to connect with my sql,

I created my SQL with MS SQL 2005 Workgroup,

the error is:

Server Error in '/' Application.

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

First obvious question:

What happened when you extended the schema with ASPNET_REGSQL.EXE?

Jeff

|||I agree with Jeff. We need more details to help you. Any update?

How I can transfer login and password between SQL7 and SQL2000 Ser

Hi Good Day to everyone
In SQL7 Server have created some users ID with the passwords. I would like
to know how I can transfer those login IDs and Passwords into the SQL2000
server without re-create.
Besides, I would like to how to change the db ownership after I transfer the
ID and password?
Please advise.
Polar Bear.
* Polar Bear is new to SQL DB
Here are some articles you may be interested in:
http://vyaskn.tripod.com/moving_sql_server.htm Moving DBs
http://www.databasejournal.com/featu...le.php/3379901 Moving
system DB's
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scri...p?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly SQL MVP
"Polar Bear" <PolarBear@.discussions.microsoft.com> wrote in message
news:D76B2259-BEA3-4239-9BBB-2E24A2395DBC@.microsoft.com...
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer
> the
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB
|||Check out http://www.support.microsoft.com/?id=246133 for transferring
logins.
With regards changing the database ownership, check out SQL Books On
Line for the sproc sp_changedbowner.
Regards
ALI
Polar Bear wrote:
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer the
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB

How I can transfer login and password between SQL7 and SQL2000 Ser

Hi Good Day to everyone
In SQL7 Server have created some users ID with the passwords. I would like
to know how I can transfer those login IDs and Passwords into the SQL2000
server without re-create.
Besides, I would like to how to change the db ownership after I transfer the
ID and password?
Please advise.
Polar Bear.
* Polar Bear is new to SQL DBHere are some articles you may be interested in:
http://vyaskn.tripod.com/moving_sql_server.htm Moving DBs
http://www.databasejournal.com/feat...cle.php/3379901 Moving
system DB's
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly SQL MVP
"Polar Bear" <PolarBear@.discussions.microsoft.com> wrote in message
news:D76B2259-BEA3-4239-9BBB-2E24A2395DBC@.microsoft.com...
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer
> the
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB|||Check out http://www.support.microsoft.com/?id=246133 for transferring
logins.
With regards changing the database ownership, check out SQL Books On
Line for the sproc sp_changedbowner.
Regards
ALI
Polar Bear wrote:
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer t
he
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB

How I can transfer login and password between SQL7 and SQL2000 Ser

Hi Good Day to everyone
In SQL7 Server have created some users ID with the passwords. I would like
to know how I can transfer those login IDs and Passwords into the SQL2000
server without re-create.
Besides, I would like to how to change the db ownership after I transfer the
ID and password?
Please advise.
Polar Bear.
* Polar Bear is new to SQL DBHere are some articles you may be interested in:
http://vyaskn.tripod.com/moving_sql_server.htm Moving DBs
http://www.databasejournal.com/features/mssql/article.php/3379901 Moving
system DB's
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly SQL MVP
"Polar Bear" <PolarBear@.discussions.microsoft.com> wrote in message
news:D76B2259-BEA3-4239-9BBB-2E24A2395DBC@.microsoft.com...
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer
> the
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB|||Check out http://www.support.microsoft.com/?id=246133 for transferring
logins.
With regards changing the database ownership, check out SQL Books On
Line for the sproc sp_changedbowner.
Regards
ALI
Polar Bear wrote:
> Hi Good Day to everyone
> In SQL7 Server have created some users ID with the passwords. I would like
> to know how I can transfer those login IDs and Passwords into the SQL2000
> server without re-create.
> Besides, I would like to how to change the db ownership after I transfer the
> ID and password?
> Please advise.
> Polar Bear.
> * Polar Bear is new to SQL DB

Sunday, February 19, 2012

How I Can ADD An Assemby to My DataBase File

I've created a DLL file that has some shared function taht I want to add to my MDF database for using it in the select statements

how I can add the functions in this DLL to my MDF file and use it

You need to use the CREATE ASSEMBLY statement. Start with the overview topic in BOL (here) which should point you at other topics.

Mike

|||

Thank you