Friday, March 30, 2012

OutOfMemoryException with SQL Server Mobile

Hi,

I'm getting always an OutOfMemoryException after my program runs for a while. It's a smartphone application running on .NET 2.0 CF and using the SQL Server Mobile 2005. Sometimes it's even not a OutOfMemoryException but a SqlCeException. But it's always when the phone is having little free memory left.

I have also created a few custom controls (I even implemented the Disposable interface) to dispose all resources (Fonts, Bitmaps). I'm using all Pens and Brushes always in "using" blocks, to have them disposed immediately after having used them. The program does not have any static objects or lists of objects that are hold in memory for a long time.

I really don't understand why I get this exception. I see it always happen after doing a lot queries on the SQL Server Mobile. Is this tool using a lot memory? Can I flush somehow the memory of the SQL Server? Should I run also manually sometimes the GarbageCollector? Does this thing not run automatically?

Can anybody, perhaps of MSFT help me? I'm also willing to share the full source code with MSFT, if required.

You will probably get a faster answer on the Sql Server Mobile forum.

Moving this thread to that forum.

|||

Here are a few suggestions (from an earlier thread)

1) Try to use SqlCeResultSet than DataSet

2) Please dispose the managed objects explicitly instead of waiting for garbage collector to pick them up. Please also note that SqlCeCommand object can be reused and they need to be disposed explicitly

In addtion you can email me your project and I'll be glad to look into this issue for you.

Mark dot Ihimoyan at microsoft dot com

Out-of-Memory error on Sort Transformation

Trying to determine if anyone else has encountered this problem and, if so, have you obtained a resolution:

I have a data flow initiated from a Foreach Container. Inside the Data Flow there is a Source Script transformation connected to a Sort transformation with an OLE DB Destination.

The Sort transformation has the sort keys defined and the "Eliminate Duplicates" option checked.

The first pass into the Data Flow is successful. The 2nd pass fails in the Sort:

Information: 0x4004300A at Load TC03, DTS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Load TC03, DTS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Load TC03, DTS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at Load TC03, DTS.Pipeline: Execute phase is beginning.
Warning: 0x80004005 at Load TC03, Sort [1506]: Unspecified error
Error: 0xC020821B at Load TC03, Sort [1506]: A worker thread in the Sort transformation stopped with error code 0x80004005. A catastrophic error was encountered while sorting a buffer.
Error: 0xC020821B at Load TC03, Sort [1506]: A worker thread in the Sort transformation stopped with error code 0x%1!8.8X!. A catastrophic error was encountered while sorting a buffer.
Error: 0xC0208296 at Load TC03, Sort [1506]: The input buffer could not be cloned. An out-of-memory condition occurred or there was an internal error.
Error: 0xC0047022 at Load TC03, DTS.Pipeline: The ProcessInput method on component "Sort" (1506) failed with error code 0x80004005. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
Error: 0xC0047021 at Load TC03, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0x80004005.
Error: 0xC0047039 at Load TC03, DTS.Pipeline: Thread "WorkThread1" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
Error: 0xC0047021 at Load TC03, DTS.Pipeline: Thread "WorkThread1" has exited with error code 0xC0047039.
Information: 0x40043008 at Load TC03, DTS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DF at Load TC03, hlp_ISOTypeLossTC03 [379]: The final commit for the data insertion has started.
Information: 0x402090E0 at Load TC03, hlp_ISOTypeLossTC03 [379]: The final commit for the data insertion has ended.
Information: 0x40043009 at Load TC03, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at Load TC03, DTS.Pipeline: "component "hlp_ISOTypeLossTC03" (379)" wrote 5388 rows.
Task failed: Load TC03
Warning: 0x80019002 at Foreach TC03 File: The Execution method succeeded, but the number of errors raised (7) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at ISOTypeLoss: The Execution method succeeded, but the number of errors raised (7) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "ISOTypeLoss.dtsx" finished: Failure.

Does this ring a bell with anyone?

ThanksI think this is a known issue that they are currently looknig into.
its not necassarily a problem with the Sort, its more caused by the Foreach loop (I think).

Check out thread "For Loop container - out of memory condition"

-Jamie|||

Hi Raul,

Yes, this is a known issue. We've fixed it for the next CTP. In the meantime, the only workaround I'm aware of is to put the data flow task in a separate package and use an Execute Package task to schedule the execution of the data flow task.
regards,
ash

|||What volume of data do you get this error on?

It would be interesting to see if ExtraSort component (http://www.ivolva.com/extrasort.html) would hit the same problem.|||Very small - about 300 rows|||Ash:

I have the June CTP installed and am getting the same error:

Warning: 0x80004005 at Load V6 Policy, Sort [4166]: Unspecified error

Error: 0xC020821B at Load V6 Policy, Sort [4166]: A worker thread in the Sort transformation stopped with error code 0x80004005. A catastrophic error was encountered while sorting a buffer.

Error: 0xC020821B at Load V6 Policy, Sort [4166]: A worker thread in the Sort transformation stopped with error code 0x%1!8.8X!. A catastrophic error was encountered while sorting a buffer.

Error: 0xC0208296 at Load V6 Policy, Sort [4166]: The input buffer could not be cloned. An out-of-memory condition occurred or there was an internal error.

Error: 0xC0047022 at Load V6 Policy, DTS.Pipeline: The ProcessInput method on component "Sort" (4166) failed with error code 0x80004005. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

Error: 0xC0047021 at Load V6 Policy, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0x80004005.

Error: 0xC0047039 at Load V6 Policy, DTS.Pipeline: Thread "WorkThread1" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.

Error: 0xC0047021 at Load V6 Policy, DTS.Pipeline: Thread "WorkThread1" has exited with error code 0xC0047039.
Another poster suggested a thread for "For Loop container - out of memory condition" - I searched this forum and it returned no results.

Any update as to whether the fix made the June CTP?

|||

Raul Villaronga wrote:

Any update as to whether the fix made the June CTP?

It didn't. It'll be in the next CTP.|||Yes, this was caused by a bug in the sort transform. It was not correctly releasing some resources when the dataflow completed. The forloop just exposes the problem because the sort doesn't get freed between executions.|||FYI - Still getting this in September CTP.
|||Both memory issues I had with June CTP including the catastrophic failure of the sort in a loop and the data viewer consuming memory have been fixed in September CTP.

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)
>
>

Out-of-control Logging

This morning I found out that reporting services was logging out-of-control.
In one day I have about 2 Gigs of the last four lines:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.878.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerService__07_16_2004_06_40_23.log</Path>
<SystemName>[Removed]</SystemName>
<OSName>Microsoft Windows NT 5.0.2195.0</OSName>
<OSVersion>5.0.2195.0</OSVersion>
</Header>
ReportingServicesService!runningjobs!1b48!7/16/2004-06:40:23:: i INFO:
Execution Log Entry Expiration timer enabled: Cycle: 69576 seconds
ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO:
Expiring old execution log entries
ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO:
Expiration of old execution log entries is complete. Removed 0 entries.
ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO: Cleaned
0 broken snapshots, 0 chunks
Can anyone tell me what's going on and how to correct the problem?
Thanks in advance,
BryanCurrently the only workaround is to first try restarting the ReportServer
service. If that does not help you will need to restart the box. We are
aware of this issue and are looking into it.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryan Bullard" <reply@.to.group.com> wrote in message
news:eWfbW10aEHA.3352@.TK2MSFTNGP10.phx.gbl...
> This morning I found out that reporting services was logging
out-of-control.
> In one day I have about 2 Gigs of the last four lines:
> <Header>
> <Product>Microsoft SQL Server Reporting Services Version
> 8.00.878.00</Product>
> <Locale>en-US</Locale>
> <TimeZone>Central Daylight Time</TimeZone>
> <Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\LogFiles\ReportServerService__07_16_2004_06_40_23.log</Path>
> <SystemName>[Removed]</SystemName>
> <OSName>Microsoft Windows NT 5.0.2195.0</OSName>
> <OSVersion>5.0.2195.0</OSVersion>
> </Header>
> ReportingServicesService!runningjobs!1b48!7/16/2004-06:40:23:: i INFO:
> Execution Log Entry Expiration timer enabled: Cycle: 69576 seconds
> ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO:
> Expiring old execution log entries
> ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO:
> Expiration of old execution log entries is complete. Removed 0 entries.
> ReportingServicesService!dbcleanup!11f8!7/16/2004-06:40:23:: i INFO:
Cleaned
> 0 broken snapshots, 0 chunks
> Can anyone tell me what's going on and how to correct the problem?
> Thanks in advance,
> Bryan
>

Out-of_process error when trying to process a dimension

In my dsv I have a table called OrderDetail. This table has a salescodeid column in it. I have a second table called SalesCodeDetail. There is a relationship between these two tables based on the salescodeid. The Id is the primary key in the SalesCodeDetail table. In my cube I have a dimension of OrderDetail. When I try to add the salescode description from the salescodeDetail table as an attribute in my OrderDetail dimension I get this error.

Here is a more detailed description of this same problem.

I have a fact table that is joined to a dimension table 'Customer' by the customer number. Customer Number is the primary key in the 'Customer' view. I have a second Dimension table called 'SalesRep' which is referenced to the fact table through the customer. The join is SalesRepId, which is primary key on the SalesRep view, and SalesRepId which is on the 'Customer' view but not a key. Also, this relationship between SalesRep and customer does exist in the DSV.

When I try to process this relationship I get the following error: 'OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000.'

The SQL behind the processing is doing an 'OPENROWSET' which is causing the problem. If I take the 'OPENROWSET' out of the query when I run in Query Analyzer, the query runs fine.

So, I need to modify the way AS is creating this processing query.

|||

So, let me check my understanding of the problem. You have a fact table that references the Customer dimension. The Customer dimension holds a SalesRep key which points to the SalesRep dimension. The fact table is assigned a referenced relationship to the SalesRep dimension using the Customer dimension as the intermediate dimension in that relationship. Is that correct?

If so, do you have the SalesRep dimension flagged to be materialized?

Either way, could you post the SQL generated that is causing the error?

Thanks,
Bryan Smith

|||

Yes, you're understanding the problem correctly. Yes, the SalesRep dimension is flagged to be materialized.

Here is the SQL

SELECT [dbo_vw_OrdersAndSalesDetailFact].[ICAndExtExtendedPrice] AS [dbo_vw_OrdersAndSalesDetailFactICAndExtExtendedPrice0_0],[dbo_vw_OrdersAndSalesDetailFact].[ICAndExtOrderQtyInRptUOM] AS [dbo_vw_OrdersAndSalesDetailFactICAndExtOrderQtyInRptUOM0_1],[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] AS [dbo_vw_OrdersAndSalesDetailFactSoldToAccountId0_2],[dbo_vw_OMSBPCustomer_2].[PrimarySalesRepAccountID] AS [dbo_vw_OMSBPCustomerPrimarySalesRepAccountID2_0]
FROM [dbo].[vw_OrdersAndSalesDetailFact] AS [dbo_vw_OrdersAndSalesDetailFact],
OPENROWSET
(
N'SQLNCLI.1',
N'',
N'[dbo].[vw_OMSBPCustomer]'
)
AS [dbo_vw_OMSBPCustomer_2]
WHERE
(

(
[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] = [dbo_vw_OMSBPCustomer_2].[CustomerNumber]
)
)

Now if I take this exact SQL and run it in query analyzer I get basically the same error:

Msg 7430, Level 16, State 3, Line 1

Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.

If I remove the OPENROWSET section as below

SELECT [dbo_vw_OrdersAndSalesDetailFact].[ICAndExtExtendedPrice]

AS [dbo_vw_OrdersAndSalesDetailFactICAndExtExtendedPrice0_0],

[dbo_vw_OrdersAndSalesDetailFact].[ICAndExtOrderQtyInRptUOM]

AS [dbo_vw_OrdersAndSalesDetailFactICAndExtOrderQtyInRptUOM0_1],

[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId]

AS [dbo_vw_OrdersAndSalesDetailFactSoldToAccountId0_2],

[dbo_vw_OMSBPCustomer_2].[PrimarySalesRepAccountID] AS

[dbo_vw_OMSBPCustomerPrimarySalesRepAccountID2_0]

FROM [dbo].[vw_OrdersAndSalesDetailFact] AS [dbo_vw_OrdersAndSalesDetailFact],

-- OPENROWSET

-- (

-- N'SQLNCLI.1',

-- N'',

-- N'[dbo].[vw_OMSBPCustomer]'

-- )

--

[omswrite].[dbo].[vw_OMSBPCustomer] AS [dbo_vw_OMSBPCustomer_2] ****different database here

WHERE

(

(

[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] = [dbo_vw_OMSBPCustomer_2].[CustomerNumber]

)

)

The customer table and the fact table are in different databases, not sure if that is causing some problems, but don't think it should.

|||

Deselecting the Materialize option should eliminate the problem becase the join will not be performed. If performance drops when querying the Sales Rep data, you may want to try using the .NET provider on your data sources.

B.

|||

This worked. Thanks very much for taking the time to help!

sql

Out-of_process error when trying to process a dimension

In my dsv I have a table called OrderDetail. This table has a salescodeid column in it. I have a second table called SalesCodeDetail. There is a relationship between these two tables based on the salescodeid. The Id is the primary key in the SalesCodeDetail table. In my cube I have a dimension of OrderDetail. When I try to add the salescode description from the salescodeDetail table as an attribute in my OrderDetail dimension I get this error.

Here is a more detailed description of this same problem.

I have a fact table that is joined to a dimension table 'Customer' by the customer number. Customer Number is the primary key in the 'Customer' view. I have a second Dimension table called 'SalesRep' which is referenced to the fact table through the customer. The join is SalesRepId, which is primary key on the SalesRep view, and SalesRepId which is on the 'Customer' view but not a key. Also, this relationship between SalesRep and customer does exist in the DSV.

When I try to process this relationship I get the following error: 'OLE DB error: OLE DB or ODBC error: Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.; 42000.'

The SQL behind the processing is doing an 'OPENROWSET' which is causing the problem. If I take the 'OPENROWSET' out of the query when I run in Query Analyzer, the query runs fine.

So, I need to modify the way AS is creating this processing query.

|||

So, let me check my understanding of the problem. You have a fact table that references the Customer dimension. The Customer dimension holds a SalesRep key which points to the SalesRep dimension. The fact table is assigned a referenced relationship to the SalesRep dimension using the Customer dimension as the intermediate dimension in that relationship. Is that correct?

If so, do you have the SalesRep dimension flagged to be materialized?

Either way, could you post the SQL generated that is causing the error?

Thanks,
Bryan Smith

|||

Yes, you're understanding the problem correctly. Yes, the SalesRep dimension is flagged to be materialized.

Here is the SQL

SELECT [dbo_vw_OrdersAndSalesDetailFact].[ICAndExtExtendedPrice] AS [dbo_vw_OrdersAndSalesDetailFactICAndExtExtendedPrice0_0],[dbo_vw_OrdersAndSalesDetailFact].[ICAndExtOrderQtyInRptUOM] AS [dbo_vw_OrdersAndSalesDetailFactICAndExtOrderQtyInRptUOM0_1],[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] AS [dbo_vw_OrdersAndSalesDetailFactSoldToAccountId0_2],[dbo_vw_OMSBPCustomer_2].[PrimarySalesRepAccountID] AS [dbo_vw_OMSBPCustomerPrimarySalesRepAccountID2_0]
FROM [dbo].[vw_OrdersAndSalesDetailFact] AS [dbo_vw_OrdersAndSalesDetailFact],
OPENROWSET
(
N'SQLNCLI.1',
N'',
N'[dbo].[vw_OMSBPCustomer]'
)
AS [dbo_vw_OMSBPCustomer_2]
WHERE
(

(
[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] = [dbo_vw_OMSBPCustomer_2].[CustomerNumber]
)
)

Now if I take this exact SQL and run it in query analyzer I get basically the same error:

Msg 7430, Level 16, State 3, Line 1

Out-of-process use of OLE DB provider "SQLNCLI.1" with SQL Server is not supported.

If I remove the OPENROWSET section as below

SELECT [dbo_vw_OrdersAndSalesDetailFact].[ICAndExtExtendedPrice]

AS [dbo_vw_OrdersAndSalesDetailFactICAndExtExtendedPrice0_0],

[dbo_vw_OrdersAndSalesDetailFact].[ICAndExtOrderQtyInRptUOM]

AS [dbo_vw_OrdersAndSalesDetailFactICAndExtOrderQtyInRptUOM0_1],

[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId]

AS [dbo_vw_OrdersAndSalesDetailFactSoldToAccountId0_2],

[dbo_vw_OMSBPCustomer_2].[PrimarySalesRepAccountID] AS

[dbo_vw_OMSBPCustomerPrimarySalesRepAccountID2_0]

FROM [dbo].[vw_OrdersAndSalesDetailFact] AS [dbo_vw_OrdersAndSalesDetailFact],

-- OPENROWSET

-- (

-- N'SQLNCLI.1',

-- N'',

-- N'[dbo].[vw_OMSBPCustomer]'

-- )

--

[omswrite].[dbo].[vw_OMSBPCustomer] AS [dbo_vw_OMSBPCustomer_2] ****different database here

WHERE

(

(

[dbo_vw_OrdersAndSalesDetailFact].[SoldToAccountId] = [dbo_vw_OMSBPCustomer_2].[CustomerNumber]

)

)

The customer table and the fact table are in different databases, not sure if that is causing some problems, but don't think it should.

|||

Deselecting the Materialize option should eliminate the problem becase the join will not be performed. If performance drops when querying the Sales Rep data, you may want to try using the .NET provider on your data sources.

B.

|||

This worked. Thanks very much for taking the time to help!

Outloook 2002 & SQL Server 2000

Hi ,
I am running SQL server 2000 sp3a and MS Outlook 2002. I have created the
profile and tested it within mail from the ontrol panel which i can received
the email.
From SQL Server , i assigned the profile "Test" to SQL Mail & SQL Mail Agent
and click on the test which said "Successfully started(stopped) a mail
session with this profile".
Then i went ahead to create the operator and put in a valid email addr and i
click on the "test" which gave me a return message that said "the message wa
s
successfully sent" but somehow i did not recieve that email
How can i fix this ?
appreciate ur advice
tks & rdgs
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200602/1Hi ,
to add on further i used Query Analyzer and i got the "mail sent" using
xp_sendmail @.recipient = 'eee' , @.subject = 'oooo'
tks & rdgs
maxzsim wrote:
>Hi ,
> I am running SQL server 2000 sp3a and MS Outlook 2002. I have created the
>profile and tested it within mail from the ontrol panel which i can receive
d
>the email.
>From SQL Server , i assigned the profile "Test" to SQL Mail & SQL Mail Agen
t
>and click on the test which said "Successfully started(stopped) a mail
>session with this profile".
>Then i went ahead to create the operator and put in a valid email addr and
i
>click on the "test" which gave me a return message that said "the message w
as
>successfully sent" but somehow i did not recieve that email
>How can i fix this ?
>appreciate ur advice
>tks & rdgs
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200602/1|||Hi ,
Upon further checking i see that all those mails were "stucked" in the MS
Outlook.
I'll have to manually click on the "send/receive" to sent out those emails .
furthermore , i can only send to those company email addr and not the
hotmail/gmail address.
i have set up the SMTP server but not the POP3 server i do not intend to
receive any incoming email
How can i prevent the emails from being saved to MS Outlook and i don't have
to manually click on the "send/receive" and how can i send to all valid emai
l
addresses ?
appreciate ur advice
tks & rdgs
maxzsim wrote:
>Hi ,
> to add on further i used Query Analyzer and i got the "mail sent" using
>xp_sendmail @.recipient = 'eee' , @.subject = 'oooo'
>tks & rdgs
>
>
>[quoted text clipped - 15 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200602/1|||I am pretty sure you cannot because that is the latest outlook security
feature to prevent software sending out junk emails. Software could be
downloaded and take over your email service to send out emails without you
knowing it.
"maxzsim via webservertalk.com" <u14644@.uwe> wrote in message
news:5c2572e6256ac@.uwe...
> Hi ,
> Upon further checking i see that all those mails were "stucked" in the MS
> Outlook.
> I'll have to manually click on the "send/receive" to sent out those emails
> .
> furthermore , i can only send to those company email addr and not the
> hotmail/gmail address.
> i have set up the SMTP server but not the POP3 server i do not intend to
> receive any incoming email
> How can i prevent the emails from being saved to MS Outlook and i don't
> have
> to manually click on the "send/receive" and how can i send to all valid
> email
> addresses ?
> appreciate ur advice
> tks & rdgs
> maxzsim wrote:
> --
> Message posted via webservertalk.com
> http://www.webservertalk.com/Uwe/Forum...amming/200602/1|||Hi ,
I want to configure something with SQL Mail & SQL Agent Mail to auto send
out alert email so what software could help me acheive this ?
tks & rdgs
Grant wrote:
>I am pretty sure you cannot because that is the latest outlook security
>feature to prevent software sending out junk emails. Software could be
>downloaded and take over your email service to send out emails without you
>knowing it.
>
>[quoted text clipped - 29 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200602/1|||Hi ,
Actually i am as to why i ccan only send to company123@..xxx.sss
but not xxx@.hotmail/gmail.com as i thought if you could send via SMTP then i
t
shld send as long as its a valid email addr ?
i got this error message " 554 Relay rejected for policy reasons."
appreciate ur advice
tks & rdgs
Grant wrote:
>I am pretty sure you cannot because that is the latest outlook security
>feature to prevent software sending out junk emails. Software could be
>downloaded and take over your email service to send out emails without you
>knowing it.
>
>[quoted text clipped - 29 lines]
Message posted via webservertalk.com
http://www.webservertalk.com/Uwe/Forum...amming/200602/1