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

Questions About Script Task

$
0
0

I'm following the example here.

http://www.singhvikash.in/2013/05/ssis-how-to-loop-through-multiple-files.html

I think I have everything setup right, but something is not working here.  I followed all the steps, and for the scripting part, I did this:

Project > Add New Item > Class

I have a red squiggle lined under these two lines of code:

System.AddIn.AddIn

(int)ScriptResults.Success;

Here's an image.

I've done a bit of C# dev work, but not much really.  Also, I'm pretty new to SSIS.

Thanks, in advance, for the help.


Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.


ssis packages execution fails while executing it by c#

$
0
0

Hi,

I have created one ssis package on server. Now i want to execute this package using c# code.

I have implemented following code to perform this task:

 string pkgLocation = @"Package.dtsx";
        Package pkg;
        Application app;
        DTSExecResult pkgResults;
        Variables vars;
        app = new Application();


        pkg = app.LoadPackage(Server.MapPath(pkgLocation), null);

        vars = pkg.Variables;
       // vars["MonthInt"].Value = "02";
      //  vars["YearInt"].Value = "2014";




        pkgResults = pkg.Execute();

        foreach (DtsError pkgerror in pkg.Errors)
        {
            string err = "Error Source: " + pkg.Name + ": " + " Description: " + pkg.Description;
            //lblErrorMsg.Visible = true;
          //  lblErrorMsg.Text = err;
        }

        if (pkgResults == DTSExecResult.Success)
        {
            // lblErrorMsg.Visible = true;
            // lblErrorMsg.Text = "Package ran successfully in " + count;
        }
        else
        {
        } 

But all the time it gets fail.

Its giving me following error in DTSError:

'To run a SSIS package outside of Business Intelligence Development Studio you must install Standard Edition of Integration Services or higher.'

Can you please guide me how can i resolve this issue.

Is it necessary to install SSIS standard edition on all client machine.

PLease help.

Thanks in advance!

Regards

Rajni

                                           

Adding Deadlock Retry Logic to the Stored Procedure

$
0
0

Could you please any one explain with example

Thanks

Unable to remove double quotes (" " ) from text file Source

$
0
0

hi,

i have a txt file as below

"xxx","111111","SMTP:xxx@abc.com"
"yyy","222222","SMTP:yyy@abc.com"
"zzz","333333","SMTP:zzz@abc.com"

In the Flatfile conn Mgr, i specified the coclumn delimiter as comma (,) and text wualifier as ".

When i load the data into Sql DB, i still see the data as "SMTP:yuxiaz@abc.com" .

The first two columns were fine, they loaded with out ". but this third column has double quotes

How can i remove the double quotes for this column as well.

In the Advanced properties, for third column i have set the Text Qualifier as False.

If i put it as true, the pacakge is failing saying that

[Flat File Source [1]] Error: The column delimiter for column "email_address " was not found.

datetime2 as stored procedure parameter

$
0
0

I'm using a SQL Server database where I need to insert data through a stored procedure with these parameters:

@Card int,

@StartDate datetime2(7)

To export the data to this database Im using an OLE DB Command where I call the stored procedure. If I call it like this:

exec insertCard ?, '20140101'

and map the first parameter I have no problem, but that start date must be passed as parameter too. When I change the call to

exec insertCard ?, ?

I get this error

Operand type clash: int is incompatible with datetime2

The first parameter is added to the external columns automatically, but the date does not. I added it manually, with type DT_DBTIMESTAMP2 and scale 7, with the same name as the parameter name and mapped to a column created with (DT_DBTIMESTAMP2,7)"1999-10-11 16:34:52.1234", but I keep having the same error.

I found that there is a bug with 2008 version and date types in stored procedure parameters, but I'm using datetime2. Do you know what am I doing wrong?

Thanks for your time.




Intermitent issues with components

$
0
0

Hi,

 We are suffering an strange issue. We are running a huge SSIS process (using SQL Server Agent Studio) with dozens of packages. From time to time some of packages fails with message such this one:

SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR.  The requested OLE DB provider OraOLEDB.Oracle.1 is not registered -- perhaps no 64-bit provider is available.  Error code: 0x00000000.

or this other one

Component "component "Fuzzy Lookup 1" (2354)" could not be created and returned error code 0x800703FA. Make sure that the component is registered correctly.

or this other

Error loading value "<DTS:ForEachEnumerator xmlns:DTS="www.microsoft.com/SqlServer/Dts">

<DTS:Property DTS:Name="ObjectName">{9821BE49-D5D6-4A1C-9DE7-1D4BCDA2A0D6}</DTS:Property>
<DTS:Property DTS:Name="DTSID">{9821BE49-D5D6-4A1C-9DE7-1D4BCDA2A0D6}</DTS:Property>

<DTS:Prope" from node "DTS:ForEachEnumerator".

As you can see errors are mainly related with problems of validation of package before its execution. Some times the Oracle OLE DB, others the Fuzzy Lookup 1,....

As I told you packages usually does not fail. I am sure that all components are installed are registered (Oracle DB 64 bits for instance) and same packages are alwasys running fine in another environment so I suspect that error could be cause by some performance issue in the server, but I am not able to figure what.

Analysis of event viewer is not providing us any clue about. 

So any one has faced this kind of situations were errors appears intermintently?

Last Update: I have found serveral warning messages such the one below in the windows registry before package failure

2 user registry handles leaked from \Registry\User\S-1-5-21-3200644388-1328647794-3514459758-4977_Classes: Process 2780 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-1-5-21-3200644388-1328647794-3514459758-4977_CLASSES Process 2780 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-1-5-21-3200644388-1328647794-3514459758-4977_CLASSES 

Could be that the cause? If yes, someone know how to fix it?

Thanks

Alfons


How often should I use SSIS Event handlers

$
0
0

Hi,

I would like to use Event Handlers to log OnErrors. Should I place a separate Event Handler on every executable or is it enough just to place one at the top of the package hierarchy.


Mr Shaw

SSIS DataFlow - copy only changed and new records

$
0
0

I am copying a few tables each night from one SQL server to another. At the moment I delete every record from the destination table, and then copy all records from the source table with a SSIS Data Flow Task. 

That works fine so far, but I would like to copy only changed or new rows. What would be the best way with SSIS to achieve this? I am quite new to SSIS, I have no idea if my goal is possible and how...

 


package to import data in another machine

$
0
0

hi

i am making a ssis package to download data from ftp  and upload it in the database of another machine .

Now all things are working fine when i run my package . but when i run the package in a stored procedure it is giving an error   Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path '\\servername\folder\file is denied.

please note i have full access and control.

searching from a millions of record

$
0
0

Hi all

I have one flat file I need to perform MAtch that files records with Sql table that table contains millions of record.

what is the best way to perform this operation.

need to consider performance also.

Thanks

Reading Timestamp value into an SSIS variable

$
0
0
I need to read the last timestamp value (MAX(TimeStampValue)) from a table, store it in a variable in SSIS and using the variable, perform a comparison against another table and load delta records. 

The string data type is not playing well with the timestamp data type and things get even more complicated if I try to store the timestamp value as a varchar in a table.

Is there any variable data types in SSIS that will store the timestamp value easier than a string?

SSIS Package scheduled to execute through the job is getting failed

$
0
0

Hi There,

My package is failing sometimes (not always) as it is scheduled through a job. Below is the error information i got. Please help me on this.

DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. 
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Unspecified error".  End Error  Error: 2014-05-04 06:41:28.22     Code: 0xC004701A    
Source: DFT_Staging_ADW SSIS.Pipeline    
Description: component "SRC_OLE_ADW_Measures" (1) failed the pre-execute phase and returned error code 0xC0202009.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  5:07:54 AM  Finished: 6:41:28 AM  Elapsed:  5613.12 seconds.  The package execution failed.  The step failed.

Thanks,

Sandy

Loading DT_TEXT field into Oracle CLOB

$
0
0

Hi,

I am trying to load a TEXT field from SQL Server 2005 into an Oracle 11g CLOB column via SSIS 2012.  It is taking a very long time.

Even if I don't actually load the CLOB column, the presence of it in the target table makes the load very slow too.

Can anyone explain to me the procedure to follow for moving data: SQLServer(Text) - SSIS - Oracle(CLOB) ?

Thanks very much in advance,

David

OLE DB Command transformation

$
0
0
How does OLE DB Command transformation handle truncation and other errors?

Mr Shaw

Net Framework assembly error 66536 when trying to deploy a project

$
0
0

I'm getting the following when trying to deploy a project from SSDT to SQL Server 2012 SSISDB on an AlwaysOn primary replica. I tried removing SSISDB from the Availability databases but still had the same problem.

TITLE: SQL Server Integration Services
------------------------------

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'microsoft.sqlserver.integrationservices.server, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Exception from HRESULT: 0x80FC80F1
System.IO.FileLoadException:
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
 (Microsoft SQL Server, Error: 10314)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3128&EvtSrc=MSSQLServer&EvtID=10314&LinkId=20476

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

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


Data Profiling through SSIS Package

$
0
0
Hi,
I'm new to SSIS Development. I need some guidance from experts on SSIS. Following are the list of questions :

We are having files with sizes from 1GB to 25 GB of type txt or dat files with tab delimited . Some times,these file might contain invalid rows, invalid data types or large of amount of string value which results in failure while importing file data into SQL Tables

Can any one provide use how to perform Data Profiling on the File before loading into actual SQL Tables like

 - No of Invalid Row which are having NULL values in a columns
 - No of Rows present in Files
 - No of Row with wrong data type values in a column for example: there are chance of file
   holding       string data in int field
 - Some time Row Delimiter in between columns for example : If there are 10 columns in a files, If there is row delimiter in between 5-6 column, which leads to current row data from 6 - 10 columns moved to next row. This scenario should be checked in Data Profiler.
 - Is there way in ssis to identify all the columns in each row are of Equal Column length in entire file. Incase if it not present, throw error. But identifying those rows needs to be faster




Mahender

Execute sql task not firing trigger.

$
0
0

Hi Everyone,

I am using insert and update quires in Execute SQL task i have a trigger at that table which will capture any changes. 

When some changes are been made in management studio or front end portal the trigger is capturing but when changes are been made by the package through execute sql task it not capturing it. 

Help would be greatly appericate it.

Thanking You,

Zoheb Syed.

Modify SSIS package saved on server

$
0
0

   I have saved an SSIS pacakage on my sql server.  I am able to see and run the package through Integrations services.  My question is, is there a way to edit the package through Management studio?

 

Thanks

Jim

Last day of previous month (SSIS expression)

$
0
0

Hi All,

I get the last day of previous month in below format.

(DT_WSTR,200)(DT_DBDATE)DATEADD("d", -DAY(GETDATE()), DATEADD("m", 0, GETDATE()))

But I want to get last day of previous month in the below format.

2014_04_30


-kccrga http://dbatrend.blogspot.com.au/

I have a delimited flat file that contains 4 coma separated columns ,Suppose i have added one more coma separted column in that text file?

$
0
0

Hi Frnz,

I have a text  delimited flat file that contains 4 coma separated columns ,Suppose i have added one more coma separted column in that text file? 

My question is below

 i read that coma separated that contains 4 columns flat file and load data into the table ,next time my one of the client will l add one more coma separted column.i.e 5 columns  into that text file,Here old data is alrady loaded into the table,But here i want to load new data into the same table with out no manval intervention..So how can i do this task hw should i know that flat file is updated and how to load the same file into the table without doing  any changes by any person....IN SSIS Package...

Can some please help me out 

Thanks.....

Viewing all 24688 articles
Browse latest View live


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