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

Variable don't recognized. Not found in the variable collection.

$
0
0

Hi guys, I am literally getting crazy with an error that I can understand the reason. I even wrote an article on this kind of process and now I am stuck on it.

Process: Reading a select count from a query and passing the variable to a send email task. Easy but..

Why?! Why this error? The variable is in the variable collection!!

Any suggestion? Thanks (I'm getting crazy on it)


Upgrade packages from 2008R2 to 2014/SSDT2013

$
0
0

We are going to upgrade our environment from 2008R2 to 2014. This means both database engine and packages will be upgraded to 2014 and SSDT2013 respectively.

Has anyone experienced this scenario? Can you give me some advise or checklist before upgrading packages or if possible TSQL/store proc changes/testing. 

How do you have done testing after upgrading packages for result scan (output comparison with 2008R2 packages)?

Any recommendation besides running upgrade advisor?

Thanks in advance! :)

 

ZK

SSIS -2012 Dynamic unpivot

$
0
0

HI EXPERT , 


I am working on SSIS 2012 .

Excel as a Source .

I have a data in excel file which contain revenue generated by Employee for client 


Client  Emp1  Emp2

ClientA    10      20
ClientB    30      40

But number of "Emp" coming in Excel file is not fix , next month I could get revenue for EMP1, EMP2, EMP3

This is the case of Dynamic unpivot in SSIS .

How to achieve this ?

view with parameter

$
0
0

hi

i need to use view in oledb souce, but i want to pass parameter in my view and then create flat file from it

like startdate of current month and end date of current month

i dont see any parameter i can pass in oledb source.

what should i use

Can I use an OLE DB Command Task to call a parameterized stored procedure, perform some data editing and pass variables back to the SSIS for handling?

$
0
0

I am using a Data Flow and an OLE DB Source to read my staged 3rd party external data. I need to do various Lookups to try and determine if I can find the external person in our database...by SSN...By Name and DOB...etc...

Now I need to do some more data verification based on the Lookup that is successful. Can I do those data edits against our SQL server application database by utilizing an OLE DB Command? Using a Stored Procedure or can I sue straight SQL to perform my edit against every staging row by using a parameter driven query? I'm thinking a Stored Procedure is the way to go here since I have multiple edits against the database. Can I pass back the result of those edits via a variable and then continue my SSIS Data Flow by analyzing the result of my Stored Procedure? And how would I do that.

I am new to the SSIS game here so please be kind and as explicit as possible. If you know of any good web sites that walk through how to perform SQL server database edits against external data in SSIS or even a YouTube, please let me know.

Thanks!

Can not edit a "Script task" with error message

$
0
0

TITLE: Microsoft Visual Studio
------------------------------

I try to edit the vb.net script in script task that I developed and get this message.

Any idea what happen and how to fix this.

Cannot show Visual Studio 2008 Tools for Applications editor.

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

Failed to create project at location "C:\Documents and Settings\pchen\Local Settings\Temp\2\SSIS\78a8360ded6b4c719c8aae52ac7483bb"! (Microsoft.SqlServer.VSTAScriptingLib)

------------------------------

The given path's format is not supported. (mscorlib)

 

How do I edit (import into VS 2012) an SSIS package that was deployed in SSISDB

$
0
0
 

Greetings,

I inherited an SSIS package that is already deployed and scheduled.

Using the Microsoft SQL Server Management Studio, I can see that the package was deployed to Integration Services Catalog and resides in the SSISDB.

I am working directly on the server desktop with SSMS and Visual Studio 2012.

I'd like to open this package (the one that is actually deployed) in VS in order to test it and repair any issues if necessary (and then re-deploy it, etc.)

How can edit a package that has already been deployed?  I tried exporting the Project from its deployed SSISDB location using SSMS, but when I do this it creates a file that takes me through a wizard that wants me to deploy the package to a server again. My goal is to edit a package from a deployed source.... not sure how to get it into VS for review/editing. 

Many Thanks!


replace , with pipe in csv files

$
0
0
in ssis packages change , with | in csv file 

fistdate and lastdate of the month in ssis vaiable

$
0
0

hi

i  have 2 variables startdate and enddate of datetime data type.

i want first date of current month and last date of current month.i am using following expression 

(DATEADD("D",-(DAY(DATEADD("M",1,GETDATE()))),DATEADD("M",1,GETDATE())))

DATEADD("D",-(DAY(DATEADD("M",1,GETDATE()))),DATEADD("M",1,GETDATE()))

now i dont want time here just date ,if i am using (DT_DBDATE)(expression),its giving error "Cannot be converted"

any help?

Excel in SSIS: How to import a column that may have more than 255 characters when DT_NTEXT causes failures?

$
0
0
OK, so my latest project requires loading an Excel 2007 spreadsheet into a SQL Server table. I'm working in SSIS 2008R2. Based on some stuff I found on the internet, I opened the Excel source in Advanced editor and changed the datatype of the long column to DT_NTEXT, so that it wouldn't truncate it. Then I made the database column VARCHAR(MAX). This runs correctly in debug mode on my laptop.

Then I deployed it to the development server and attempted to load the same test file. It failed with the following error messages:

Error: Code: 0xC0208265       Source: Main Data Flow Task Get Main Data [1]       Description: Failed to retrieve long data for column "DESCR".
End Error
Error: Code: 0xC020901C       Source: Main Data Flow Task Get Main Data [1]       Description: There was an error with output column "DESCR" (72) on output "Excel Source Output" (9). The column status returned was: "DBSTATUS_UNAVAILABLE".
End Error
Error: Code: 0xC0209029       Source: Main Data Flow Task Get Main Data [1]       Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "output column "DESCR" (72)" failed because error code 0xC0209071 occurred, and the error row disposition on "output column "DESCR" (72)" 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.
End Error
Searching for information about the error, I found about a million sites offering the same three suggested solutions:

1. Add 'IMEX=1' to the extended properties of the connection string.
It was already there.

2. Change the TypeGuessRows key in the registry.
This was set to zero on the server, which I understand to mean that it should look at the entire file. Nevertheless, I changed it to 8 to match my laptop. The same error occurred when I ran it again. Then I changed it to 1,763, which is more than the number of rows in the spreadsheet. It still gave the same error. So, I put it back to zero. (There's a 1,900-character value in the first row of my test file, so it shouldn't really matter how many it checks, in this case.)

3. Change the datatype to DT_WSTR(4000) in the source.
The column is supposed to have up to 10,000 characters, so I'm not sure this would be a good idea even if it worked. However, I tried it anyway. This time it gave me a truncation error. I changed the truncation error disposition to "ignore failure" and it loaded the data, but truncated the value to 255 characters. I have verified that the length is 4000 and doesn't get changed when I save the file, but it's still truncating at 255 characters.

I have no idea what else to look at. Any help would be appreciated.

SSIS xml configuration file not working

$
0
0

Hi,

I have a package that loads data from oracle to sql server . The package runs successfully in the visual studio. BUt to be able to schedule automated job, i have created the package configuration  but that's not running at failing with error below.

Error: 0xC0024108 at Package1, Connection manager "SSQLConfig": The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager.

I have created the xml config file and also created sqlserver configuration table to store the data connection info.

the config file has the following info. regarding connect string 

<?xml version="1.0"?><DTSConfiguration><DTSConfigurationHeading><DTSConfigurationFileInfo
 GeneratedBy="yyyy\yyyyy" GeneratedFromPackageName="Package1" 
GeneratedFromPackageID="{DFD3B752-F35B-4773-8DDA-48DA66C71877}" 
GeneratedDate="1/27/2015 10:44:45 PM"/></DTSConfigurationHeading><Configuration ConfiguredType="Property" 
Path="\Package.Connections[SSQLConfig].Properties[ConnectionString]" 
ValueType="String"><ConfiguredValue>Data Source=xxxxxxx;
Initial Catalog=MSTR_WH;Provider=SQLOLEDB.1;Auto Translate=False;Application
 Name=SSIS-ETL Process to pull data-{E34BA5B6-71CC-4E98-AD43-5D5CDFF0F8BA}xxxxxxx.MSTR_WH.MSTRWH;
</ConfiguredValue></Configuration></DTSConfiguration>

even the oracle connection is not working because the config file itself is not working to connect to the configuration table i believe.

Error: 0xC0202009 at Package1, Connection manager "lifenote.userid": SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "OraOLEDB"  Hresult: 0x80004005  Description: "ORA-01005: null password given; logon denied".


Can someone help resolve this? 

Thanks

SSIS Framework benefits and drawbacks

$
0
0

Hi guys,

I have a customer that asked me if a SSIS Framework could help them automate somehow the creation of packages for new dimensions because the process of dimensions is pretty similar.

What can a SSIS framework do in a low complex project that has less than 10 dimensions and 5 fact tables that can help? Isn't the new SQL Server 2012 SSIS catalog features able to log and analyze issues?

I'm probably missing the point, so please advice.

Thank you


SSIS Script task and web service, how to change URL when dynamic

$
0
0

I have a script task that accesses a web service. I cannot use the web service task as I need to set header information which is not in my sample below.  In the code window i set a web reference to my web service and the URL is set to dynamic. I need to change this URL based on environment. The URL appears to be stored in the app.config file. My question is how do I change this value on the fly? I can pass in variables to the script itself but do not see a way to modify the app.config file. I have seen other examples but none meet my requirements.

Here is my code and the configuration file example. Is there a better way that I am not aware of?

This is a simplified example

TestWS wsCall = new TestWS();

int returnValue = wsCall.DoSomething();

App.Config File

I am trying to change the Value of the URL at runtime

 <applicationSettings>
        <ST_ebae43bfbdb74b829486e1f379544e4f.csproj.Properties.Settings>
            <setting name="ST_ebae43bfbdb74b829486e1f379544e4f_csproj_TestWS"
                serializeAs="String">
                <value>http://localhost:1485/TestWS.asmx</value>
            </setting>
        </ST_ebae43bfbdb74b829486e1f379544e4f.csproj.Properties.Settings>
    </applicationSettings>



Parallely run Packages

$
0
0

Hi All,

We have to run 500 Packages in parallel and the packages are not related to each other. Please advise the best approach to do this. Do I have to use multiple instances in case I have to transfer all the data from 500 packages in say 10min.

Thanks in Advance.....


Script component to aggregate two variables in one variable

$
0
0

Hi guys, do you have an idea how I can build a variable (to pass to a send email task) from different variable?

Scenario: select player, team from forum

I already set up the variable P (Full Result Set) as object, and the variable P1 (string) and P2 (string). I set up the variable mapping in my Foreach loop container, now I'm trying to set up a scrip component (I am zero in .Net or C#). Anyway I built this code

  public void Main()
        {
            // TODO: Add your code here
            MessageBox.Show(Dts.Variables["P1"].Value.ToString());
            Dts.TaskResult = (int)ScriptResults.Success;
        }
    }
}
  

but it's a simple messagebox. What I need is to retrieve all the row from the select as one variable. I ran into this sample yesterday but now I can't find the website.

Any suggestion? Many Thanks


What is the difference between Execute SQL Task and OLE DB Command

$
0
0

Besides the obvious, Execute SQL Task being used in Control Flow, andOLE DB Command being used in Data Flow what is the difference between the two? Is one supposed to useExecute SQL Task to produce a result set that then gets handed over toData Flow and OLE DB Command ? Everything that I have seen onOLE DB Command is pretty much execution of a Stored Procedure with ? parameters. It seems as though I got to a point where I had to perform my data edits pretty much entirely in a Stored Procedure executed byOLE DB Command rather than trying to use the SSIS GUI for everything. I didn't really see in any of my Google searches out there that simply usedOLE DB Command as a straight parameterized SQL against tables for editing and cleansing purposes and handling returns back from SQL Server for COUNT(*), etc..

I know I have posted multiple forums out there regarding this issue but I cannot seem to get a straight answer and some solid direction. So for now, myExecute SQL Task gives me my editable result set and then control is handed off toData Flow and ultimately to my Stored Procedure executed by an OLE DB Command  which pretty much does the chunking for me and performs my data edits and handles my record anomalies through SQL Server Table data stores accordingly or sets flags accordingly if the data passes.

I welcome your thoughts and Thanks for your review and Thanks in advance for any replies and direction that anyone might provide.

 

Multi Version Environment, 2012/2014 - Visual Studio Projects

$
0
0

I'm at a big shop with different environments in different versions of SQL.  I have SQL Server Enterprise 2012 and I have Visual Studio solutions for SSRS/SSIS/DB all on 2012 for a code base that will be applicable to 2012 and 2014 (meaning we plan to use the same "solutions" on both as there is a lot of core code that we deploy).  I am hearing many reports that SSIS projects get updated when they are opened in Visual Studio 2013 and SQL 2014 despite no change to SSIS in 2014.  

1. Given SSIS's challenges... My question is, would it be best to just forgo using Visual Studio 2013?  Will all of my 2012 SSIS/SSRS/DB projects deploy nicely to a 2014 environment?  Is there a cleaner option?  I don't want to maintain 2014 and 2012 solutions unless I'm forced to.

2. I have a fat client install base of Report Builder installed on some user machines.  Can I just point my users to Report Builder for 2012 to hit both 2012 and 2014 instances of SQL?  I'd prefer this so that reports RDL's are compatible with both as we have many reports that will go on both environments.

Thanks,

Keith

SSIS package that will create automatic a excel file for every city?

$
0
0

I am doing a SSIS package, that will read the Data from the SQL table and will create a Excel file for every city of a country, in that file will keep all the information of that city. My Question is how you create about 175 Excel file, I know  how to create 2 or 3 with the Conditional Split ? but 175

For Example  : I have the following fields in my SQL table

Name-->John, Last name ->Smith, Address->M street, city->Miami

so I will have to create a Excel file with the data of the people for each city


Converting .xlsx file to .xls or csv format in SSIS

$
0
0

Hi - I have a requirement to convert the .xlsx file to .xls or .csv format through SSIS.  Please tell me how can I achieve it in SSIS.

thanks

SSIS Conditional Split small problem comparing dates

$
0
0

Hi All,

I have an SSIS package that i'm trying to write that is pretty basic: reads from a csv, I want to filter the incoming rows to only insert rows from yesterday, then load into db.

I have a Flat File Source --> Conditional Split --> OLE DB destination

In the Conditional Split however, I am having problems trying to create the condition that will only insert rows where [date] column is of yesterday.

The [date] column however, is a varchar column in the format yyyy-mm-dd so I figure I have to convert/cast it to a date or datetime.

I tried using this but I cant get it non-red!

DATEPART( "DAY", CAST([Date] as datetime)  ) ==  DATEPART( "DAY", getdate() -1)

The error is:

Attempt to parse the expression ,,, failed. The expression might contain an incomplete token, invalid token or an invalid element.

if I take that and put it in a select, it works fine, but within the Conditional Split I don't quite know the proper syntax

Thanks in advance

Viewing all 24688 articles
Browse latest View live


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