Quantcast
Viewing all 24688 articles
Browse latest View live

Excel Source - Read sheet based on position not based on sheet name.

I am reading excel data and storing it into oledb destination. Excel connection string is available in config file. Everyday am getting 1 excel file from 3rd party team.

Each time my excel sheet tab name is changing, so i could not able configure excel sheet based on it name. But i know that the data is always available in 1st sheet. So irrespective of sheet name, i need configure my excel source to read it based on 1st sheet. Excel source by default populating all the sheets name which are available in excel.

Is it possible to query excel sheet by using expression?

Excel tab names are CA,Sheet2,sheet3.

My excel query should be select * from [sheet$1] or [{0}$] not select * from [CA$]


how to generate xml file with multiple nodes using sqlserver as database in SSIS..

Hi ,

I have to generate the xml file using multiple nodes by using ssis and database is sqlserver.

Can some one guide me on to perform this task using script task?


sudha

Send mail task it does not allow all the user to run the mail

Hi guys, I'm using the Send Mail Task and it's working but only using my mail. Pratically I set up a connection manager, Use Windows Authentication.  Fromdiegoctn@mycompany.com to diegoctn@mycompany.com . Message: the package ran without problem. That's ok.

But..if I use ssis@mycompany.com to diegoctn@mycompany.com it retrieves the error : Client does not have permission to send at this sender.

My network administrator set up the mail ssis@mycompany .com with the password mycompany01 and it's asking me to find a different solution but I guess there is something that can be done. My purpose is to run the package from every machine and every user within my team and not only from my user.

Any advice?

Thanks

auto increment number with leading zeros

hello,

i have data column (serial number) that auto generate from script component, i'm using counter +1 and it successful store the number to my db. but the problem is there any idea to store the number to 00001 rather that 1.

im using this method in my script component

dim counter as integer = 0

counter =counter + 1

row.NoSerial = counter

TQ


Execute SQL Task issue

Hi ,

I am trying to run below query IN SQL Execute task in ssis .

i am passing table name as a parameter as input and result set

SELECT TOP 1 STUFF((SELECT '+Row.' + COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
 WHERE table_name = ?
 FOR XML PATH('')
          ), 1, 1, '') AS Col3List
          FROM information_schema.columns

I am getting below error when running the execute sql task

Parameter mapping-User::tablename
Direction-input
Datatype-NVARCHAR
Parameter- Name-0
Parameter- Size -1
Resultset:Single Row

[Execute SQL Task] Error: An error occurred while assigning a value to variable "columnsList": "The type of the value BNull) being assigned to variable "User::columnsList" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.

Regards,

Vipin jha


Thankx & regards, Vipin jha MCP

Validation Error - An error occured executing the provided SQL Command

Hi All,

I am new to using SQL Server in general (2008 R2) and am trying to change the source location for multiple packages in order to obtain our data from a more reliable environment.

I have created a copy of the target database where the data will be loaded, amended the source and target connection managers and ran through the packages to ensure they work, which many do.

We are changing the source from a local server to a cloud based server and when running a package that literally truncates target table, selects * from source, and inserts data to target I get a validation error "An error occurred executing the provided SQL Command "Select *...." The connection has been disabled" and "component ADO NET Source failed validation and returned validation status "VS_ISBROKEN"".

The table structure from the 2 sources is the same and I have even recreated the data flow tasks to ensure the metadata has updated. When selecting 100 rows or even 5,000,000 rows from source the package runs fine but will fail as above when selecting &* (around 9.5 million rows).

I'm not sure if this is due to the new data source being web based or if it could be some erroneous data in the table that isn't being selected when limiting to 5 milling rows etc.

I have spend hours trying to figure out what the issue could be (doesn't help being new to SQL Server) so any guidance would be hugely appreciated!!!

Thanks,

Louis.

 



Syntax for range number

Hi guys, does anyone know how works the range in SSIS?

@[User::Variable1]>1 and <11 does not

@[User::Variable1]>1 and @[User::Variable1]<11 does not         Many thanks

FTP Task doesn't work when run as an Agent Job

I have built an SSIS package which uses an FTP task to connect to an internal FTP server, download any files it finds in a specific directory, and then imports the data with a data flow task inside a for each container.  The connection to the FTP server is handled through a configuration file held in a secure folder which holds username and password.

I have imported the package to the MSDB package store and it runs fine end to end when I execute it from here using DTexec.  However, I created an agent job to run the package each night and this doesn't work as the FTP task doesn't download anything. I enabled logging for every type of event on the FTP task and get the following entries:

Attempting to connect to FTP server
Performing the FTP operation "Receive".
Operation complete.

However, it doesn't download any files!  There is currently one test file sat in the FTP directory which I have left there.  When I run it manually with DTExec the file gets downloaded by the FTP task and the package proceeds with the import.  No error is recorded in the SSIS log or the agent job history log!  Please can anyone suggest what might be happening?  I have verified with effective permissions that the SQLAgent account has read/write permission to the target directory (which is a network share).


Select First Excel sheet as Data source in Data flow Task

Hi,

I have an excel data source file, but name of first worksheet can be varied from time to time. 
currently I have to know the name of excel sheet if I want to run the dts page.


SELECT * FROM [gz1947$] WHERE [F9] IS NOT NULL

I also tried to add reference in the script task to see if I can add Excel library.  thinking that it might be easier to get first worksheet name
from script task and assign it to variable and then pass that variable to EXCEL QUERY above.  But I can't find the reference.

I'm using ssis 2005.

Thanks

Random Connection Failure to Oracle from Packages

I have a project with 18 packages in it that connect to an Oracle database to extract data from over 150 Oracle tables. Sometimes the project completes okay; sometimes it doesn't.

The 18 packages have two to four data flow steps executed one at a time, with each step extracting data from four to eight Oracle tables simultaneously and depositing the rows into SQL Server tables.

When it errors, it is always the same: "ORA-12170: TNS:Connect timeout occurred".  The error could be in package 12 one night and in package 18 another night. Sometimes the project runs successfully through all 18 packages for two or three nights.

Our network and Oracle people say that when it times out, they notice that Oracle sends a "connection okay" message, but there is no response from the SQL Server side. Then it continues to try to send the "connection okay" for about 30 seconds, upon which it times out.

Has anyone seen this problem before?

Greg

pipelinecomponenttime event

hi

i am using ssis 2008 but  i am not able to view "pipelinecomponenttime event" in Logging of ssis package how to add this componant

Arithmetic overflow HOLAP/ROLAP but not MOLAP.

Hi,

I have a problem with processing mdx queries after create ROLAP/HOLAP cube, if I create MOLAP cube everything works fine (processing time about 0-2000 miliseconds), but when I change cube structure to ROLAP/HOLAP, my mdx queries invokes very long time (20min+ and they never end), or then they (Rolap/Holap cubes) throws the arithmetic overflow error. In my data warehouse I have about 20 milions (for US bilions) records. I use Visual Studio 2013 Data Tools and Microsoft SQL Server 2014.

Here is error which I get:

arithmetic overflow error converting expression to data type int 22003

I will be very grateful for help!

#Edit:

my configuration:

http://imgur.com/a/aTPFg

Insertion a record in a table having columns of different charsets using OLEDB

My development environment - 

Database -> Microsoft SQL Server2008 R2

OS -> Windows Server 2008 R2

Database Charset -> Chinese_PRC_CI_AS (Windows936)

Operating System Charset -> Chinese

Below table is having varchar fields with different charsets.

createtable dbo.tcolcs1 (

    c1 int notnullprimarykey,

    c2 varchar(30)collate SQL_Latin1_General_Cp1_CI_AS ,

    c3 varchar(30)collate Chinese_PRC_CI_AS

)

I want to insert below record using OLEDB APIs provided by Microsoft. Just for information, character '0x00C4' does not belong to Windows 936 codepage.

insertinto dbo.tcolcs1values (10, NCHAR(0x00C4), NCHAR(0x4EBC))

Code snippet -

DBPARAMBINDINFO bind_info

memset(&bind_info, 0, sizeof(DBPARAMBINDINFO));

...

...

bind_info.pwszDataSourceType = L"DBTYPE_VARCHAR";

bind_info.wType = DBTYPE_STR;

I have bound the varchar field with DBTYPE_STR. I can see that my code is not inserting Latin1 character (0x00C4) correctly into the table. The code always inserts a blank character into Latin1 column (c2) and 0x4EBC into Chinese column (c3).

Later, I changed the binding from DBTYPE_STR to DBTYPE_BYTES as below -

bind_info.pwszDataSourceType = L"DBTYPE_BINARY";

bind_info.ulParamSize = 0;              

bind_info.wType = DBTYPE_BYTES;

With the above change, I observed that OLEDB is converting hex value to string. It is inserting 0x00C4 as 'C4' and 0x4EBC as '4EBC'. I also tried with adding 'AutoTranslate=no' in driver connection string, but it did not help. How can I insert above record with OLEDB in the above table ?

Thanks in advance.

Incremental load not capturing data in SSIS 2012

Hi ,

Iam having an issue with Oracle CDC for SSIS which is new in 2012, Developed SSIS packages with Full load and Incremental load logic to load data into ODS - STAGE - DWH. Here problem is when ever i do a full load following with an incremental load , incremental load is not capturing updated data , if i do second incremental load then it captures data.

Is there any solution for this to get data in first incremental load.

bubbling exceptions up from sub packages

Hi.  We run 2012 std.  We r trying 2 get our heads around the options we would have customizing capture of exceptions that bubble up (if that is possible) to our master pkg from sub pkgs.  This question is independent of ssis's sys logging.

My recollection is that ssis tells us a lot (maybe too much repetition) about exceptions.  Our goal is to customize how we deal with exceptions at lower levels in the master pkg itself (perhaps in the .net service that calls the mstr if that can be bubbled up) so that we aren't incorporating the same custom logging at every level of the ssis call "tree/structure".

We capture some exceptions already in vars by incorporating try catch blocks in our c# scripts.  But haven't addressed yet how those might be bubbled up.  It is hoped that whatever we do with these can mimic what we do with exceptions thrown by other ssis components where there is no c# code to catch the exception.

Can the community get us started?



Script component byref value_Isnull

Hi

I am using a function inside script component transformation. the function takes parameters as

function is like

this is not my whole business logic, I am just placing some of the code of the function here

public sub Fun1(byref value_isnull as boolen, byref value as string)

{

if value=""

value_isnull=true

end if

}

while calling the function it is throwing error as

"IsNull property cannot be set to False. Assign a value to the column instead"

can any on tell me what is the problem here.

Thanks

 

Connection Manager - Expression ConnectionString

Hi

I have been unable to find the answer to this question and would appreciate any advice.

I have taken over a number of SSIS packages and wonder if the existing practise is fairly normal as I have not seen it done quite like this before. I need to create/modify the packages for changes to the existing import files or for new import files.

Each package imports a number of different text files with different columns, each input file has it’s own Connection Manager however all the Connection Managers share the same Expression ConnectionString and DelayValidation is False.

When looking at the Connection Manager I can set the Filename to one of the corresponding input files and preview the data etc., however once I open the Flat File Source Component I can no longer preview the data as the default value for the variable in the Expression Connection String is used which points to a file that is not there.

Should I

  1. Just set DelayValidation to True
  2. use separate variables for each Connection Manager (1 per input file format)
  3. change the default value for the file in the variable to match the components I am looking at
  4. something else

Thanks in advance

Shaun



Use of mail chimp APIs in integration services

Hello,

I want to use mail chimp APIs in integration services. I have to upload email addresses to mail chimp through scheduled ssis package.

Please help me on this.

Regards,

Ramu


Ramu Gade

Getting a connection error when using Excel source

The SSIS 2012 package is meant to extract rows from a spreadsheet, and when the connection is identified and the columns selected, the data displays satisfactorily, but when I execute the task, I get the error

Error: 0xC020801C at Data Flow Task, Access AUSRAW1 [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "AUSRAW1 Connection" failed with error code 0xC0209303. 



Sandy Shin

print PDF file from folder using SSIS

Is there a way in SSIS to print pdf file from folder?

ANy help much appreciated.

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>