Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

"Drop and recreate destination table" option disabled

$
0
0

Hello,

I am using the tool 'SQL Server Import and Export Wizard' to import data from 1 database to another one in the same server daily.  Both database have same tables.

However, when selecting tables > Column Mappings, the option 'Drop and recreate destination table' is disabled (grey out) and I want this option checked because in case a table structure is altered in the Source database, the same should be replicated in the Target database.

How can this issued be solved or any workaround?

Thanks,

Vik


Can I have multiple instances of SSIS on a server?

$
0
0
We have a server that we deploy our SSIS packages to and run them on.  We currently have MS SQL Server 2005 on it but would like to ugrade to at least 2008.  However, I don't want to cause problems with the current 2005 packages that run daily (or more often) until we can get them converted to the next version.   Can we have more than one version of Integration Services installed on one system and if so,  how do we call the 2005 version of DTEXEC for our current jobs until we're ready to convert them to the next version?   

excel connection error

$
0
0

hi,

i am getting followinf error:

Error: 0xC020901C at Data Flow Task, Excel Source 1 [38]: There was an error with Excel Source 1.Outputs[Excel Source Output].Columns[SUBSTANCENAME] on Excel Source 1.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in the target code page.".
Error: 0xC020902A at Data Flow Task, Excel Source 1 [38]: The "Excel Source 1.Outputs[Excel Source Output].Columns[SUBSTANCENAME]" failed because truncation occurred, and the truncation row disposition on "Excel Source 1.Outputs[Excel Source Output].Columns[SUBSTANCENAME]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Excel Source 1 returned error code 0xC020902A.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
Error: 0xC02020C4 at Data Flow Task, Excel Source [16]: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Excel Source returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

how to solve?

problem listing role members for db_ssisltduser and db_ssisoperator roles using sp_helprolemember

$
0
0

I was trying to find out the role members for db_ssisltduser and db_ssisoperator roles. But the results from the GUI and from sp_helprolemember are different.

From the GUI (msdb -> Security -> Roles -> Database Roles) double click on db_ssisltduser. It shows 4 members (dc_admin, dc_operator, dc_proxy, MS_DataColletorInternalUser)

But when I run EXEC sp_helprolemember 'db_ssisltduser', it only returned 2 members (dc_operator, dc_proxy)

so I run is_rolemember on the 2 missing members

select is_rolemember('db_ssisltduser', 'MS_DataCollectorInternalUser')

select is_rolemember('db_ssisltduser', 'dc_admin')

and they both return 1, that means they are the members for db_ssisltduser role.

Same problem with members for db_ssisoperator role

From GUI, it shows 4 members (dc_admin, dc_operator, dc_proxy, MS_DataColletorInternalUser)

EXEC sp_helprolemember 'db_ssisltduser' only show 3 members (dc_operator, dc_proxy, MS_DataColletorInternalUser)

Does anyone have idea why sp_helprolemember doesn't return all the members for a role?

I had tried this on my MSSQL 2008 and MSSQL 2012. I was login using the "sa" account.

Any help will be appreciated! Thanks!

How to send email notification when row is redirect

$
0
0

Hello,

I am new to SSIS.  I have a text file to transfer to a table in sql server.  I redirect all error rows into another text file.  It did this successfully.

However, I want an email notification when there are any rows that got redirect.  I've been searching for answer, but can't seem to figure out how to do this.

Thanks.

Programatic way of determining Data Flow Task Name

$
0
0
Hi,

I am planning to implement Lookup Errors in my Datawarehouse in such a way that the Lookup Error is redirected to an Error table. The table will have the structure of the source table + error column and code. I want to add two more columns to this table namely, the name of the data flow task, where the lookup was errored out and the timestamp. Is there a way of programatically identifying the name of the Data Flow Task, or should I harcode the name in a Derived Column Transformation befor the Lookup Transformation? Please advice.

SSIS Package Randomly Crashing - Access Violation

$
0
0

I have a SSIS package that crashes randomly. It has data flow tasks using OLE-DB Source, OLEDB Destination, Sort Transform, Merge and Merge Join etc. to load csv files into a SQL Server database.

Most of the time the package runs fine, but occasionally it crashes because of Access Violation in DtsPipeline.dll when it is processing a large number of csv files. If I choose to end the process and re-run it, it will run just fine (or crash again after it has loaded a few thousand more files). This is happenng with SQL Server 008 R2 SP1 and SP2. 

I attached Visual Studio debugger to the crashing process, this is what I got from the Call Stack window:

> DTSPipeline.dll!00000000541300aa() Unknown
     TxSort.dll!0000000053c727d4() Unknown
     TxSort.dll!0000000053c74245() Unknown
     DTSPipeline.dll!0000000054197082() Unknown
     DTSPipeline.dll!0000000054196757() Unknown
     DTSPipeline.dll!0000000054199e64() Unknown
     DTSPipeline.dll!0000000054199f77() Unknown
     msvcr80.dll!00000000747037d7() Unknown
     msvcr80.dll!0000000074703894() Unknown
     kernel32.dll!0000000076aa652d() Unknown
     ntdll.dll!000000007703c521() Unknown

So it looks like a problem with the Sort Transform component (TxSort.dll), but I don't know what the next step should be to fix the issue. Any advice?

A similar issue was reported in SQL 2005 as described at this URL: http://support.microsoft.com/kb/942087. Could there be a hoxfix that can do the samefor SQL Server 2008 R2?


Miracle - MCDP: ASP.NET Developer 3.5


takinh excel file path and name dynamically

$
0
0

hi,

i am getting two excel file ,so two excel source.

nwo my file path can be anywhere and file name can be anything.

hwo to make it dynamically so it pick up it automatically


Derived Column to process negatve sign with or without decimal point

$
0
0

HI,

I have had expert advise from the knowledgeable folks on this forum which solved my issues to date. I am trying to come up with one expression that will solve both issues I have.

I have flat file data which contains fields with implicit or explicit decimal points in the data and the gurus in this forum came up with this Derived Column expression:

So if I have a number like -000000000037.0 it will resolve to -37.00

ISNULL(PAID_AMT) ? NULL(DT_NUMERIC,18,2) : (TRIM(PAID_AMT) == "" ? NULL(DT_NUMERIC,18,2) : (FINDSTRING(PAID_AMT,".",1) > 0 ? (DT_NUMERIC,18,2)(TRIM(PAID_AMT)) : (DT_NUMERIC,18,2)(TRIM(PAID_AMT)) / 100))

I now have a number like 0000000000-2000 which needs to be resolved to -20.00

The following expression will do the proper conversion:

(DT_DECIMAL,2)((DT_DECIMAL,2)RIGHTPAID_AMT,(LENPAID_AMT) - FINDSTRING(PAID_AMT,"-",1) + 1)) / 100.0)

but I need ONE formula to handle both scenarios. Does such an expression exist. Is it possible to modify the first formula to handle both cases?

Can you help me out?

Thanks again for your help.

Dave

Multiple aggregates from OLEDBSource into OLE DB Destination

$
0
0

Please advice if the following is possible using SSIS

Please run the following code in SSMS

Drop table #test Create table #test (CustomerNumber varchar(10),CustomerType varchar(10),Source Varchar(10)) insert into #test values('C1','Old','TV') insert into #test values('C2','OLD','TV') insert into #test values('C3','New','Internet') Drop table #test2 Create table #test2 (customernumber varchar(10),CustomerFirstName varchar(10),CustomerLastName varchar(10)) insert into #test2 values('C1','Jon','Ste') insert into #test2 values('C2','Doe','Dove') insert into #test2 values('C3','Lov','Daisy') Select a.CustomerNumber, a.CustomerType, a.Source, b.CustomerFirstName, b.CustomerLastName, COUNT(Distinct(Case when a.CustomerType='Old' and b.customerfirstname='Jon' then a.CustomerNumber else null end )) as OldCustomers, COUNT(Distinct(Case when a.CustomerType='New' and b.customerfirstname='Lov' and a.Source='Internet' then a.CustomerNumber else null end )) as NewCustomers

into #results from #test a inner join #test2 b on a.customernumber=b.customernumber group by a.CustomerNumber, a.CustomerType, a.Source, b.CustomerFirstName, b.customerlastname

The reason I want to do the same aggregation in SSIS as the tsql code is taking more than 2 hours and I am looking for options to make it run faster.

I am doing 19 different aggregations in the tsql statement and the number of rows is more thna 19 million.

Please explain what kind of dataflowtask can I use to perform the calculation.

Thanks for your input


gs




Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80070005

$
0
0
Hi All,
This error has had me stumped for a week. I have read numerous forum posts from all sources and tried most of the suggestions to no avail.
Please note that I can run the DTSX package on the production server manually quite successfully. It produces an XLS file.
When called from ASP.NET however, it fails.

Additional error information:
"ASP.NET is not authorized to access the requested resource."
"Consider granting access rights to the resource to the ASP.NET request identity. "

There is no ASP.NET user nor a NETWORK SERVICE user on the Server!

The CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} refers to in the registry:

Default  REG_SZ C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTS.dll

Assembly REG_SZ Microsoft.SqlServer.DTSRuntimeWrap, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Class    REG_SZ  Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass

Error: 80070005 usually refers to access denied.
8027758069
Environment:
Windows Server 2008 R2 with Service Pack 1 64-bit
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
Microsoft Visual Studio 2008 Version 9.0.30729.4462 QFE
Microsoft .NET Framework Version 3.5 SP1
Parallels Plesk Panel 11.0.9 for Windows

I have created an ASP.NET web page that calls a DTSX package as follows:

Line 11:   Private Sub btnExecute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExecute.Click
Line 12:     Dim app As New Application
Line 13:     Dim package As New Package
Line 14:     Dim filename As String = ""
Line 15:    Dim csvFileName As String = ""
Line 16:
Line 17:    Try
Line 18:      filename = Server.MapPath("/dtsx/MakeNewOrdersXLS.dtsx")
Line 19:
Line 20:      '***Load DTSX
Line 21:      package = app.LoadPackage(filename, Nothing)

The error is thrown on line 12: Dim app As New Application
Of course this application runs perfectly on my development machine:
    Windows 7 32-bit Pro with SP1
    Visual Studio 2008 with SP1
    .NET Framework 3.5 SP1
    SQL Server 2008 Standard 32-bit
But it doesn't run on the production web server as specified under Environment at top. Note that the Website resides on the same
server that the SQL Server database is on. It is a leased Dedicated Web Server that uses Plesk to provision the web sites.
    
Solutions that I have tried:

1. The application pool that the website runs under uses Identity SRV1\IWPD_1 (an identity created by PLesk). I have added that user
to the Local Administrators group. That did not solve the problem. There is no Active Directory domain. SRV1 is the name of the local server.

2. I have tried using identity impersonation with the same ID/PWD that I use to log into the server via RDP, with which I can easily
run the DTSX package manually without a problem.
    <identity impersonate="true" userName="SRV1\admin_login" password="RO_##_$$_ex"/>
That allows the package to return "Success" but NO XLS file is produced!

3. I am using the References to the assemblies found in the GAC.
    <add assembly="Microsoft.SqlServer.DTSRuntimeWrap, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
    <add assembly="Microsoft.SqlServer.ManagedDTS, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
I have tried giving Read_Write_Execute rights to the C:\Windows\Assembly folder to the Identity "SRV1\admin_login", but even though I am
 logged in to the server as an Administrator (via RDP) I am not allowed to propagate those rights to the assemblies in the GAC.

4. I have tried to change those references to the same named assemblies in the C:\Program Files\Microsoft SQl Server\100\SDK\Assemblies
folder, but for some reason they do NOT get written to Web.config! I was going to give the Identity "SRV1\admin_login" rights to those assemblies directly.
But if the references are not accepted by Visual Studio, then what is the use of that?

Anyone have any ideas? Any help will be appreciated.

remove duplicate values

$
0
0

hi

in my oledb destination i am getting some duplicate rows,i want to remove it before data loads into table

derived column

$
0
0

i need to convert from string to numeric(2,0)

getting error : (DT_NUMERIC,2,0)PAT20 if use this.

Error: 0xC0049064 at Data Flow Task, Derived Column [26]: An error occurred while attempting to perform a type cast.

Error: 0xC0209029 at Data Flow Task, Derived Column [26]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "Derived Column" failed because error code 0xC0049064 occurred, and the error row disposition on "Derived Column.Outputs[Derived Column Output].Columns[Derived Column 2]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.

Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Derived Column" (26) failed with error code 0xC0209029 while processing input "Derived Column Input" (27). 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.

Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.

Using with (NOLOCK) and rows per batch?

$
0
0

I have a package that has something like this in an OLE DB Source  task:

select HEIGHT from dbo.PEOPLE [P] left join dbo.CURRENTHEIGHT [C] on [P].[ID] = [C].[ID] where [C].[HEIGHT] <> [P].[HEIGHT];

I then have an OLE DB Destination task that just inserts the results of that into dbo.[CURRENTHEIGHT].  On this task, my batch size is set to 100k and "maximum insert commit size" is set to 100k.  I have Table Lock and Check Constraints turned on (checked).

If dbo.PEOPLE has > 100k records, my package locks.  So, I added with (nolock) to the left join and everything seems to work fine.

What I am wondering though, is since I am reading from and inserting into dbo.CURRENTHEIGHT, will the select statement be able to pull back rows that were newly inserted?

I am not sure how SSIS chunks things into 100k rows and reads them during the OLE DB Source task so I am not sure if with NOLOCK will cause issues in this case as I do not want to read the newly inserted rows.

Hopefully that all makes sense.


Aggregation into one oledbdestination

$
0
0

Is it possible to aggregate multiple fields from one oledbsource and then put the results into oledb destination?

If I use Aggregate transform to aggregate two columns, how can I put the values of the columns in one oledbdestination

OLEDBSource

ID   StudentMark1   StudentMark2

1    50                       60

2    45                       89

This is the result I need in OLEDBDestination 

ID  StudentMark1 StudentMark2   CountMark  avgMark

1      50                        60                2                  55

2       45                      89                2                    67

How do I put the aggregated value of StudentMark1, StudentMark2 into the avgMark and CountMark columns of the OLEDBDestination..

Could you please explain the SSIS Components I need to use to accomplish the task.


gs



Loading a varchar/datetime value from a pipe delimited file to SQL table

$
0
0

Hey all,

I have a pipe delimited file that I get, and I am trying to load it in to a SQL table. The file looks like this:

19,23,A,20130615062429

I have created my SQL table with 4 columns with int,int,char,datetime datatype respectively.

I am not sure, if the value that I am getting in file is datetime/varchar. The package runs fine when I use a varchar datatype in my table (and not datetime).

I run in to an error, If I use "datetime" as my datatype.

Any ideas/suggestions?

excel when the new file comes in

$
0
0

i am getting this error when new excel file comes

TITLE: Package Validation Error
------------------------------

Package Validation Error

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

Error at Data Flow Task [Excel Source [362]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Error at Data Flow Task [SSIS.Pipeline]: Excel Source failed validation and returned error code 0xC020801C.

Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.

Error at Data Flow Task: There were errors during task validation.

Error at NDC [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft JET Database Engine"  Hresult: 0x80004005  Description: "External table is not in the expected format.".

 (Microsoft.DataTransformationServices.VsIntegration)

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

OK
------------------------------

SSIS, FTP, and a Proxy server

$
0
0

Hello, I'm hoping someone can help or at least say that what I'm being told is "inaccurate"

Our team has had to keep a SQL Server 2000 box (no snickering please) around b/c it has an old scripted FTP job that sends files across to a remote server through a firewall with specific rules to allow this.

We've been wanting to move this to a new SQL 2008 box for some time and have a package already written to do so.  However, our network folks have said that the server cannot have any direct internet access and the FTP job will have to go through a proxy server.  A web browser on the server works but needs the proxy server setup (under LAN Settings) to work.  After searching the web and looking at the FTP connection manager and the FTP task I can find no explanation of how this would be accomplished.  Arguments to the effect that this is the way it's already being done and we are not proposing anything new, only to replace one server with another have been rejected.

Is this possible? if not, it'll give me some backing as to why what they are telling me will not work and we need a new firewall rule put in to allow this.  Help!

Row Count Transformation and Send Email task

$
0
0

I am getting the vcount of rows in variable from row count transformation and I want to send the row count in a mail as message. I am trying to use expressions in send mail task for message and when I use @[User::MyCount] .It gives error "cannot convert expression value to property type". I am using variable of int32 type to store count of rows in a row count transformation. How to send count of rows in a mail?

Thanks for your time and help.


Lookup on multiple columns with multiple look tables

$
0
0

Hi,

       I have a oledb source which generates a dataset with columns x,y,z... I need to lookup on these columns on tables xlookup, ylookup, zlookup.

So my resultant output dataset after 3 lookups should look like x,x1,y,y1,z,z1 where x1,y1,z1 are the corresponding lookup table output columns.

If there is a no match, null should be populated as the lookedup value.

I tried to use lookup transformation, but the output of one lookup has a condition (match or nomatch) to redirect the output to another lookup. The output of one column lookup is no way dependent on the other as they are independent lookups.

Please suggest which task should I need to use for these multiple lookups.

Viewing all 24688 articles
Browse latest View live