Logical Error: Using Expressions && Package Variables

Jun 24, 2007

Hi,



I have encountered some strange output when testing an SSIS package I've been working on.



Please see this thread for background information: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1590716&SiteID=1. The previous thread was resolved and i have used the tips listed here to create a package with Data Flow Tasks that use expressions to create 'dynamic' queries.



The Data Flow tasks use two package-scope variables to determine the date range that they're operating on - this allows me to script the from / to dates (usually 'last week' range) or, in event of error, 'back date' the job easily without having to update each individual components.



However, something weird is happening - when I have two data flow tasks (DFT) in the same Sequence Container (tasks that are not 'connected' or configured to operate in a flow) only one DFT is picking up the package variable & returning the rows. The other DFT is not returning any rows & seems to be using the default value of the variables.



I have tested this by simply enabling DFT A and disabling DFT B - debugging shows only one DFT executes correctly. The same point is illustrated when I disable DFT A and enable DFT B. However, if I configure DFT A to run after DFT B then both pick up the correct variable values and return the correct row counts!!



I want Data Flow Tasks that pull data from the same remote source to be the same sequence containers so when an error occurs I can get container level transaction support.



Note:

I have thoroughly checked the 'evaluated' expressions in IDE and in Management Studio - this is an SSIS specific quirk (or me!).



Questions:

What's happening here, have I made a conceptual error of how this should work?
On the same variable topic: is there a way to set values for package level variables at execute time .e.g via command line execution / dtsexecui??

Let me know if you need any extra explaination / diagrams etc to understand this, the other (closed) thread I have listed above should provide more context for my problem



Thanks for your support!!





View 2 Replies


ADVERTISEMENT

Valid Expressions Are Constants, Constant Expressions, And (in Some Contexts) Variables. Column Names Are Not Permitted.

Dec 11, 2007

I want to have this query insert a bunch of XML but i get this error...


Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 117

The name "ExpenseRptID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

Msg 128, Level 15, State 1, Procedure InsertTimeCard, Line 151

The name "DateWorked" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

What am i doing wrong...Can anyone help me out!! Thanks!!

p.s I know this query looks crazy...


Code Block

IF EXISTS (SELECT NAME FROM sysobjects WHERE NAME = 'InsertTimeCard' AND type = 'P' AND uid=(Select uid from sysusers where name=current_user))
BEGIN
DROP PROCEDURE InsertTimeCard
END
go
/*********************************************************************************************************
** PROC NAME : InsertTimeCardHoursWorked
**
** AUTHOR : Demetrius Powers
**
** TODO/ISSUES
** ------------------------------------------------------------------------------------
**
**
** MODIFICATIONS
** ------------------------------------------------------------------------------------
** Name Date Comment
** ------------------------------------------------------------------------------------
** Powers 12/11/2007 -Initial Creation
*********************************************************************************************************/
CREATE PROCEDURE InsertTimeCard
@DateCreated DateTime,
@EmployeeID int,
@DateEntered DateTime,
@SerializedXML text,
@Result int output
as
declare @NewTimeCardID int
select @NewTimeCardID = max(TimeCardID) from OPS_TimeCards
-- proc settings
SET NOCOUNT ON

-- local variables
DECLARE @intDoc int
DECLARE @bolOpen bit
SET @bolOpen = 0
--Prepare the XML document to be loaded
EXEC sp_xml_preparedocument @intDoc OUTPUT, @SerializedXML
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler
--The document was prepared so set the boolean indicator so we know to close it if an error occurs.
SET @bolOpen = 1


--Create temp variable to store values inthe XML document
DECLARE @tempXMLTimeCardExpense TABLE
(
TimeCardExpenseID int not null identity(1,1),
TimeCardID int,
ExpenseRptID int,
ExpenseDate datetime,
ProjectID int,
ExpenseDescription nvarchar(510),
ExpenseAmount money,
ExpenseCodeID int,
AttachedRct bit,
SubmittoExpRep bit
)
DECLARE @tempXMLTimeCardWorked TABLE
(
TimeCardDetailID int not null identity(1,1),
TimeCardID int,
DateWorked DateTime,
ProjectID int,
WorkDescription nvarchar(510),
BillableHours float,
BillingRate money,
WorkCodeID int,
Location nvarchar(50)
)
-- begin trans
BEGIN TRANSACTION
insert OPS_TimeCards(NewTimeCardID, DateCreated, EmployeeID, DateEntered, Paid)
values (@NewTimeCardID, @DateCreated, @EmployeeID, @DateEntered, 0)
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler


--Now use @intDoc with XPATH style queries on the XML
INSERT @tempXMLTimeCardExpense (TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
SELECT @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
FROM OPENXML(@intDoc, '/ArrayOfTimeCardExpense/TimeCardExpense', 2)
WITH ( ExpenseRptID int 'ExpenseRptID',
ExpenseDate datetime 'ExpenseDate',
ProjectID int 'ProjectID',
ExpenseDescription nvarchar(510) 'ExpenseDescription',
ExpenseAmount money 'ExpenseAmount',
ExpenseCodeID int 'ExpenseCodeID',
AttachedRct bit 'AttachedRct',
SubmittoExpRep bit 'SubmittoExpRep')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardExpenses(TimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
Values(@NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep)
select @NewTimeCardID, ExpenseRptID, ExpenseDate, ProjectID, ExpenseDescription, ExpenseAmount, ExpenseCodeID, AttachedRct, SubmittoExpRep
from @tempXMLTimeCardExpense
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- For time worked...
INSERT @tempXMLTimeCardWorked(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
SELECT @NewTimeCardID, DateWorked, ProjectID, WorkDescription, BilliableHours, BillingRate, WorkCodeID, Location
FROM OPENXML(@intDoc, '/ArrayOfTimeCardWorked/TimeCardWorked', 2)
WITH ( DateWorked DateTime 'DateWorked',
ProjectID datetime 'ProjectID',
WorkDescription nvarchar(max) 'WorkDescription',
BilliableHours float 'BilliableHours',
BillingRate money 'BillingRate',
WorkCodeID int 'WorkCodeID',
Location nvarchar(50)'Location')
-- check for error
IF @@ERROR <> 0
GOTO ErrorHandler

-- remove XML doc from memory
EXEC sp_xml_removedocument @intDoc
SET @bolOpen = 0


INSERT OPS_TimeCardHours(TimeCardID, DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
Values(@NewTimeCardID,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location)
select @NewTimeCardID ,DateWorked, ProjectID, WorkDescription, BillableHours, BillingRate, WorkCodeID, Location
from @tempXMLTimeCardWorked


-- commit transaction, and exit
COMMIT TRANSACTION
set @Result = @NewTimeCardID
RETURN 0

-- Error Handler
ErrorHandler:
-- see if transaction is open
IF @@TRANCOUNT > 0
BEGIN
-- rollback tran
ROLLBACK TRANSACTION
END
-- set failure values
SET @Result = -1
RETURN -1

go

View 1 Replies View Related

Error : Only Constants, Constant Expressions, Or Variables Allowed Here.

Jun 9, 2004

hi all,
when I try to do the following insert for the table test

create table test (outputs character(10), chk integer)

insert into test values('a',((select count(*) from test where outputs='a')+1))

I am getting the error
The name 'outputs' is illegal in this context. Only constants, constant expressions, or variables allowed here. Column names are illegal.

when i tried the same in DB2 it's working fine. is there anyerror in my syntax or this kind of function not allowed in SQL Server.

regards
Melb

View 1 Replies View Related

Converting Access Qrys With Logical Expressions

Jul 20, 2005

I'm upsizing an Access database. Got the data converted, working onthe front end, converting queries to views, but having troubleconverting queries that use logical expressions like the following:SELECT OrderId,Sum((BackOrderQtyAvailable>0)*-1) AS ReadyBackOrderItemsFROM OrderDetailsINNER JOIN ItemsON (OrderDetails.ClientId = Items.ClientId)AND (OrderDetails.ItemId = Items.ItemId)WHERE (NOT (SitesCustomerTypeId = 2AND ExpressBackorder =TrueAND OrderUrgency = 1 ))GROUP BY OrderId;Can someone suggest a strategy to achieve the same result, ieOrderId,ReadBackOrderItems that I can use in further joins?Thanks in anticipationTerry Bell

View 5 Replies View Related

Sybase OLE DB And Variables Expressions

Feb 17, 2006

I just tried to read data from a sybase db by using a simple "select * from " + @[User::Tablename] defined as expression in a variable, using this variable as command in a Sybase OLE DB source. EvaluateasExpression is set to true, connection usually works fine.

When I try the preview now in the ole db source I receive an error from the

[DataDirect ADO Sybase Provider] "Incorrect syntax near the keyword WHERE"

My Variable does not inlcude any where clause, so does someone know, if the Sybase OLE DB provider add keywords to a statement or where does the WHERE come from??



Thanks in advance

nobsay

View 1 Replies View Related

Execute DTS 2000 Package Task Editor (Inner Variables Vs Outer Variables)

Sep 4, 2006

Hi,

I am not comfortable with DTS 2000 but I need to execute a encapsulated DTS 2000 package from a SSIS package. The real problem is when I need to pass SSIS variables to DTS 2000 package. The DTS 2000 package have 3 global variables that I can identify on " Execute DTS 2000 Package Task Editor - Inner Variables ". I believe the SSIS variables must be mapped on " Execute DTS 2000 Package Task Editor - OuterVariables ". How can I associate the SSIS variables(OuterVariables ) to "Inner Variables"? How can I do it? Much Thanks.

João





View 8 Replies View Related

How To Design A Package With Variables So That I Can Run It By Dos Command Assigning Values To Variables?

Jan 24, 2006

Hi,

I would like to design a SSIS package, which have couple of variables. It loads a xls file specified in a variable [varExcelFileFullPath] .

I will run it by commands: exec xp_cmdshell 'dtexec /SQL ....' (pls see an example below).

It seems it does not get the values passed in for those variables. I deployed the package to a sql server.

are there any grammar errors here? I copied it from dtexecui. It worked inside Dtexecui not in dos command.

exec xp_cmdshell 'dtexec /SQL "LoadExcelDB" /SERVER test /USER *** /PASSWORD ****

/MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW

/LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.SuperBowl"

/Set Package.Variables[User::varExcelFileName].Properties[Value];"TestAdHocLayer"

/Set Package.Variables[User::varExcelWorkbookName].Value;"Sheet1$"

/Set Package.Variables[User::varExcelFileFullPath].Value;"D: estshareTestAdHocLayer.xls"

/Set Package.Variables[User::varDestinationTableName].Value;"FeaturesTmp"

/Set Package.Variables[User::varPreSQLAction].Value;"delete from FeaturesTmp"

'



thanks,



Guangming

View 2 Replies View Related

Getting The List Of Expressions From A Package

Jul 10, 2007

Does anyone have any ideas on quickly getting a list of all expressions used in a package? For the BIDSHelper add-in (http://www.codeplex.com/bidshelper) we need to get a list of all the expressions used in the package and update the list whenever an expression is added through the IDE. Currently, we are iterating through the package, and checking every property of every task to see if it has an expression. On big packages, this is slow, as you might imagine.



Any suggestions would be appreciated. Maybe one of our MVPs could flag this for Microsoft follow-up, to see if they have any suggestions.

View 4 Replies View Related

Parent Child Package With Expressions

Mar 6, 2007

Hi there,

sorry if the message seems a bit garbled i cannot see the textbox properly with ie7/ff


anyways. the situation.


childpackage contains a loop-container. in there i use an ole-db-source with a variable
based on an expression. ie. "select * from foo where bar=" + len(@[bar]) == 0 ? "initial" : @[bar] + " and etc=1"
where bar is the variable that is set by the loop.


this works great.


however i need to call this package several times, only the expression is a tad different.


so i need a scripttask that sets the expression correctly, then i call the childpackage
and map the current-expression to the expression in childpackage.


how do i do that? or am i doing it wrong?


my script-task looks something like:


dts.Variable("theVar").Expression = " ""select * from foo where bar="" + len(@[bar]) == 0 ? ""initial"" : @[bar] + "" and etc=1"" "


in the childpackage i have a package-conf that maps thevar to thequery with target-object expression.

View 1 Replies View Related

Problem Setting Package Variables In SSIS Package

Sep 8, 2006

Hi,

I am making use of the DtUtil tool to deploy my package to SQL Server.
Following is my configuration:
32-bit machine and 32-bit named instance of Yukon.

I have some package variables which need to be set in the code.

Previously I did it as follows:

Set the package variables in the code. For example:

pkgFile.Variables["User::DestinationServerName"].Value = <myvalue>

Deploy the package as follows:

applnObj.SaveToSqlServer(pkgFile, null,
destinationServer, null, null);

Here the package was successfully deployed and when i open those packages using BIDS, I am able to see that the variables are set to the values as doen in teh code.


Because of oen problem I am not using SaveToSQLServer method. So I switched to DTUtil tool.
Now I am doing it this way:

Set the package variables as before.
Deploy the package to SQL Server using DTUtil tool.

Now is the problem:
The package is successfully deployed. But the variables are not set to the value that I have specified in the code.

I also tried DTexec utility to set the package variable. Even that does n't work.
Can anyone help me out? Is there any alternate method to set package variables?

Thanks,
Sandhya

View 8 Replies View Related

Parent Package Variables And SQL Package Store

Aug 23, 2007

Hello All,
I have a Master Package which calls a group of other packages out on the SSIS Package Store using parent / child and a number of variables. These seem to work when passing various audit information (audit key, record counts, etc) but when I try to pass a variable for the connection string and assign it via an expression to the connection manager, I get the Master Package writing to the correct database and the children package writing to their "default" database which is supplied as the default value in the variables which should be populated by the parent task.

i.e., I end up with my master package audit information in database a and child package audit and transactions in database b, even though the packages associated with these transactions are supposed to be reading the connection string from a parent variable. Any clues or suggestions?

Edit: It is still passing along the correct parent audit information and record counts, it's just not connecting to the correct database by the variables holding the connect string

Thanks for your time.

View 13 Replies View Related

Insert Trigger Logical Error

Apr 25, 2002

The many that I have spoken to all are clueless on this one. Thanks in advance for the right solution!

The insert trigger I created works fine (well, nearly fine), except that AFTER the first insert operation (ie second, third etc), it always produces the correct results BUT FOR THE PREVIOUS INSERTED ROW. It is as if there is a latency of one row in the temp table INSERTED.

I would greatly appreciate a 'why', and more importantly, a 'how to fix it' for this problem.

If you need to look at the code, a NOTEPAD file is attached.

Much appreciated

--start trigger--
create trigger UpdateAffiliateEarnings
on Orders
for insert, update
as

--declare variables
declare @ProductType varchar(15),
@AffID int,
@Earnings money,
@CurrentEarnings money,
@AffTotalEarnings money,
@AffTotalPayments money,
@AffOutstandingBalance money

--check existence of affiliateid, and for product type
select @AffID=AffID, @ProductType=Source
from Orders
where AffID IS NOT NULL

--get relevant information
if @AffID IS NOT NULL
begin
if @ProductType = 'FLOWER'
begin
select @Earnings=CONVERT(money,ChargedAmount*CommissionRa te)
from Orders o,FlowerOrder t,Commission c
where o.OrderID = t.OrderID
and t.CommissionID = c.CommissionID
and PaymentConfirmedYN='YES'
end
if @ProductType='PHONE'
begin
select @Earnings=CONVERT(money,ChargedAmount*CommissionRa te)
from Orders o,PhoneOrder t,Commission c
where o.OrderID = t.OrderID
and t.CommissionID = c.CommissionID
and PaymentConfirmedYN='YES'
end


--update Affiliate account
--get totals to update
select @CurrentEarnings=AffTotalEarnings, @AffTotalPayments=AffTotalPayments
from Affiliates
where AffID=@AffID

--calculate new totals for affiliate account
set @AffTotalEarnings=@CurrentEarnings+@Earnings
set @AffOutstandingBalance=@AffTotalEarnings-@AffTotalPayments

--update affiliate account to new totals
update Affiliates
set AffTotalEarnings=@AffTotalEarnings, AffOutstandingBalance=@AffOutstandingBalance
where AffID=@AffID

--roll back the transaction if there is an error
if @@ERROR !=0
rollback tran
end
-- end of trigger --

View 1 Replies View Related

Passing Variables From One DTS Package To Another DTS Package

May 22, 2002

I want to loop through a recordset of email addresses, and for each value in the recordset, I want to perform a set of task which includes creating an Excel spreadsheet and emailing it through to those email addresses.

I have 2 DTS package.

Package 1 - This contains an ActiveXScript task. The purpose of this package is to do the looping through of the recordset, and passing the email address variable to package 2.

Package 2 - Receives the email address from package 1. Package 2 contains the creating Excel spreadsheet and emailing it through to the recipients function.

I am having difficulty passing the variable from package 1 to package 2.

The code I have to date for the ActiveXScript task in package 1 is:
'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()

Dim oPackage
Dim oStep
Dim oTask
Dim oCustTask
Dim oGlobal

'Initialise package
Set oPackage = CreateObject("DTS.Package2")

Set oStep = oPackage.Steps.New
oStep.Name = "TestStep"
Set oTask = oPackage.Tasks.New ("DTSExecutePackageTask")

Set oCustTask = oTask.CustomTask
oCustTask.Name = "TestCustTask"
oStep.TaskName = oCustTask.Name
oPackage.Steps.Add oStep
oCustTask.FileName = "C:TempVeraTest1.dts"
oPackage.Tasks.Add oTask

set oGlobal = oPackage.GlobalVariables.New("CurrentAirlineCode")
oGlobal.value = "SIA"
oPackage.GlobalVariables.Add oGlobal

'Execute package
oPackage.Execute

Main = DTSTaskExecResult_Success

End Function

This does not work. Can anyone please help?

Thanks very much in advance.

View 1 Replies View Related

Attempt To Fetch Logical Page ---ERROR---URGENT!!

Aug 27, 2001

Any idea what this error is??
Thanks.

Attempt to fetch logical page (3:8360) in database 'XYZ' belongs to object '1934538212', not to object 'product'. [SQLSTATE HY000] (Error 605). The step failed.

View 1 Replies View Related

Restore Gives &#39;invalid Logical Page Number&#39; Error

Jun 24, 1999

We tried to restore an empty database from a backup and got:
'Load database encountered an invalid logical page number' error.
This then set the database as 'loading'

Anyone got any ideas?

We aren't exactly sure how big the first database was when the backup was done but if the new database isn't big enough to contain the backed up data, wouldn't we get a more meaningful error?

Janet

View 2 Replies View Related

SQL Server 2008 :: Error Renaming Logical Filename

Feb 27, 2015

I have a SQL Server 2008 R2 Cluster. I have moved a file to another drive by adding a new file on the drive, doing a shrinkfile with emptyfile. I have removed the old file and when I try to rename the new file to the old files old name, I get an error.

ALTER DATABASE mydb REMOVE FILE myfilename
Msg 5009, Level 16, State 9, Line 1
One or more files listed in the statement could not be found or could not be initialized.

ALTER DATABASE mydb
modify FILE ( NAME = temp_filename
, NEWNAME = myfilename
)
Msg 1828, Level 16, State 3, Line 4

The logical file name "myfilename" is already in use. Choose a different name.

I have completed a failover, thinking the name was being held in cache. I've also renamed to something completely different then tried to rename to the old filename.

View 9 Replies View Related

SQL Server Detected A Logical Consistency-based I/O Error

Mar 15, 2007

Did anyone familiar with these errors:

SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x1a00d2fd; actual: 0x1a02d2fd). It occurred during a read of page (1:103329) in database ID 11 at offset 0x00000032742000 in file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAServer02.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database c (Source: MSSQLServer, Error number: 824)
Get help: http://help/824

Thank you.

TJ_1



View 17 Replies View Related

Send Mail Task Error While Using Expressions

Feb 16, 2006

Hi all,

I have a problem using the send mail task with expressions. What I want to do is send a mail to all email addresses stored in a particular table.

What I already did:

I created a dataflow task that retrieves all email addresses from that particular table and writes them to a recordset destination;
After that, I created a 'for each loop container' that loops through all email addresses. Until here, the package runs without any problems, and all email addresses are returned.
Now I put a 'Send Mail' task in this 'for each loop container'. I enter a smtp connection, a from, a subject and a messagesource manually. But of course, I want the 'to' to be filled dynamically on runtime. Because of that, I added an expression on the expression tab where I map the ToLine with the variable filled during the loop. And now the problem: confirming everything and exiting the 'Send Mail' task result in a red cross appearing on the task, telling me 'No recipient is specified'. Of course, no recipient has been specified, as I want it to be filled on runtime. What I already tried, was to enter a recipient in the 'to'. Then the red cross disappears, but when running the package I get the same error.

What am I doing wrong???



Kind regards,

Jievie

View 3 Replies View Related

Variables In DTS Package

Dec 8, 2000

I know there is a global variable feature in DTS that allows you to pass data or object references between several different Activex scripts in a single package.

What I'm looking for is a method of using a Transact-SQL variable (like @whatever) that I could use across several "Execute SQL" tasks within the same DTS package.

Does anyone know if this functionality exists (directly or indirectly)?

Thanks,

Joe T.

View 6 Replies View Related

Package Variables

Feb 12, 2007

Couldn't quite find the answer I was looking for via a forum search.

I have 9 packages that are currently called by a master package - all child packages take a datetime variable from the master package which is subsequently used in the child processes.

The question I have is that if I run the master package manually from Visual Studio I can set the master package variable manually to a date of my choosing and run it, which works fine. However we will be wishing to automate the package execution at some point and want to know the best way to run the package(s) on an automated basis and have the data variable supplied to the master package.

What would be the best way to do this ?

Presently we have a variable called MasterPackage_vLoaddate which is a DateTime data type.

Any help appreciated.

View 16 Replies View Related

How To Get The Value Of The Variables When I Debugging A Package?

Oct 12, 2007



How to get the value of the variables when i debugging a package?

Thanks!

View 3 Replies View Related

Copying Variables From Another Package

Aug 28, 2006

HI, we have something like 120 packages that need to be "upgraded" to a newer version of a template. Basically, we need to add a bunch of variables of various types (12-15 variables). Is there a way to open the package in a script task and add those variables programmatically? Or is there another way to do it (e.g. modify the dtsx file)?



Thank you,

Ccote

View 3 Replies View Related

Persisting Package Variables

Apr 7, 2006

I was able to write successfully a Script Task to set the values of several package variables. But when the execution completes, the variables still contain values which were specified by default.

What I want is a method of persisting the values assigned to a variable through a script. I believe this was possible in DTS

View 1 Replies View Related

SSIS Package &&amp; Variables

Aug 15, 2006

I have a SSIS package that was migrated from DTS 2000. It had a variable that I passed to the DTS package when executing. Now when I try executing the SSIS package with the variable, I get the following error: The package path referenced an object that cannot be found: "package.variables[user::SnapShotDate].value". This occurs when an attempt is made to resolve a package path to an object that cannot be found.

From everything that I can find, I am passing the variable correctly. If I look at the package within BIDS, my variable is listed under the variable window & it is scoped for the package. Any ideas on what I might be missing here? This is my first SSIS package that contains a variable.

Let me know if you need more info.

Thanks!

John

View 3 Replies View Related

Variables / Package Execution

Jul 17, 2006



I have 10 or so packages with package scope variables. I would like to create a package that not only runs all the packages but also sets the variables within the packages being executed.

A) Whats the best way to run all the packages from one (package??)?

B) Whats the best way to set the variables in the child packages, without having to change them manually everytime I run it.

Thanks,

Mardo

View 3 Replies View Related

How To Run Package With Variables Using Dtexec?

Jan 30, 2006

Hi,



I am running my package in this way:



exec xp_cmdshell 'dtexec /SQL "SBLoadExcelDBLog" /SERVER test /USER **** /PASSWORD ***** /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW

/LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.SuperBowl"

/Set Package.Variables[User::varExcelFileName].Properties[Value];"aaab"

/Set Package.Variables[User::varExcelWorkbookName].Value;"Sheet1$"

/Set Package.Variables[User::varExcelFileFullPath].Value;"D: estshareaaab.xls"

/Set Package.Variables[User::varDestinationTableName].Value;"FeaturesTmp"

/Set Package.Variables[User::varPreSQLAction].Value;"delete from FeaturesTmp" '



I got errors:



Started: 3:49:51 PM

Progress: 2006-01-30 15:49:52.34

Source: Extract AdHoc Data from Excel

Validating: 0% complete

End Progress

Error: 2006-01-30 15:49:52.46

Code: 0xC0202009

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: An OLE DB error has occurred. Error code: 0x80040E37.

End Error

Error: 2006-01-30 15:49:52.46

Code: 0xC02020E8

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: Opening a rowset for "Sheet1$" failed. Check that the object exists in the database.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC004706B

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: "component "Excel Source" (649)" failed validation and returned validation status "VS_ISBROKEN".

End Error

Progress: 2006-01-30 15:49:52.51

Source: Extract AdHoc Data from Excel

Validating: 25% complete

End Progress

Error: 2006-01-30 15:49:52.51

Code: 0xC004700C

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: One or more component failed validation.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC0024107

Source: Extract AdHoc Data from Excel

Description: There were errors during task validation.

End Error

DTExec: The package execution returned DTSER_FAILURE (1).

Started: 3:49:51 PM

Finished: 3:49:52 PM

Elapsed: 0.703 seconds

View 4 Replies View Related

Variables Vs. Package Configuration

May 4, 2006

Hi,

We can set the connection parameters using Variables as well as thru Package Configuration. My question is, if we use both to pass value for a connection string, which one will take precedence or in other words, which value will be used?

Advance thanks for your help.

View 1 Replies View Related

Package Variables Not Available At Runtime

Feb 15, 2007

Hello,
I have three package variables that I need to have access to at runtime. All three variables have package scope. The first two, 'StartDate' and 'EndDate' are DateTime variables. The third is called FilePath and is a String variable.

I have taken the following steps;

1. Enabled package configurations
2. Set up all three variables as Parent Package Variables, and have targeted the 'Value' property for each.
3. In the properties of the solution, I have set AllowConfigurationChanges to True.
4. After the package was built, I ran the Package Installation Wizard from the Manifest.

I have done both File System and SQL Server installations. When I go to run the package, none of the three package variables are available for modification.

What am I doing wrong?

Thank you for your help!

cdun2

View 15 Replies View Related

Could Not Set Package.variables[_VarProdValue].value

Apr 29, 2008

Hi,

I am executing one of my package through cmd line using DTEXEC and also passing parameter.

The CMD line is :

"E:Program FilesMicrosoft SQL Server (x86)90DTSBinndtexec"
/FILE "C:UnitTestingLGASProd-InFeed.dtsx"
/CONFIGFILE "C:UnitTestingLGASDataFeedConfig.xml"
/MAXCONCURRENT " -1 "
/CHECKPOINTING OFF
/SET package.variables[_VarProdValue].value;0
/REPORTING E

when i try to run the job i am getting the error i putted below...............

Started: 9:37:21 PM
DTExec: Could not set package.variables[_VarProdValue].value value to 0.
Started: 9:37:21 PM
Finished: 9:37:22 PM
Elapsed: 1.188 seconds



Please tell me any one what is wrong in that CMD line.


Thanks
Thiru Senthil

View 4 Replies View Related

How To Initialize Package Variables?

May 2, 2007

I have a For Loop container where each iteration a Master record is inserted. I also have a number of package variables capturing rowcounts from the dataflow task. I later update the master record with the rowcounts. How do I initialize the package variables containing the rowcounts because currently, some of the rowcounts are being populated with rowcounts from another file.



thanks

View 3 Replies View Related

Variables In SSIS Package

Jan 22, 2008



I have defined an active X task (converting from SQL 2000)


Function Main()


DTSGLOBALVARIABLES("TEST").Value= InputBox("TEST : ","Message Box")

Main = DTSTaskExecResult_Success

End Function


The problem is that this variable is not recognized by the subsequent tasks although I have defined a variable "TEST" in the variable lists.

Is there something else to do to get it recognized ?

Thanks for helping,

Pierre

View 8 Replies View Related

Error Creating Package - Failed To Save Package File ... Emp EmpD4B.tmp With Error 0x80040154 Class Not Registered

May 19, 2006

I had just installed SQL 2005 dev on my laptop and got an error message when I tried to create a package using the BI IDE. I received the same error using VS2005 IDE. But the project was created regardless without any packages. When I tried to create a new package in the project, I received the same error again, but with an option to view the error details.

Following is the text of the error details:

TITLE: Microsoft Visual Studio
------------------------------

Error creating package

------------------------------
ADDITIONAL INFORMATION:

Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".


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

Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".


------------------------------
BUTTONS:

OK
------------------------------
I found a similar post that suggested that they try the following:


regsvr32 msxml3.dll
regsvr32 msxml4.dll
regsvr32 msxml6.dll

But msxml6.dll could not be found.

I did get a copy of this file from a coworker, and after copying it and registering it, I was able to add a package to the project.

My concern now is what is the likelyhood of this being the only file missing from the installation.

I'm wondering if I should reinstall, or (if it exists) do a repair on the installation.

Thanks.

Marshall

View 12 Replies View Related

Yukon BIDS Package Variables

May 25, 2005

Hello,I'm using BIDS to create a package, and I need to pass in a variable value; how does this new DTS process work, in deploying the package and passing in a custom value at runtime?Thanks.

View 2 Replies View Related







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