Showing posts with label task. Show all posts
Showing posts with label task. Show all posts

Tuesday, March 27, 2012

Getting the count of rows for 3 tables in Single Execute SQL task

hi frnds,

im very new to SSIS package .my package consists of Single Exceute task.

In Single Exceute SQL task i had 3 seperate queries to get the count of rows of 3 tables.

the Query goes like dis ...

select count(*) AS precheckcount1 from new_main_dts where cust_nbr like '875%'

like dis for another 2 tables i had written with the alias name precheckcount2 and 3

i mapped the variable user::precheckcount1 to precheckcount1 in the resultSet and for other two alias name i did the same.

while executing the package the error is thrown : [Execute SQL Task] Error: An error occurred while assigning a value to variable "precheckcount2": "Unable to find column precheckcount2 in the result set.".

please help me its very urgent

It is simplest if you get all values in a single result set. Set the ResultSet property to single row, then use a query like this to get the combined result sets-

SELECT (SELECT COUNT(*) FROM sysobjects) AS C1, (SELECT COUNT(*) FROM sysobjects WHERE type = 'U') AS C2

Then on the Result Set tab set the mappings using the column indexes, Result Name of 0 maps to the variable name for the first column's value. Result Name 1 maps to the variable name for the second column's value.

|||

thanks a lot.

my problem got resolved.

Friday, February 24, 2012

Getting error working with Transfer SQL Server Objects Task

I was trying to transfer a SQL Server 2000 database to SQL Server 2005 using SQL Server Objects Task. However, The following error message was encountered:

"[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".“

can anyone suggest me what is the error here?

Is there any other way possible to achieve this(transfer of database). The objects to be transferred are tables, views, stored procedures, user data types, and user-defined functions. The logins need not to be transferred.

The output we are Getting is:-

Start Debugging:

SSIS package "unittest2.dtsx" starting.

Error: 0xC002F325 at SQL Server-Objekte kopieren, Transfer SQL Server Objects Task: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".

Task failed: SQL Server-Objekte kopieren

Warning: 0x80019002 at unittest2: 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 MaximumErrorCount or fix the errors.

SSIS package "unittest2.dtsx" finished: Failure.

The program '[4272] unittest2.dtsx: DTS' has exited with code 0 (0x0).

You might try posting this in the SSIS forum.

Getting error working with Transfer SQL Server Objects Task

I was trying to transfer a SQL Server 2000 database to SQL Server 2005 using SQL Server Objects Task. However, The following error message was encountered:

"[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".“

can anyone suggest me what is the error here?

Is there any other way possible to achieve this(transfer of database). The objects to be transferred are tables, views, stored procedures, user data types, and user-defined functions. The logins need not to be transferred.
The output we are Getting is:-

Start Debugging:

SSIS package "unittest2.dtsx" starting.

Error: 0xC002F325 at SQL Server-Objekte kopieren, Transfer SQL Server Objects Task: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".

Task failed: SQL Server-Objekte kopieren

Warning: 0x80019002 at unittest2: 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 MaximumErrorCount or fix the errors.

SSIS package "unittest2.dtsx" finished: Failure.

The program '[4272] unittest2.dtsx: DTS' has exited with code 0 (0x0).

I think this is likely better for the management tools forum - they own the transfer objects wizard and tasks ...

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1

Donald

Sunday, February 19, 2012

getting error on Mail Task while attaching file of size > 2MB

Hi,

can any one help me , i am facing an issue on SSIS mail task, i want to attach a file of size 2 MB. it's getting error :

[Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".

thanks,

sun.

Double check things like virus scan, the SMTP server, network issues, etc... First, try a smaller file and see if that works (if you haven't already).|||i already try for smaller file it's working fine. and there is no issue like virus scan, SMTP Server and networks..|||

I know that 2MB limits have been placed on attachments frequently (a setting somewhere) as a way to help prevent bandwidth consumption and malicious activity. Check with your SMTP server administrator.

I'm, of course, just trying to help you troubleshoot. I can't test this at the moment and it will have to wait till the morning here in the central US for me to be able to do so.

|||thank u so much for ur helping..Normally, i mean through my outlook i can send the same file.

Getting error in Execute SQL Task

Hi,

I am trying to execute a Stored Procedure using an Execute SQL Task. my stored proc contains various input paramaters. And the datatype for some of the paramaters are numeric (decimal). So when I am passing values to those paramaters using Exec SQL Task, I have used variables of type Object as it is not working properly even if I declare the variable type as "double". So I have used Object datatype for those variables and it worked properly.

But suddenly from yesterday onwards I am getting an error message (find below).

[Execute SQL Task] Error: Executing the query "USP_InsertData" failed with the following error: "Failed to convert parameter value from a Object to a Double.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

If any one have idea on this, please let me know to rectify this error.

Thanks in advance.

Regards,

Prakash Srinivasan

What's the value that it is trying to convert?

-Jamie

|||

Hi Jamie,

Such a fast reply it is. I am taking numeric value from table and passing that value through an SSIS's Object datatype variable to my stored proc. The datatype of the parameter in my stored proc is numeric(10,2).

Regards,

Prakash Srinivasan.

|||

Yes, but what is the actual value it is failing on? I woudl suggest that if works some of teh time then there are particular values that it doesn't like. Admittedly that seems a very strange thing to happen.

-Jamie

Getting error 0x80004005

Hi Everybody,

Iam a sql server developer,iam on a migration project,iam encountering an error when iam editing the control flow task.it says the sql server doesnot exist or access denied,pls can anyone help me on this.

Thanks and Regards,

sg

Just out of curiosity, are you sure that you have access to the SQL Server that you are trying to connect to? Can you connect through SQL Server Management Studio?|||

Hey i have access.thanks for ur reply.

i found out the cause of the error.

Thanks,

sg

|||What was the cause so that others may be able to solve similar issues?. Please post it here.

Thanks,
Phil|||

I didnot indicate the path for connection manager correctly.

Regards,

sg