SSIS Pacakge Error:'Deferred Prepare Could Not Be Completed'

Aug 4, 2006

Hello,
I am trying to use the Import export wizard to created a package,
using the provide source query option. If i just copy the query from a text file
and try to paste , sql only accepts it partially. so i saved it as a sql file
and then opened it in the window. However, when i click on 'next' or 'parse' , i
get the below error.

TITLE: SQL Server Import and Export Wizard

------------------------------
The statement could not be parsed.

------------------------------
ADDITIONAL INFORMATION:
Deferred
prepare could not be completed.
Query timeout expired (Microsoft SQL Native Client)


The query is pretty big, but it executes successfully in the Management Studion Query Explorer window. I had no problem creating a package using DTS with the same query in Sql 2000. I also tried to migrate the package already existing in Sql 2000, but even though i can migrate it successfully , the package does not execute in Sql 2005. Also i tried other queries which are as big as this one, again the query source window during import/export does not seem to accept large queries??? I depend heavily on large queries for my packages, which i run daily. I have not had any issues with this is sql 2000. Can someone help me with this???

Thanks in advance.

Ram

View 6 Replies


ADVERTISEMENT

Linked Servers OPENQUERY Error Deferred Prepare Could Not Be Completed

May 13, 2008

I am running the following query trying to return server properties across a linked server. I want to store the results in a table on the server where I an running the query.


DECLARE @BuildClrVersionx nvarchar(128)

SET @BuildClrVersionx =

(SELECT *

FROM OPENQUERY(LKMSSQLXYZ01, 'CONVERT(nvarchar(128),SERVERPROPERTY("BuildClrVersion")'))

I am getting the following errors:

OLE DB provider "SQLNCLI" for linked server "LKMSSQLADM01" returned message "Deferred prepare could not be completed.".

Msg 8180, Level 16, State 1, Line 1

Statement(s) could not be prepared.

Msg 156, Level 15, State 1, Line 1

Incorrect syntax near the keyword 'CONVERT'.


If you have any ideas how I can run this query across a linked server I would appreciate it.


Thanks,
Scott

View 8 Replies View Related

The Statement Could Not Be Parsed. Deferred Prepare Could Not Be Completed.

Feb 13, 2008

I am trying to use the export wizard to export to a MS Access file, using the provide source query option. I get the error below when pasting the query in. The query does run successfully in SSMS, it is a long running query. About 8 minutes to complete.




TITLE: SQL Server Import and Export Wizard
------------------------------
The statement could not be parsed.
------------------------------
ADDITIONAL INFORMATION:
Deferred prepare could not be completed.
Query timeout expired (Microsoft SQL Native Client)

Any ideas?

michael.bliesner@premera.com

View 1 Replies View Related

OLE/DB Provider Returned Message: Deferred Prepare Could Not Be Completed

Apr 11, 2006

I have 2 SQL servers. And in the first one I have added the second SQL as a Link Server. When I run an SQL statement on the linked server I get the following message.
Server: Msg 7202, Level 11, State 1, Line 1Could not find server 'PROD' in sysservers. Execute sp_addlinkedserver to add the server to sysservers.[OLE/DB provider returned message: Deferred prepare could not be completed.]
The SQL statement that I am runnins is
Select * from openquery(PROD,'Select * from PROD.GMS.dbo.qryDispCL')
But when I run only the SQL statement "Select * from PROD.GMS.dbo.qryDispCL" it works perfect. But I need to have the first statement running.
Please help. Your valuable feedback is greatly appriciated.
 

View 1 Replies View Related

SQL ServerDestination Error - Unable To Prepare The SSIS Bulk Insert For Data Insertion.

Jan 15, 2008



Having searched the forum, this one clearly has form... However beyond assisting those who have fallen at the first hurdle (i.e. forgetting/not knowing that they cannot execute the package remotely to the instance of SQL Server into which they are inserting), the issues raised by others have not been addressed. Thus I am bringing nothing new to the table here - just providing an executive summary of problems which others have run into, written about, but not received answers for.

First the complete error:
Description: Unable to prepare the SSIS bulk insert for data insertion. End Error Error: 2008-01-15 04:55:27.58 Code: 0xC004701A Source: <xxx> DTS.Pipeline Description: component "<xxx> failed the pre-execute phase and returned error code 0xC0202071. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:53:34 AM Finished: 5:00:00 AM Elapsed: 385.384 seconds. The package execution failed. The step failed.

Important points


It mostly works - It produces no error more than 9 times out of 10.

It fails on random dataflows - My package has several dataflows, (mostly) executing concurrently. Where the error occurs it does not do so on the same dataflow each time: on one run it'll fail on dataflow A whilst B,C,D and E succeed, then A-E will all succeed (and continue doing so for the next ten runs thereafter), and then the error recurs for dataflow D, with A,B,C and E all succeeding.
Hope someone has something interesting to say,


Tamim.

View 10 Replies View Related

Execute 2000 DTS Pacakge SSIS In SQL 2005

May 8, 2008

I have a legncy DTS package when upgrading to SQL 2005, I used "SQL Business Intelligence Development Studio" to create a project, the control flow is "Execute 2000 DTS Package", by right click "Execute Task" of the control flow, the color changed from yellow to red, the message said "package Execution completed". When I try to schedule this package in SQL Server Agent, the job failed. When I run dtexec, got following error message.


C:>dtexec /file "C:Documents and SettingslyangMy DocumentsVisual Studio 200
5ProjectsTraingDTSTraingDTSDTSTraining.dtsx"

Microsoft (R) SQL Server Execute Package Utility
Version 9.00.1399.06 for 32-bit
Source: Execute DTS 2000 Package Task
Execute DTS 2000 Package Task is initiated: 0% complete

End Progress

Error: 2008-05-08 09:13:35.74
Code: 0x00000000
Source: Execute DTS 2000 Package Task
Description: System.Runtime.InteropServices.COMException (0x80040427): Execut
ion was canceled by user.
at DTS.PackageClass.Execute()
at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteT
hread()
End Error

Progress: 2008-05-08 09:13:35.74
Source: Execute DTS 2000 Package Task
Execute DTS 2000 Package Task is completed: 100% complete
End Progress
Warning: 2008-05-08 09:13:35.74
Code: 0x80019002
Source: DTSTraining
Description: The Execution method succeeded, but the number of errors raised
(1) reached the maximum allowed (1); resulting in failure. This occurs when the
number of errors reaches the number specified in MaximumErrorCount. Change the M
aximumErrorCount or fix the errors.
End Warning

DTExec: The package execution returned DTSER_FAILURE (1).


Can anyone tell me what does the error message mean and how to solve them?


Thanks very much in advance!


Lisa

View 3 Replies View Related

DTS Pacakge- Error

Jul 27, 2000

Hi,
Every one
When I open Dts Package of my Server A , from Server B Machine -(Enterprise Manager) it is giving me error
Microsoft Data Transformation Services. (DTS PACKAGE)
ERROR - The Parameter is incorrect.

but at the same time I can create new package from Server B Machine (Enterprise Manager), & after that i am able to open that new created package but still not other packages.
I don't know what is going on
If any one has any clue or suggestion please suggets this
Thanks.

Nirmal

View 2 Replies View Related

SSIS Pacakge Success/failure Based On Stored Procedure

Mar 11, 2008

I have an SSIS package that executes a stored procedure. In that stored procedure is a try/catch block. If the try isn't successful, it goes to the catch block which does a rollback. So when I execute the SSIS package, it tells me that the stored procedure was ran successfully because there essentianlly were no errors and everything ran fine, but in reality, everytime it goes into the catch block and does a rollback, I want the SSIS package to fail as well. How would I send back a failure to the SSIS package from the stored procedure?

View 13 Replies View Related

How To Create Global Variable For Connection Manager In SSIS PAcakge

Jul 6, 2006

Hi,



now i am currently using SSIS Package using BUI, The Source and Destination File we Given Manullay Connect the Server name ,And Table . Instead of given Manual . How to create Global Variable Connection Manager.

Suppose Today i am Working Developement Server. Latter i will be changed Production Server Database. At That time we have to Going to Modify all the Connection .Instead of This How to Create the Connection Manager Gloabe Variable . and How to Use .Please Any one give Sample For Connection Manager variable for Different Server.





Thanks & Regards,

Jeyakumar.M

chennai

View 16 Replies View Related

How To Insert One Row With Multiple Time Depding On Source Column Value In SSIS Pacakge

Jun 5, 2006

Hi !

I need help for SSIS Pacakge. using condtional Split How to insert One records with Multiple time depending on Source column value .Is there possible to wrtie the condition in Conditional split.



For Exmaple :

Source Table Name : tbl_source

following Column Name: col_Name1,Col_Name2,Col_Name3, col_Id,Col_Descrip

table contain only one records:GRD1,SRD1,FRD1,100,Product



I want Insert the Destiantion table the Follwing Condition. using Conditional Split.

1)Cond1 (!(ISNULL(GRD1))

2)Cond2 !(ISNULL(SRD1))

3)Cond3 !(ISNULL(FRD1))

I need the Following output



Destination Table Name : tbl _Dest(for One record in source table i need following records in destination)

Coulmn Name , Column Value , ID

Row 1 GRD GRD1 100

Row 2 SRD SRD1 100

Row 3 FRD FRD1 100



How to achieve this result. can u anyone help me.using Conditional split iam getting only first condition Result.



Thanks & regards

M.Jeyakumar



View 12 Replies View Related

Unable To Prepare The SSIS Bulk Insert For Data Insertion

Oct 24, 2007



Hi,

I am using SQL Server Destinations in my data flow tasks. I'm running this package in the server until i encountered this error:

OnError,,,LOAD AND UPDATE Dimension Tables,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion.
OnError,,,Load Dimensions,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1071636367,0x,Unable to prepare the SSIS bulk insert for data insertion.
OnError,,,Discount Reason, ISIS Condition, ISIS Defect, ISIS Repair, ISIS Section, ISIS Symptom, Job Status, Parts, Purchase SubOrder Type, Service Contract, Service Reason, Service Type, TechServiceGrp, WarrantyType, Branch, Wastage Reason,,,10/24/2007 1:22:23 PM,10/24/2007 1:22:23 PM,-1073450974,0x,SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Dim_T_ISISDefect" (56280) failed with error code 0xC0202071. 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. There may be error messages posted before this with more information about the failure.


What could be the reason for this? I don't usually have an error.

cherriesh

View 6 Replies View Related

SQL:Stmt Completed V SQL:Batch Completed

Apr 29, 2008

I'm troubleshooting a performance issue , Looking at Profiler - for the given statement, I'm getting the following figures , why would there be such a disparity between the figures. ? How can I go about finding out why there is such difference?


SQL:Stmt Completed:CPU = 31, Reads = 129 , Duration = 32
SQL:Batch Completed: CPU = 2531, Reads = 6087 , Duration = 2593



Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com

View 2 Replies View Related

Error Explaination SqlTransaction Has Completed

Apr 4, 2008

can anyone tell me what is the origin of this error "This SqlTransaction has completed; it is no longer usable".

View 2 Replies View Related

Completed Successfully, But Not Sending And No Error.

Sep 6, 2006

hi, i have a message queue system using sql 2005 service broker.
the code and setup is the same on both dev and live database. but
soon after i restored a live backup to dev. the queue stopped
working on dev, live is ok thou. after some trouble shooting, i
found that the server is not sending the message at all, but it says
"Command(s) completed successfully" without any error messages.



setup:

-----------------------

create message type TestQueryMessage validation = none

create contract TestQueryContract (TestQueryMessage sent by initiator)

create queue TestSenderQueue

create service TestSenderService on queue TestSenderQueue

create queue TestQueueReceiver

create service TestServiceReceiver on queue TestQueueReceiver (TestQueryContract)



send message:

-------------------------

declare @conversationhandle uniqueidentifier;

begin dialog @conversationhandle

from service [TestSenderService]

to service 'TestServiceReceiver'

on contract [TestQueryContract]

with encryption = off;

send on conversation @conversationhandle

message type [TestQueryMessage] ('blah blah blah');



result:

----------------------------------

Command(s) completed successfully.



but when i do "select * from TestQueueReceiver", there's nothing. and i sure nothing else had picked up the messages.



please advise. thanks a lot.

View 1 Replies View Related

T-SQL (SS2K8) :: Query Completed With Errors But No Error Message

May 11, 2012

I execute a script that someone else wrote and I get Query Completed with Errors but there is not an error message.If I highlight and execute parts of the script, it completes successfully.

View 9 Replies View Related

SQL 2012 :: Error 1237 - The Operating Could Not Be Completed - Retry Should Be Performed

Oct 19, 2015

One of our dba's runs a process every night to update the database with a daily data file received from an external source. He was testing on a new SQL Server 2012/Windows 2012 R2 cluster that has an Availability Group. While trying to process INSERTs, the process failed with a error: "could not allocate a new page for database X because of insufficient disk space in filegroup PRIMARY."

The log also contains "Operating System Error 1237 (The operating could not be completed. A retry should be performed) encountered".

However, there is 300 GB free on the data drive (E:) where the .mdf file is located. The SQL Server service account has the "Perform Volume Maintenance Tasks" permission (instant file initialization).

All of the disks are VMware 5.1 or 5.5 VM's and the E: disk has thick/eager zero provisioning.

View 3 Replies View Related

Getting The Operation Could Not Be Completed. (WinMgmt) Error Suddenly In SSMS For RS Connection

Feb 7, 2008

suddenly I'm getting a connect to server error dialogue box that says...

Cannot connect to serverinstance name
Additional information
The operation could not be completed. (WinMgmt)


...when trying to connect to RS2005 Server in Management Studio. I can reach Reporting Manager thru IE and run my reports.

Is it possible that my setting IIS to basic authentication (and turning off Windows Integrated) might be preventing me from connecting in MS, perhaps because MS has to go thru the RS service and doesnt know what basic auth is?

I'm temporarily unable to set IIS back to Windows Auth cuz the server is being used by users to test reports.

View 3 Replies View Related

Deferred Name Resolution

Dec 20, 1999

In 7.0, an application development change has been made to defer name checking in
stored procedures until exection time. This allows a clean store of the proc in the system catalog
regardless of objects existing or not. At execution time, the proc is compiled, and object resolution is
done. Problem - the procedure fails if object names, column names, etc are wrong or don't exist.
So, during nightly cycle's the procedures bomb out.

Is there anyway to disable this 'deferred name resolution', or am I at the mercy of the developers?
Can I make the resolution immediate?

Thanks!

Dean

View 1 Replies View Related

SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 22, 2007

I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.

for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.

I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.

if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

and

Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.

Please help me it's very urgent.

View 3 Replies View Related

DBCC Execution Completed. If DBCC Printed Error Messages, Contact Your System Adminis

Mar 26, 2007

Hi All,

I am playing with DBCC command to check the contsrainst on a perticular table (DBCC CHECKCONSTRAINTS ('myTable') WITH ALL_CONSTRAINTS), it always gives the following result:

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

nothing more than that, anyone can help please?

Cheers,
Riaz

View 3 Replies View Related

Deferred Name Resolution & SP Compliation

Oct 4, 2001

I would like to be able to turn off the deferred name resolution feature in SQL2000 when compiling stored procedures. Is this possible?

Sidney

View 1 Replies View Related

Deploy Pacakge - What Files Have To Go?

Aug 10, 2007

I'm getting ready to deploy my SSIS packages to a real server (woohoo) after testing on my local SQL box. What files have to be deployed to the SQL server? I'm creating a folder for each package (easier for these guys to maintain when my contract is up). Does only the .dtsx and .dtsConfig file go or is there any other files that have to be copied over to the SQL server?

View 6 Replies View Related

Can We Run A Pacakge Outside IDE If I Have Only Client Tools Installed

Jun 29, 2007

Can i run a package outside of IDE if we donot have Integration Services installed locally.

View 4 Replies View Related

Deferred Constraints Sql Server 2005

Sep 12, 2007

Is there any way to defer constriants in sql server 2005? I have found some sites that say use the keyword deferred but that always give me an "Incorrect syntax near 'deferred' "error.

View 1 Replies View Related

Returning Completed When Status = 1 And Not Completed When Status = 0

May 3, 2005

Returning "completed" when status = 1 and "not completed when status = 0

View 3 Replies View Related

Why Does My Pacakge Validate (and Run) Ok When Running Manually But Not When I Run It Through SQL Agent

May 19, 2006

Hi,

I have a set of packages, which I need to run through Sql Agent to automate it. This package runs Ok when I use DtexecUI but when I run it through SQl Agent with the same options it fails.

THe error it fails on is the old 0xC0202009, acquire connection failed error. The component on which it fails is an access database with the location and query fed by variables that pick up this from a table in a sql server database. THe access database is on a shared drive on a different machine

Does anyone have any idea as to why this should be happening



Thanks



Nathan

View 3 Replies View Related

SQL Server 2008 :: How Temp Tables Associated To Deferred Recompilation

May 25, 2015

1) "Deferred compile" recompile event occurs because of deferred name resolution. In other words, an object referred to in the statement does not exist at compile time. Later, when the object does exist, it requires a recompile of the statement so that it can create an optimal execution plan. One example of when a deferred compile will occur is if a temporary table is used in a batch and does not exist when the first statements in the batch are compiled.

View 2 Replies View Related

Performance Counter Prepare Values

Feb 11, 2015

Which values are best prepared value for given below memory objects

Memory
Parameter

Total memory=
SQL Cache Memory=
Lock Memory=
Optimizer Memory=
Connection Memory=
Granted WorkSpace Memory=
Memory Grants Pending=
Memory Grants Success=

Cache Details:

Cache Hit Ratio=
Cache Used/Min=
Cache Count=
Cache Pages=

Scheduled Jobs:

Job Status=
Run date & time=
Job Time=
Retries Attempted=

How the above performance counters prepared values?

View 1 Replies View Related

Transact SQL :: Save Value Of PREPARE Into A Variable

Jul 16, 2015

I have below code:

WHILE i < total_rows DO
SET @param_employee_number = (SELECT employee_number FROM earned_leaves LIMIT i,1);

PREPARE query_statement FROM 'CALL sp_populate_leave_summary(?)';
EXECUTE query_statement USING @param_employee_number;

-- UPDATE earned_leaves SET earned_leave = returned_by_EXECUTE
SET i = i + 1;
END WHILE;

I want to save the value returned by the EXECUTE into a variable in order to use it in the next UPDATE statement.

View 4 Replies View Related

Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

May 31, 2008

Hi All

I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.

If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.

I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.

set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN


It's got me stumped, so any ideas gratefully received.Thx

View 1 Replies View Related

Slow Query With Java Using Prepare Statement

Jul 12, 2007



We are using sql server 2005 with java and the last version of driver JDBC, some querys show bad performance when you send by application but if you use sql query analyzer the performance is excellent. We have take a profiler trace and saw that Java call SP_PREPEXEC when it makes a call of preparestatement. We taken the sentence from profiler (with SP_PREPEXEC) and saw the same problem, the query plan is bad, but if we avoid use the prepare statement the query works fine and the performance problem is overcome. Since we have the application with java and use every time the preparedstatement sentence from java, it is very expensive for us , change the code. Do you have any solution for these problem?

View 1 Replies View Related

How To Force Deferred Update To Create Two Rows In Change Data Capture

Mar 23, 2015

I have located a bug in the functions cdc.fn_cdc_get_net_changes_<capture_instance> generated when you enable cdc on a table. This bug can be triggered if 2 rows are created in the _CT table having the same values for the __$start_lsn, __$seqval and the table's key column(s). From research on the internet I have found such rows can be created by a "deferred update": a single update statement in which a column that is part of a unique constraint is updated.

In order to report the bug with Microsoft I need to create a complete series of steps-to-reproduce. But even though the situation happens several times a day in our production environment, I have not yet been able to reproduce it in my test environment.I need a single update statement (plus maybe some steps in advance) that make that the log reader inserts 2 rows into the _CT table, one with __$operation = 1 (delete) and another with __$operation = 2 (insert) as opposed to the single row with __$operation = 4 that it inserts for a normal update. Below is the script I have so far to create a fresh database, enable cdc, create a test table, insert some data and update this data.

I would have liked the last update statement to be handled as a "deferred update". However in all of my tests the log reader just simply inserts a single row into the cdc.dbo_NETTEST_CT table.how to reproduce the situation where I get the 2 rows with __$operation 1 and 2 from a single update statement instead of the single row with __$operation = 4.

CREATE DATABASE [cdcnet]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'cdcnet', FILENAME = N'S:SQLDATAcdcnet.mdf' , SIZE = 4096KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'cdcnet_log', FILENAME = N'T:SQLLOGcdcnet_log.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)

[code]....

View 4 Replies View Related

Provider 'MSOLAP.2' ICommandPrepare::Prepare Returned 0x80004005

Jun 9, 2008

Hi,I have a stored procedure that makes an MDX query for me, on SQL 2000, service pack 3 it works fine, but on service pack 4 it stops working with the error:Server: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'MSOLAP.2' reported an error. The provider did not give any information about the error.OLE DB error trace [OLE/DB Provider 'MSOLAP.2' ICommandPrepare::Prepare returned 0x80004005:  The provider did not give any information about the error.].and i'f i call @@Error I get the error number 7399.Any ideas as to what might be going on? The stored procedure which worked prior to service pack 4 is as follows:CREATE PROCEDURE MDXTester
(
@CustId Varchar(4)
)
AS
IF NOT EXISTS(SELECT * FROM master..sysservers where srvname = 'CZVCube')
BEGIN
EXEC sp_addlinkedserver 'CZVCube',
'',
'MSOLAP.2',
'10.0.41.128',
'CZV'
END

DECLARE @OPENQUERY nvarchar(4000), @MDX nvarchar(4000), @LinkedServer nvarchar(4000)
SET @LinkedServer = 'CZVCube'
SET @OPENQUERY = 'SELECT * FROM OPENQUERY('+ @LinkedServer + ','''
SET @MDX = 'WITH
MEMBER [Measures].[YTD NV] AS ''''Sum(YTD(),[Net Value])''''
MEMBER [Measures].[YTD Prev] AS ''''Sum(YTD(),([Measures].[Net value], ParallelPeriod([Fiscal year], 1, [FiscalYear].CurrentMember)))''''
MEMBER [Measures].[YTD Change] AS ''''[Measures].[YTD NV] - [Measures].[YTD Prev]'''', FORMAT_STRING = ''''###,###.00''''
MEMBER [Measures].[YTD Change Perc] AS ''''[Measures].[YTD Change] / [Measures].[YTD Prev]'''', FORMAT_STRING = ''''###,##0.0%''''
MEMBER [Measures].[Monthly Change] AS ''''[Net Value] - ([Net Value],FiscalYear.PrevMember)'''', FORMAT_STRING = ''''###,###.00''''
MEMBER [Measures].[Monthly Change Perc] AS ''''([Monthly Change] / ([Net Value],FiscalYear.PrevMember))'''', FORMAT_STRING = ''''###,##0.0%''''
MEMBER [Measures].[Annual Change] AS ''''[Net Value] - ([Measures].[Net value], ParallelPeriod([Fiscal year], 1, [FiscalYear].CurrentMember))'''', FORMAT_STRING = ''''###,###.00''''
MEMBER [Measures].[Annual Change Perc] AS ''''([Annual Change] / ([Measures].[Net value], ParallelPeriod([Fiscal year], 1, [FiscalYear].CurrentMember)))'''', FORMAT_STRING = ''''###,##0.0%''''
MEMBER [Measures].[12 mth mov av] AS ''''Avg([FiscalYear].CurrentMember.Lag(11):[FiscalYear].CurrentMember, [Measures].[Net Value])''''
SELECT {[Measures].[Net Value] , [Measures].[YTD NV], [Measures].[YTD Prev],[Measures].[Monthly Change], [Measures].[Monthly Change Perc], [Measures].[Annual Change], [Measures].[Annual Change Perc], [Measures].[YTD Change], [Measures].[YTD Change Per
c], [Measures].[12 mth mov av]} ON COLUMNS,
LastPeriods(12, [FiscalYear].[Apr 08]) ON ROWS
FROM CZV
where [C_CRMID].[' + @CustId + ']'
EXEC(@OPENQUERY + @MDX + ''')')

  

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved