显示标签为“sqlserver”的博文。显示所有博文
显示标签为“sqlserver”的博文。显示所有博文

2012年3月21日星期三

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World NULL NULL NULL This is a test NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World{CR}{LF}This is a test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

sql

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World NULL NULL NULL This is a test NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World{CR}{LF}This is a test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World

NULL

NULL

NULL

This

is

a

test

NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 |

| Col2 |

| Col3 |

| Col4 |

| Col5 |

The

Quick

Brown

Fox

Jumps

Hello

World{CR}{LF}This

is

a

test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

sql

Flat File and uneven number of columns

Please leave feedback for Microsoft regarding this problem at https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126493

Ok I'm sure it just me, SSIS has been great so far....but how can you import a straight CSV file with and uneven column count.

For example: (assume CR LF row delimiter)

The,Quick,Brown,Fox,Jumps
Hello,World
This,is,a,test

"Normally" I'd expect this

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World NULL NULL NULL This is a test NULL

Ok but what we get is the row delimiter is ignored in preference for the column delimiter and the row delimiter gets sucked into the column and the next row starts to get layed down.

So we get

| Col1 | | Col2 | | Col3 | | Col4 | | Col5 | The Quick Brown Fox Jumps Hello World{CR}{LF}This is a test

I'm I not seeing a tick box somewhere that says "over here if you want to terminate a row on the row delimiter even if all columns aren't full and we'll pad NULLs in rest of the row columns which you can fix in the flow transformations"

I'm sure it's there.....help!

(By the way SSIS team, great job on the package love using it)

Try using ragged right instead of delimited.

Thanks,

Matt

|||

Ah see if only it was that simple Matt. "Ragged right files are files in which every column has a fixed width, except for the last column, which is delimited by the row delimiter."

So the only thing which can be Ragged in fact is the last column. In my example I've purposely put varying column widths so the old "Ragged Right" doesn’t apply (this is more the norm for ragged files).

So any ideas how this is going to work in SSIS...I must be missing something simple here this is a very common problem that the old DTS, Excel, Access, and other programs deal with quite well.

help!

|||

Unfortunately we only support ragged right for fixed width so for this scenario you would have to read it as a single column and then split it using a script component or you could write a custom component that split it.

Matt

|||

but this is a bug or changed behavior from the old sql server 2000 dts which when you had a comma or tab deliminited file some of the rows had extra columns after the last valid one.. it ignored those extra columns.

the new functionality is to instead append the commas/delimiters into the data pulled in from the last column..

This is causing us major grief becuase now none of our dts's work in the new sql server 2005 so it is not backwards compatible..

|||

This is similar to an issure raised the other day. I produced a sample package on how to handle this.

http://sqlblogcasts.com/files/4/integration_services/entry412.aspx

|||

I'm with you Igkahn. It's a bug. No way is this a feature! This is killing us too. If I have to script this as set out below then something fundimentally is wrong with SSIS. I cut one of our large SQL 2000 servers over to SQL 2005 and we are stopping there until fixes are supplied for errors like this. I'm now having to use the SQL 2000 DTS instead of the nice looking however functionality poor SSIS.

Please get this fixed.

Garry Swan
Information Systems Manager
CSIRO
Australia

|||

If you feel strongly about it then you should raise it through the Feedback centre and through your MS representative if you have one.

|||

Calling it a bug implies that is supposed to do something else and I'm not sure that is the case. I'm not denying that it MIGHT be a bug - hopefully Matt will reply again and tell us (By the way, just because some behaviour was present in DTS, you shouldn't assume the same would be true of SSIS. This is a replacement, not an upgrade).

Regardless, I can understand why this is causing headache. Have you logged it at the feedback center (http://lab.msdn.microsoft.com/productfeedback/default.aspx)? If not, then you shouldn't expect that the feature will make it into the next version.

I don't understand why you call SSIS functionally poor. As Simon explained this can still be achieved quite easily. Surely the fact that there is "more than one way to skin a cat" so to speak means the product is functionally rich as opposed to poor? Is the fact that something cannot be achieved using your "preferred" method really prohibiting you from moving to a superior product?

-Jamie

|||

From my research there has been a lot of posts about this issue in the last couple of months. But im still looking for a proper solution, is there a fix available? Is there a code sample available for a SSIS source component or whatnot, that threats uneven columns properly?

I've looked through the sample for the source component and could not get it to run (something about no compatible component in the dll)

Since people do need to import data from delimited files very often, SSIS should be expending the functionality of what there was in the DTS world... but in this case it was decided to limit it. Whoever came up with the delimiter for each column must have been so proud of himself that he generlized and removed the need for a row delimiter....

Well you haven't, and we want it back. :) It's causing many people, a lot of greef.

Or at least release the source for a flat file handler which people can customize to their liking.

There is so many flat file formats out there.... Why be so restrictive when dealing with them?

|||

Whats wrong with the sample I have provided.

SSIS focus was on building a framework that was performant, scalable and extensible. For this reason the components out of the box don't satisfy everyones requirements. But I have shown how it is very easy to extend SSIS with a script component to achieve your goal.

If you want a more polished solution you can develop your own custom component but that is another level of complexity that really isn't needed due to the power of the script component.

|||

Someone mentioned that the code provided by Sabin didn't work for him/her. I have not tried that code.

Here is a version (another way to skin the cat) that can be tried. Please note that your first row should contain all the column names for this to work. This script assumes that the input is configured in a way that all data on one row constitute a column. So basically, there is just one column in each row. The output of this script is also one column in each row. However, the output created by this script can be "understood" by SSIS file connection manager. Finally, assumption is that "tab" is column delimiter. You can change that below, if that is not the case.

Private dataRow As Boolean = False

Public Function AppendMissingTabs(ByVal Row As InputBuffer) As String

Dim columns As String() = Nothing
Dim outputRow As String = Nothing
Dim outputString As String = Nothing
Dim buffer As StringBuilder = New StringBuilder()

buffer.Append(Row.BigSingleColumn)

columns = Row.BigSingleColumn.Split(New [Char]() {Chr(9)})

If Not dataRow Then
columnCount = columns.Length
End If

Dim N As Integer
If columns.Length < columnCount Then

For N = 1 To columnCount - columns.Length Step 1
buffer.Append(Chr(9))
Next N

End If

dataRow = True

Return buffer.ToString()

End Function

|||

It comes down to if I tell a system that my row finishes with a crlf I don't want it to override my decision and pull the crlf into the data. Why would I want the row delimiter in the data?!? Is this a feature people needed and the SSIS team decided the former was so last week that this new functionality was, in fact, a better solution path...I just doubt it. The required functionality is the way Excel, DTS, Access and many other apps handle this data import. Why is SSIS pulling crlf into my data when I've said this is the end of the row?!?. Just stop and move onto the next row. Put that functionality back in and you've got a great delimited file importer.

Garry Swan

MCDBA

|||

What you have actually said is that your column finishes with your delimiter. The flat file source then looks for that delimiter to end the column. The CRLF is not defined as the record delimiter but the delimiter of the last column.

I know that doesn't solve the problem but should explain the reason for the situation.

I still stand by the fact that if you want this functionality using the script component is a valid solution.

|||

Last night I uploaded a custom source adapter to SourceForge that would let you parse this file with regular expressions.

http://sourceforge.net/projects/textregexsource

Just connect a file connection manager to it and set a regular expression, and it could produce what you want.

I think a regex like (?'Col1'\w+),*(?'Col2'\w*),*(?'Col3'\w*),*(?'Col4'\w*),*(?'Col5'\w*)\n

might do the trick, though it might need tweaking.

Geof

2012年3月19日星期一

FK constraint when FK row is there! Always takes 10 mins to fail!

I am developing a SQLServer/JSP/Java (Jrun4) web app that intermittently has a FK constraint that always hoses up the transaction for exactly 10 minutes.

The user can save a record from a form that inserts a few rows in the db. The second insert is dependent on the FK of the first insert. All the inserts are done in an entity bean that calls stored procs.

We've had this intermittant error where the inserts take exactly 10 minutes (every time!), then it fails with a FK constraint, yet out logging shows that it's using an existing foreign key. (the stored procs returns the FK)

We have a dev server and a test server, and this has yet to occur on the dev server! I feel like there must be something set up incorrectly.

Any ideas?

thanks in advance!

-DanFlagged -

Are any of the tables really large? Enforcing a FK constraint without indexes on large tables could cause it to take a really long time. 10 minutes seems extreme, but...

And do you know what the differences are between your dev and test server? Do they have the same constraints? Do they have the same data?|||And the same indexes and statistics?|||There isn't much data: under 100 rows, 10 column.

The problem only happens intermittently. In fact it hasn't happed in the last several hundered inserts (we've been testing it)

Originally posted by strader
Flagged -

Are any of the tables really large? Enforcing a FK constraint without indexes on large tables could cause it to take a really long time. 10 minutes seems extreme, but...

And do you know what the differences are between your dev and test server? Do they have the same constraints? Do they have the same data?|||Both servers are set up the same. The more I think about it- based on the infrequency of the problem it may just be a coincidence that it only happed on the one server.

I'm investigating a possible answer to the problem- I noticed an unhandled exception in the bean and I think it's possible the 1st insert worked, then some unhandled exception occured and rolled back the transaction, then the bean continuted to attempt to insert the child row- just a theory since this is so infrequent.

Originally posted by Paul Young
And the same indexes and statistics?|||Here's another possibility - if you're running simultaneous transactions from different threads or processes against that table, and if your java code or your interface (jdbc?) is hanging, causing that transaction to sit there indefinitely, it could be causing blocking or deadlocks on that small table. If it puts an exclusive lock on the table, and you're holding that transaction open, then all the other waiting processes will fail or timeout.

It might be happening on only one server vs. the other because you're stressing one more than the other.

If it happens again, try using SET LOCK_TIMEOUT to change it to a shorter time for that connection. The more I think about it, the more likely it seems this is what's happening, since it's timing out after exactly ten minutes each time.|||I wanted to try one more thing before I tried your suggestion- and it looks like I fixed the problem, but I'm not 100% sure why the transaction was failing. Here's what the code was doing:

When the user saves form data, the entity bean inserts rows into the database, and in the same transaction (I think) proceeds to update those rows. My guess is that once in a while sqlserver locks those rows so that the records cannot be re-read. My fix was to prevent the extraneous update from occuring. It was happening because I didn't know enough about Java beans when I wrote the bean code. (I only used the store method in the bean for UPDATES and I handled inserts manually, but the store is called automatically for all bean calls so I ended up inserting, then updating).

Our beans are container managed, so that their transactions begin when the bean is called and end when the bean returns. I thought that one could manipulate an uncommited row inserted within a transaction but I guess that's not ALWAYS the case because 1 out of 100 times it times out and fails.

I'd say the problem's solved since it's been a week since my fix was in and no more problems!

thanks for the help.

fixing orphan users

Hi All,
I'm trying to fix all the orphans users for all the databases in my sql
server 2000 using the code above, but I'm getting an error that the second
cursor already exist.
Can I do a cursor inside another one?
How can I fix this problem?
Any ideas?
Tks in advance
JFB
DECLARE @.DBName sysname
,@.DBStatus int
,@.dbid int
,@.TempDBName nvarchar(70)
SELECT @.DBName = '*'
SELECT @.TempDBName = ' '
DECLARE DBs CURSOR FOR
SELECT name, dbid, status, name
FROM master..sysdatabases
WHERE [name] <> 'tempdb'
and [name] <> 'master'
and [name] <> 'model'
FOR READ ONLY
OPEN DBs
FETCH NEXT FROM DBs INTO @.DBName, @.dbid, @.DBStatus, @.TempDBName
WHILE @.@.FETCH_STATUS = 0
BEGIN
Print @.TempDBName
DECLARE @.tempString nvarchar(255)
SELECT @.tempString = 'USE ' + @.TempDBName +'
DECLARE @.UserName nvarchar(50)
DECLARE orphanuser_cur cursor for
SELECT UserName = name
FROM sysusers
WHERE issqluser = 1 and (sid is not null and sid <> 0x0) and
suser_sname(sid) is null
ORDER BY name
OPEN orphanuser_cur
FETCH NEXT FROM orphanuser_cur INTO @.UserName
WHILE (@.@.fetch_status = 0)
BEGIN
PRINT @.UserName '' user name being resynced''
EXEC sp_change_users_login ''Update_one'', @.UserName, @.UserName
FETCH NEXT FROM orphanuser_cur INTO @.UserName
END
CLOSE orphanuser_cur
DEALLOCATE orphanuser_cur'
EXEC (@.tempString)
FETCH NEXT FROM DBs INTO @.DBName, @.dbid, @.DBStatus, @.TempDBName
END
CLOSE DBs
DEALLOCATE DBsOn Wed, 16 Feb 2005 18:06:32 -0500, JFB wrote:

>I'm trying to fix all the orphans users for all the databases in my sql
>server 2000 using the code above, but I'm getting an error that the second
>cursor already exist.
>Can I do a cursor inside another one?
>How can I fix this problem?
>Any ideas?
Hi JFB,
The first thing to do when troubleshooting dynamic SQL is to change
EXEC (@.tempString)
to
PRINT @.tempString
and inspect the results.
If you do that, you'll instantly note that the length of your dynamic SQL
exceeds the 255 character you used in the declaration of @.tempString.
Another problem you'll find after fixing this one is here:
> PRINT @.UserName '' user name being resynced''
This should be changed to
PRINT @.UserName + '' user name being resynced''
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Yes Hugo, Tks for you reply and help.
I got those problems...
Rgds
JFB
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:f8v9115l8464ppt54s56bo45knisli5l3u@.
4ax.com...
> On Wed, 16 Feb 2005 18:06:32 -0500, JFB wrote:
>
> Hi JFB,
> The first thing to do when troubleshooting dynamic SQL is to change
> EXEC (@.tempString)
> to
> PRINT @.tempString
> and inspect the results.
> If you do that, you'll instantly note that the length of your dynamic SQL
> exceeds the 255 character you used in the declaration of @.tempString.
> Another problem you'll find after fixing this one is here:
> This should be changed to
> PRINT @.UserName + '' user name being resynced''
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||Yes Hugo, Tks for you reply and help.
I got those problems...
Rgds
JFB
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:f8v9115l8464ppt54s56bo45knisli5l3u@.
4ax.com...
> On Wed, 16 Feb 2005 18:06:32 -0500, JFB wrote:
>
> Hi JFB,
> The first thing to do when troubleshooting dynamic SQL is to change
> EXEC (@.tempString)
> to
> PRINT @.tempString
> and inspect the results.
> If you do that, you'll instantly note that the length of your dynamic SQL
> exceeds the 255 character you used in the declaration of @.tempString.
> Another problem you'll find after fixing this one is here:
> This should be changed to
> PRINT @.UserName + '' user name being resynced''
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)

2012年3月11日星期日

Fixed Memory = 3Gb sqlserver.exe uses 1.7Gb

Hello
We are trying to enhance the performance of our server. We recently noticed
that despite having 4Gb of RAM in the server, sqlserver.exe was only using
1.7Gb. There are 4 databases on the server, one of which is at 9Gb and in
constant use (by around 50 people).
We had thought that perhaps there was a problem with the dynamic memory
allocation so switched to fixed at 3Gb. Having restarted, the sqlserver.exe
process is still only using 1.7Gb of RAM (and still running at 100% CPU).
Surely when allocating memory in this way it should show sqlserver.exe with
the total amount of RAM. (Looking in task monitor to get the usage figure.)
Any ideas?
Thanks
DavidDavid Morgan wrote:
> Hello
> We are trying to enhance the performance of our server. We recently notic
ed
> that despite having 4Gb of RAM in the server, sqlserver.exe was only using
> 1.7Gb. There are 4 databases on the server, one of which is at 9Gb and in
> constant use (by around 50 people).
> We had thought that perhaps there was a problem with the dynamic memory
> allocation so switched to fixed at 3Gb. Having restarted, the sqlserver.e
xe
> process is still only using 1.7Gb of RAM (and still running at 100% CPU).
> Surely when allocating memory in this way it should show sqlserver.exe wit
h
> the total amount of RAM. (Looking in task monitor to get the usage figure
.)
> Any ideas?
> Thanks
> David
>
Which version of SQL? 2000 Standard will only use 2GB of RAM...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||1.7 GB indicates SQL Server uses 2GB (considering the memtoleave area - Goog
le for more info). What
version and edition of SQL Server and the OS?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Morgan" <microsoft_newsgroups.nospam@.davidmorgan.me.uk> wrote in mess
age
news:eacc4dLvGHA.1224@.TK2MSFTNGP03.phx.gbl...
> Hello
> We are trying to enhance the performance of our server. We recently notic
ed that despite having
> 4Gb of RAM in the server, sqlserver.exe was only using 1.7Gb. There are 4
databases on the
> server, one of which is at 9Gb and in constant use (by around 50 people).
> We had thought that perhaps there was a problem with the dynamic memory al
location so switched to
> fixed at 3Gb. Having restarted, the sqlserver.exe process is still only u
sing 1.7Gb of RAM (and
> still running at 100% CPU). Surely when allocating memory in this way it
should show
> sqlserver.exe with the total amount of RAM. (Looking in task monitor to g
et the usage figure.)
> Any ideas?
> Thanks
> David
>|||Thank you to both above. You are quite correct.
SQL Server 8.00.760 - SP3 (Standard Edition)
Bummer. Guess the 2005 upgrade is coming sooner than I thought.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23XKgriLvGHA.2232@.TK2MSFTNGP05.phx.gbl...
> 1.7 GB indicates SQL Server uses 2GB (considering the memtoleave area -
> Google for more info). What version and edition of SQL Server and the OS?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "David Morgan" <microsoft_newsgroups.nospam@.davidmorgan.me.uk> wrote in
> message news:eacc4dLvGHA.1224@.TK2MSFTNGP03.phx.gbl...
>