Showing posts with label source. Show all posts
Showing posts with label source. Show all posts

Friday, March 30, 2012

Output Column Width not refected in the Flat File that is created using a Flat File Destination?

I am transferring data from an OLEDB source to a Flat File Destination and I want the column width for all of the output columns to 30 (max width amongst the columns selected), but that is not refected in the Fixed Width Flat File that got created. The outputcolumnwidth seems to be the same as the inputcolumnwidth. Is there any other setting that I am possibly missing or is this a possible defect?

Any inputs will be appreciated.

M.Shah

InputColumnWidth represents the width in the file and OutputColumnWidth is the width in the data flow.

This may sound confusing for the case of Flat File destination connection, but the same connection manager object is used for sources and destination. There is also the description of these properties in the property grid of the Flat File Connection Manager UI.

So, to conclude the InputColumnWidth is the one controlling the size of the columns in the destination file.

Thanks.

|||

Thanks for the information. That was definitely helpful to figure out why the OutputColumnWidth was not reflected in the flat file.

Output Column Width not refected in the Flat File that is created using a Flat File Destination?

I am transferring data from an OLEDB source to a Flat File Destination and I want the column width for all of the output columns to 30 (max width amongst the columns selected), but that is not refected in the Fixed Width Flat File that got created. The outputcolumnwidth seems to be the same as the inputcolumnwidth. Is there any other setting that I am possibly missing or is this a possible defect?

Any inputs will be appreciated.

M.Shah

InputColumnWidth represents the width in the file and OutputColumnWidth is the width in the data flow.

This may sound confusing for the case of Flat File destination connection, but the same connection manager object is used for sources and destination. There is also the description of these properties in the property grid of the Flat File Connection Manager UI.

So, to conclude the InputColumnWidth is the one controlling the size of the columns in the destination file.

Thanks.

|||

Thanks for the information. That was definitely helpful to figure out why the OutputColumnWidth was not reflected in the flat file.

sql

OutOffMemory Exception

Hi all,
I have an exception as follows:
java.lang.OutOfMemoryError
at com.microsoft.util.UtilPagedTempBuffer.compressBlo ckList(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.getBlock(Un known Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unkno wn Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unkno wn Source)
at com.microsoft.util.UtilByteArrayDataProvider.recei ve(Unknown Source)
at com.microsoft.util.UtilByteOrderedDataReader.recei ve(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
De query used is a simple select statement:
select t1.pm_key, t2.type
from table1 t1, table2 t2
where t1.pm_key = t2.pm_key
and t2.status <= '160-00'
and t1.from_key = 'P000003456'
My questions:
1. Is it a driver problem?
2. What is the driver doing at that point?
3. How can I avoid this ? (i.e. re-write the query)
4. Can I give the process more memory (other than -Xmx<amount>)?
Any tips/hints are very welcome.
TIA.
Frank.
Hi.
How much data is being returned?
I would suggest adding the connection property
selectMethod=cursor to your connection properties.
That might save client-side memory.
Joe Weinstein at BEA
Frank Brouwer wrote:

> Hi all,
> I have an exception as follows:
> java.lang.OutOfMemoryError
> at com.microsoft.util.UtilPagedTempBuffer.compressBlo ckList(Unknown Source)
> at com.microsoft.util.UtilPagedTempBuffer.getBlock(Un known Source)
> at com.microsoft.util.UtilPagedTempBuffer.write(Unkno wn Source)
> at com.microsoft.util.UtilPagedTempBuffer.write(Unkno wn Source)
> at com.microsoft.util.UtilByteArrayDataProvider.recei ve(Unknown Source)
> at com.microsoft.util.UtilByteOrderedDataReader.recei ve(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown Source)
> at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
> Source)
> at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
> Source)
> De query used is a simple select statement:
> select t1.pm_key, t2.type
> from table1 t1, table2 t2
> where t1.pm_key = t2.pm_key
> and t2.status <= '160-00'
> and t1.from_key = 'P000003456'
> My questions:
> 1. Is it a driver problem?
> 2. What is the driver doing at that point?
> 3. How can I avoid this ? (i.e. re-write the query)
> 4. Can I give the process more memory (other than -Xmx<amount>)?
>
> Any tips/hints are very welcome.
> TIA.
> Frank.
>
|||Hi Joe,
Thanks for the tip, but I already use that selection method on the
connection. The query is supposed to retrieve about 1,500 reccords and the
tables contain about 30,000 reccords. It also takes a long time of usage
of the system before the message appears so I also checked for memory leaks
(closing connections and prepared statements etc..).
If I look at the log file I have, there is an other message just before the
OutOffMemory message:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Transaction (Process ID 69) was deadlocked on {lock}
resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sErrorToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.pro cessReplyToken(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
Do you think that it can cause this problem?
If I look at:
at com.microsoft.util.UtilPagedTempBuffer.compressBlo ckList(Unknown Source)
I think that the JDBC driver is using some kind of internal (Hash?) table to
do some sorting, is it possible that this has some kind of limmit?
Thanks for your help.
Frank.
"Joe Weinstein" <joeNOSPAM@.bea.com> wrote in message
news:408FDABC.5060508@.bea.com...[vbcol=seagreen]
> Hi.
> How much data is being returned?
> I would suggest adding the connection property
> selectMethod=cursor to your connection properties.
> That might save client-side memory.
> Joe Weinstein at BEA
> Frank Brouwer wrote:
Source)
>
|||Frank Brouwer wrote:

> Hi Joe,
> Thanks for the tip, but I already use that selection method on the
> connection. The query is supposed to retrieve about 1,500 reccords and the
> tables contain about 30,000 reccords. It also takes a long time of usage
> of the system before the message appears so I also checked for memory leaks
> (closing connections and prepared statements etc..).
> If I look at the log file I have, there is an other message just before the
> OutOffMemory message:
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC][SQLServer]Transaction (Process ID 69) was deadlocked on {lock}
> resources with another process and has been chosen as the deadlock victim.
> Rerun the transaction.
> at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown Source)
> at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sErrorToken(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReplyToken(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.pro cessReplyToken(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReply(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown Source)
> at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
> Source)
> at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
> Source)
> Do you think that it can cause this problem?
>
no.

> If I look at:
> at com.microsoft.util.UtilPagedTempBuffer.compressBlo ckList(Unknown Source)
> I think that the JDBC driver is using some kind of internal (Hash?) table to
> do some sorting, is it possible that this has some kind of limmit?
No limit as such, but maybe inefficient code for the size of the task.
If you can make a standalone simple jdbc program that creates
the table, loops populating it, and then does the call that causes the mem
problem, MS would take it from there...
Joe

> Thanks for your help.
> Frank.
> "Joe Weinstein" <joeNOSPAM@.bea.com> wrote in message
> news:408FDABC.5060508@.bea.com...
>
> Source)
>
>

Wednesday, March 28, 2012

Outlook Data as a Source

We have a few legacy Crystal Reports that we have written that group,
calculate, etc. Outlook Calendar and conctact information. We are looking to
replace these with SQL Reports, but when I looked at my connection info under
SQL Reporting, I did not see anything that can effectively query Outlook
Calendar and Contact information. Does anyone know how I can effectively
connect to Outlook Calendar and Contact information as a source for my
reports?Hi,
You can use an OLEDB connection string to connect to Outlook/Exchange:
<code>
Outlook
9.0;MAPILEVEL="";Provider=Microsoft.Jet.OLEDB.4.0;TABLETYPE=0;DATABASE=C:\Temp\
</code>
With this connection you can simple query the contacts: <code>select * from
Contacts</code>. I haven't been able to query the calendar yet, but you can
try using MS Access to create a link to Outlook and look for that properties.
Hope this would help you.
Jan Pieter Posthuma
"Jack Bender" wrote:
> We have a few legacy Crystal Reports that we have written that group,
> calculate, etc. Outlook Calendar and conctact information. We are looking to
> replace these with SQL Reports, but when I looked at my connection info under
> SQL Reporting, I did not see anything that can effectively query Outlook
> Calendar and Contact information. Does anyone know how I can effectively
> connect to Outlook Calendar and Contact information as a source for my
> reports?

Monday, March 26, 2012

Outer Join Issues - Please Help

I am working on the record source for a report to produce monthly customer statements. Thanks to everyone here, I have been able to overcome many, many hurdles I have encountered. I just have one last issue I need to get resolved (famous last words, I know).

At the heart of my record source are two entities:

1. AROPNFIL - A table of all Accounts Receivable items (invoices, payments, credits, etc.)
2. fnBalance(@.StartDate) - A table valued function that gives me the starting balance for a customer on a particular date by summing the net Amounts of all items in the AROPNFIL that occured before the @.startdate. (i.e. Invoices have a positive amount, payments have a negative amount, so they net out so that only unpaid invoices remain.)

These are joined on customer_number. The query also selects only the rows in the AROPNFIL table that are between @.StartDate and @.EndDate for the month.

Everything was going great until...I realized that no statement was being created for a customer if they didn't have any activity in the current month, even though they had a starting balance.

So I tried an outer join, telling the query to select all rows from the fnBalance table. But that still wasn't returning the rows I wanted. After several hours of cursing and feeling the need for a drink, I realized why that wasn't working. Because the customer in question, let's call it "Coast01" had rows in the AROPNFIL table before the @.StartDate, it was seeing that as having completed the join and hence no reason to return a row for that starting balance.

So, this is what I need, a way to write what I am going to try to interpret as the following.

Select *
From (AROPNFIL WHERE Doc_date BETWEEN @.StartDate AND @.EndDate) RIGHT OUTER JOIN fnBalance(@.StartDate)

Does that make sense? I need the join with fnBalance to take place after the query has selected only the rows between @.startdate and @.enddate so that the row for the balance for "Coast01" will appear even though there is no activity in the current month.

But I am at a loss for how to write that in the FROM and WHERE clauses. I guess one way would be to create a query selecting rows from AROPNFIL WHERE doc_date BETWEEN @.StartDate AND @.EndDate and then create another query performing the outer join between that query and fnBalance, but I don't really want to do that because the rest of my record source query is actually a lot more complicated than what I've explained here, and I'd rather not have to create additional queries if I don't have to. But if you guys tell me there is no other way, I'll believe you.

Thank you all!Actually, I think I'm on the right path here using a derived table, please correct me if I'm wrong:

SELECT *
FROM (SELECT * FROM
AROPNFIL WHERE Doc_date BETWEEN @.StartDate AND @.EndDate) RIGHT OUTER JOIN
fnBalance(@.StartDate) StartBalance ON AROPNFIL.cus_no = StartBalance.cus_no

Obviously, I'll get rid of the *s, but no one here cares about what columns I'm actually pulling out.|||This is correct, I got it to work!!!