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

calling Oracle stored procedure with output parameters in OleDB command task

$
0
0

HI Experts,

I want to call "oracle" stored procedure with output parameter from SSIS ole db command task.

Actually I am able to successfully call the procedure but my Output value is not updating in the mapped column.

I used below PL/SQL query.

DECLARE
  IS_VALID VARCHAR2(200);
BEGIN
IS_VALID(
    PARAM1 => ?,
    PARAM2 => ?,
    IS_VALID => IS_VALID
  );

? := IS_VALID;
END;

If I try to supply "OUTPUT" word I get error:

"ORA-06550: line 1, column 45:
PLS-00103: Encountered the symbol "OUTPUT" when expecting one of the following:   . ( ) , * @ % & = - + < / >"

BEGIN
IS_VALID(
    ?,
    ?,
    ? OUTPUT
  );
END;

Please advise how to receive output parameter value of oledb command while calling oracle stored procedures.


umair_bs


Flat file destination columns are too wide (too many trailing spaces)

$
0
0

Good Afternoon,

I'm loading data from a sql server table into a flat file. The flat file connection manager has the following settings

GENERAL:

Format:Delimited

Text Qualifier:"

Header row delimiter: {CR}{LF}

Header rows to skip : 0

Columns:

Row Delimiter: {CR}{LF}

Column delimiter: comma(,)

Thanks

OnError Event Handler not firing

$
0
0
Hi,

I have created an OnError Event Handler to catch an error in the Execute SQL Task in the Control Flow. On error I am simply inserting a few parameters in a DB table using Execute SQL Task. I followed the instructions in: http://www.sqlservercentral.com/articles/SQL+Server/66387/
Now when I run this error hanlder task manually it runs fine but when I purposely fail the SQL Task it never fires the error handler. I am not sure why. I checked the DisableEventHandler property and it is set to False.
Is there anything else that I am missing?

Thanks!

Encrypt File in SSIS

$
0
0

Hai 

Is it possible to encrypt a file in SSIS using GPG or PGP.

I try to encrypt a file in SSIS using GPG the execute process task is executed successfully but the encrypted file is not generated.

Any one can you please help on this?

Thank,

Sruthi.

SSIS Package + SQL Job issue

$
0
0

HI All,

I have created 3 different SSIS Packages. All are executing well when I run as a package. I have created a SQL job and configured these 3 packages as step 1, 2 and 3. It was running properly.

For the past 2 weeks job is not running and am getting error as

"Error occured.
Details: Invalid Host: server name". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

Can you please help me on this issue?

Packages & stored procedures are running properly without any issues. job is throwing error within few second of start.

Regards,

Sudha V

SSIS excel data source numeric values returned as null

$
0
0
Hello everyone, long time no see!, I have a problem and was hoping someone can help me:
I'm using SSIS 2005 Enterprise edition,  I'm creating a package that reads an excel (xls) file using the "excel source" component, and it dumps the data into an OLEDB destination (a sql server).
When I drag the excel source component and create the excel connection to my file the component automatically reads the columns and their datatypes.

The problem is that I have a column which has numeric data and the package uploads as NULL every number that starts with a zero. (note: in excel this column is formatted as "text", despite it has only numbers, because it's the only way excel maintains the left sided zeros).
So I checked the data types by right clicking the excel source component -> show advanced editor and my surprise is that this column's data type is detected as double-precision float, and it doesn't let me change it.

I tried the answer posted here: http://devselekta.blogspot.com/2007/09/ssis-excel-data-source-values-returned.html but it only works when the first row of data has a number beginning with zero on this column.
Someone knows how to get the data imported correctly? Thanks in advance.
Odin_Dark

SSIS and SAP HANA

$
0
0

I am trying to Load data from Sql server 2012 using SSIS 2010 into an HANA Instance and this seems impossible.   I have managed to connect up using ODBC but it runs without error and inserts nothing.

SAP Just recommend there Data services application as expected but on this occasion I would like to make use of SSIS.

Firstly is it possible to do this ?  and How is this achieved can anyone please advise?

I have considered and looked for adapters if an upgrade of SSIS might help ?

Error : IDTSDesigntimeComponent100.AcquireConnections HRESULT: 0xC020801C during SSIS pkg creation

$
0
0

USING:

 - x64 
 - Windows server 2012 
 - SQL 2014 Enterprise Installation 
 - Visual Studio 2012 
 - SSDT for VS 2013

When I open a precreated package with same connection in SSDT for VS 2013 on same machine, I can open the connection and connect to the VFP source and I can preview the data.

However, building an SSIS package using the DTS components in VS 2012. This package has a FoxPro connection manager and with an OLDEDB datasource: DTSAdapter.OleDbSource.4

The Visual Fox Pro Driver needed does not come in x64 bit: VFPOLEDB.1

The errors I get:

    IDTSComponentMetaData100 component = CreateComponent(pipeline, DataFlowConstant.ComponentID.OLEDBSource);

The error:

    CManagedComponentWrapper componentWrapper = component.Instantiate();

After running that line of code the object has this error in it, but it doesn't throw:

Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))


Then when this line is called:

     componentWrapper.AcquireConnections(null);

This error is thrown:
- Exception from HRESULT: 0xC020801C
- DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER

                               

SSDT 2014 Dragging components causes it to scroll way down on the GUI

$
0
0
I find this highly annoying.  When I am dragging components in the GUI downwards, it scrolls VERY quickly.  There will be a ton of white space between what I am dragging and the rest of my components.  Is there any way to stop this behavior? I usually correct it using the alignment tool.

Table Partition using SSIS 2012

$
0
0

Hi 

Can anyone please tell me how can we create table partition and how can we use in ssis 2012.

Please provide me step by step so I will try to implement using given steps.

Regards,

Tejas

Component OLE DB Source has no inputs, or all of its inputs are already connected to other outputs.

$
0
0

I have a Data Flow Task. I have one "OLE DB Source" which gets my data from a SQL Server Database. I have a second "OLE DB Source" which uses DATEADD to derive a date qualifier that I would like to use as a date qualifier in my subsequent Excel spreadsheet...opting to use SQL Server and DATEADD rather than messing around with VB syntax to get the previous week date qualifier.

I am trying to connect the flow from one OLE DB Source to the next OLE DB Source and get the error...

Component OLE DB Source has no inputs, or all of its inputs are already connected to other outputs. You may be able to edit the component to add new inputs to it.

Can't I connect two completely different and independent SQL Server queries using "OLE DB Source" within my Data Flow?

Is there any way to store my derived date from my second "OLE DB Source" to a variable so that I cana then use that as my date qualifier within my Excel destination?

Thanks for your review and am hopeful for a rely.

Optimizing Extract and Import from Raw Storage

$
0
0

Hello,

We are building an SSIS package to deliver change from an on site SQL Server DB (2014) to Azure. To optimize the transference of data, we are extracting to raw files, compressing and then copying to Azure and then importing.

We are reviewing the settings for DefaultBufferMaxRows & DefaultBufferSize, to try and provide maximum throughput. Are there any guidelines for these settings?

Also, when importing data from the raw files to Azure DB, we are using OLE DB Fast Load. Under this destination component, we have the option to set Rows per batch and Max insert commit size. Running a profiler trace after changing these settings, shows that the commit size is actually restricted to the DefaulyBufferMaxRows setting. Is there any best practices around these options, or is it best just to keep them the same amount as DefaultBufferMaxRows?

Any advice gratefully received.

Many thanks,


Andy.

Executing an BCP command using XP_cmdshell in SSIS

$
0
0

Hello everyone

I have been searching but with no luck. 

I have created a BCP using xp_cmdshell that exports a column from a table to an text file:

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1;
GO
-- To update the currently configured value for advanced options.
RECONFIGURE;
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1;   -- 1 for at enable
GO
-- To update the currently configured value for this feature.
RECONFIGURE;
GO

-- Extracting information from the database
EXEC xp_cmdshell 'bcp "SELECT TcpIpAddress FROM [SIT-DVH].[dbo].[Preb_Idera]" queryout "C:\Output\Ip_output_Semi-colon.txt" -T -c -r;'


-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1;
GO
-- To update the currently configured value for advanced options.
RECONFIGURE;
GO
-- To disable the feature.
EXEC sp_configure 'xp_cmdshell', 0;   -- 0 for at disable
GO
-- To update the currently configured value for this feature.
RECONFIGURE;
GO

I want this script to be runned in SSIS. My idea is to:

1. Export the data to a text file that a 3 party program can read (the code from above)

2. Import the data from the 3 party program to a table

3. Create a view that joins the tables together. 

Also is it possible to make SSIS to wait for a file to exist og pressing "go" again before continuing the process? i am thinking of step 2. Ones the 3 party is done doing it works, it will create a CSV file with the data that will be imported to the DB. 

Thanks in advanced

where is 'Integration Services Catalogs' coming from?

$
0
0

Hi experts!

Quick doubt...

I need to modify a .dtsx that is inside ‘Integration Services Catalogs’; I tried right-clicking + exporting… But I only see ‘Configure’, ‘execute’ or validate options… I thought I could export it, directly from there, modify it and import it again…

Now I accessed the Integration Services from the same server name, and it’s not there… How can I find out, where is that package from? Or is there a way that I can export it directly from ssms?

Thanks in advance!!

SSIS 2008R2 Configurations Conundrum

$
0
0

Hi

An age - old question I know, but I'm trying to help a client currently with a historic set up overcome a limitation, and at the moment I can't think past the brick walls - perhaps because there isn't a way around it.

The current configuration set up, for many SSIS packages that ideally should not be changed, follows the pattern of

1) Load a Connection manager's connection string from an environment variable

2) Use that connection to fetch various settings and connections from a SQL Server table

The dev hardware architecture currently shares few app servers (SSIS) between many database servers.  As a result, using one app server requires the use of several service accounts, each with it's own user environment variable to separate the configurations being picked up for step 1) above allowing simultaneous executions to take place.

Ideally, without changing the packages in any way, we want to allow the passing in of the connection string at runtime (from the job engine) to avoid having to use environment variables at all.  This we have achieved easily enough by removing the environment variable and passing in a command line /CONN in the DTEXEC command.  Since the environment variable is not found, it is not used (just produces a warning) and the /CONN value is used.  The application order of configurations does not have a negative affect since the design time re-load at the final phase again does not find a env variable, so does nothing to override that passed in by /CONN.  /SET would behave similar in this respect, and overall we have achieved the effect of removing the env variable reference without having to touch any packages.

The issue arises when using this technique in the OAT environment, where the OAT service account does not have permissions to the connection strings as saved in the package at design time.  Therefore:

1) Phase 1 loads the design time env variable (no longer exists, nothing is changed).  Then attempts to apply the settings from the SQL table using the saved dev connections (gets permissions error)

2) Phase 2 loads the /CONN value, succeeds

3) Phase 3 changes nothing as the env variable doesn't exist, and re-uses the /CONN setting.  All good.

The package then runs it's tasks successfully, but returns an overall failure result to the job engine due to the permissions error generated during phase 1.  Adding the env variable back of course does not help unless it is correct (defeating the object).  We can't use a "generic" config here either as ultimately it is the one that gets applied in phase 3.

Any ideas on how this can be worked around, without modifying the many packages (or granting permissions on Dev servers to OAT accounts).  Unfortunately the SuppressConfigurationWarnings package property does not help with errors - but if there was a way just to ignore config errors this might be acceptable.

Thanks for any help!


Varchar(max) equivalent in SSIS

$
0
0

Hi All,

          I have a column in my table that is of varchar(max) datatype, when I try selecting the same using a ExecuteSQLtask and assign it to a variable of String datatype, its failing with the error,

[Execute SQL Task] Error: Executing the query "Select [Path] from PARAMETERS where [Name] = 'List File'" failed with the following error: "The type of the value being assigned to variable "User::list_file_path" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

What is the equivalent datatype, is String not good enough? Is there something I am missing out here ?

If someone has gone through this and figured out a solution please help....

Developing SSIS Package with Visual Studio 2012 DTS objects, fails at componentWrapper.AcquireConnections(null); with DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER

$
0
0

I am developing an SSIS package through the DTS object model in C# with VS 2012. I am on a Windows Server 2012 machine, with SQL Server Enterprise 2014 (x64).

One of the connection managers in this package is for Visual Fox Pro. The driver for it is installed correctly. But I am led to understand that this driver is 32bit only.

I have set the csproj property for the project that generates the pkg to be x86 under Build tab because I have seen this suggested elsewhere.

I have also set the tester project to be x86, just to account for x86-ness in the dependency chain, just in case.

I do not know if that is enough to make the code, while running in VS debug to behave as if the package itself were set to run in 32bit mode.

After all this, the package creation code runs as expected EXCEPT when it comes time for final piece which is this call: componentWrapper.AcquireConnections(null);

When that call is invoked, this error is thrown:  

HRESULT: 0xC020801C

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER

All my projects in the solution have SNK signatures. I have registered all DLL's with Microsoft.Net MSIL Assembly Cache (GAC).

I have not registered Exe's in the GAC though. Not sure is this can be an issue.

Bottom line is that this is not working for me at this point and I'm looking for any advice in the proper direction.

Thanks!

By the way, I can MANUALLy create an SSIS Pkg using the same drivers and it works using SSDT. But my requirement is pkg creation though code.


Attempting to export a SQL Server Result Set to an Excel spreadsheet

$
0
0

So I am trying to export my SQL Server Result Set from "OLE DB Source" to an Excel spreadsheet. This was working fine when I hard-coded the Excel spreadsheet path and file name. But now I am trying to create an Excel spreadsheet and file name using a variable...@ExcelFullyQualifiedName.

My "Excel Connection Manager" is defined with the following Properties...

  • DelayVaildation = True
  • Expressions and Connection String ==> "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::ExcelFileFullyQualifiedName] + ";Extended Properties=\"Excel 12.0 XML;HDR=YES\";"

"Excel Destination" Properties...

  • ValidateExternalMetadata = False
  • Custom Properties ==> AccessMode = OpenRowset From Variable
  • OpenRowsetVariable ==> User::ExcelFileFullyQualifiedName

When I attempt running my Package I am getting this error...

Error: 0xC0202009 at Data Flow Task, Excel Destination [100]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
Error: 0xC0202040 at Data Flow Task, Excel Destination [100]: Failed to open a fastload rowset for "\\server\fileshares\shared\Export Data\Export_Week_Of_2015_11_01.xlsx". Check that the object exists in the database.
Error: 0xC004701A at Data Flow Task, SSIS.Pipeline: Excel Destination failed the pre-execute phase and returned error code 0xC0202040.

Can anyone help me out here?

Thanks for your review and am hopeful for a reply.

Dw Load tool comparison

$
0
0

Hi Experts,

I have experience working on SSIS and currently management is pushing to do DW development using Pentaho.

Could you please enlist some key reasons why SSIS should be preferred over Pentaho and vice versa so decision makers can recheck before making the final call.DW will be build up on SQL Server only.Honestly i have a good feel for SSIS as i have worked on it and not sure about Pentaho.

Thanks

Priya

check if excel file is opened or not -SSIS script task

$
0
0
Hi all ,

Now I'm trying to implement logic to check if excel file is opened or not if open send out email in Script task. Can anyone provide the code for this one? using c#

I'm using this one but it's not working fine. always give me file is opened

public void Main()
        {
            Boolean FileLocked = true;

                // Check if the file isn't locked by an other process    
                try
                {
                    // Try to open the file. If it succeeds, set variable to false and close stream     
                    FileStream fs = new FileStream(Dts.Variables["User::varmFilePath"].Value.ToString(), FileMode.Open);
                    FileLocked = false;
                    fs.Close();
                    Dts.TaskResult = (int)ScriptResults.Success;
                    MessageBox.Show("File is closed");
                }
                catch (UnauthorizedAccessException ex)
                {
                    // If opening fails, it's probably locked by an other process     
                    FileLocked = true;

                    // Wait two seconds before rechecking
                    Thread.Sleep(2000);
                    MessageBox.Show("File is opened");
                }


        }

austin

Viewing all 24688 articles
Browse latest View live


Latest Images

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