CRISTINA& MICROSOFT Forum
Does Caml can be use in ssis script?
Executing an SSIS package from TSQL without using xp_cmdshell?
How can I execute an SSIS package from TSQL without using xp_cmdshell?
I have a web-app which calls some SQL which executes my SSIS package (a DTSX file, but stored in the server). But the security policy for my application won't permit me use to xp_cmdshell.
I want to do this:-
DECLARE @returncode int
EXEC @returncode = xp_cmdshell 'dtexec /sq pkgOne"'
Is there another way for executing a Package without going to the command line (e.g. is there some other system stored proc)?
Thanks
Help Passing Complex Variable Types to a Web Service Task
I need a little help here and appreciate any insight into this issue.
I am building an SSIS package that retrieves data from a database to use in a web service task. So let me give you a little more broad overview of the package so you can understand how this is supposed to roll. A database is queried and those values are dumped into a recordset. A foreach loop uses each row of variables to call the web service and dump the returned values to another database. The first database holds a bunch of fields, but the four fields of interest are: a StartDate (DateTime), a StartFormat (single char), an EndDate (DateTime) and an EndFormat (single char). The output from the query of the first database is the input in the signature of a web service's .Load method. Sounds easy, right? Sure, why not?
Well I dragged the Web Service Task on to the pane and took a look inside. Lo and behold, I can hardcode the variables in for the web service or I can assign the inputs to package variables. How fancy, thanks Microsoft!
But that's where the difficulty begins. The method call for the web service looks like this: service.Load(string, int, GTTimestamp1, GTTimestamp2). The web service is expecting a string, an int, and two objects of the type GTTimestamp, which is a very simple class defined as this:
<System.Xml.Serialization.SoapTypeAttribute(
"GTTimestamp", "http://util.gtdw.pci.com")> _Public
Class GTTimestampPublic calendar AsDatePublic displayFormat AsStringEnd
ClassIn the input pane for the Web Service, when I click in the value of the two GTTimestamps like I'm going to hardcode them in, another window pops up saying "Enter the values for complex type -in4" and the pane looks exactly like the previous pane with one very important exception: There is not place to check to assign the value from a package variable!!! Dang you Microsoft!!! I don't really understand why they would leave us out to dry on this... Oh, well, maybe they'll take care of it later...Time to work around it.
SSIS does allow you to create a variable of type System.Object, so after playing with the Web Service for a few minutes and giving up on that, I decided to create a script task that is supposed to create two GTTimestamp objects and assign them to two object variables in the package for passing to the WebService Task. The first challenge was to get the web service to play nice with the script. For those who have never done this, use a command prompt and the wsdl.exe to generate a .vb or .cs file to add to your script file using the right click, add existing item...
Once the file was accessable to my scripts, I created two GTTimestamp objects and assigned them to the Package variables of type System.Object. Running the package, I got this error:
"Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Type 'ScriptTask_8c868490237b4220b582bdc7c7a3ecae.GTTimestamp' in assembly 'VBAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Not marked as serializable, huh. Okay, so I made the GTTimestamp serializable by adding the <Serializable()> before the class declaration. Then the error changed to:
The error is: Type is not resolved for member 'ScriptTask_8c868490237b4220b582bdc7c7a3ecae.GTTimestamp,VBAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
And here I am, at a loss for what to do from this point. I'm a little lost, so I thought I'd stop and ask for directions. I'm sure I'm not the first to want to use complex variable types.
Only two options at this point. One is to try and store the GTTimestamp in the database and see if SSIS can deal with that. I'm not sure how to store objects in a database or if that is even an option for me, but it came to mind so it made it into this post. The other is to get this to work through the script above that I have run into a wall.
Again, any help is appreciated. Thanks for your time.
SSIS 2012 project deployment and sensitive parameters
hi all, i was under the impression that with the new SSISDB functionality, you can now store sensitive information for deployment at run time. So with setting up environments etc. you can then have your connection strings set for each environment and access them at execution. Let me run a scenario past you. I have an SSIS package that connects to Salesforce. For security purposes, the production connection string i wish to store in SSISDB as sensitive. At runtime, obviously i want to overwrite my project parameter to supply the connection string from SSISDB. However i get this message below
and from googling around it looks like this cannot be done. What the **** is the point of having the functionality of storing sensitive information in SSISDB if it is unaccessible?!?! I hope i am missing something obvious and if so i will face plant my keyboard repeatedly! ;) What is the recommended practise for storing sensitive passwords in the new project deployment model??? Thanks!
How to access first datarow in a column with SSIS Script task Editor with VB code
Hi!
I havent used Scripts very often in ssis but i need to get the first data value from a specific column in a table and set that value as the value for a variable. So far i maneged to set the variable to 2014 P3 or any value i write in the code below. But i wonder how i should adjust the code so it automatically takes the first value from the column Period from my example below. anyone that could help me with this?
Br
Arne
Public Sub Main() ' Dts.Variables("UserPeriod").Value = "2014 P3" Dim UserPeriod As String = Dts.Variables("UserPeriod").Value MsgBox(UserPeriod) ' Dts.TaskResult = ScriptResults.Success End Sub Period Value 2013 P1 10 2013 P1 20
Arne Olsson
Fail to build SSIS/SSAS projects via VS2012 command line (devenv.exe) with SSDT BI tool installed
Hello,
I installed recently released SSDT BI tools for VS2012 and I can work on my existing SSIS/SSAS projects all well in VS2012. But when I try to build my SSIS/SSAS projects via the command line of VS2012, such as
devenv.exe mySolution.sln /rebuild Release /out "C:\temp\buildLog.txt"
I will get the error like below in the log file.
Error: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Is this a known issue? If yes, any fix has been planned?
Thanks
Jimmy
How to insert VBscript in Script task in SSIS for Format Excel-columns?
I want to format the Excel columns by My macro code( it is VB)
the code is
SubDBMatch_InputFormat()' 'Macro recorded 8/8/2011by ngrant' Columns("A:G").Select Selection.NumberFormat = "@" Columns("G:G").Select Selection.NumberFormat = "mm/dd/yyyy" Columns("H:H").Select Selection.NumberFormat = "mm/dd/yyyy" Columns("I:I").Select Selection.NumberFormat = "#,##0.00" Columns("J:M").Select Selection.NumberFormat = "@" Columns("N:N").Select Selection.NumberFormat = "mm/dd/yyyy" Columns("O:AO").Select Selection.NumberFormat = "@" Set currentWorkSheet = ActiveWorkbook.Worksheets(1) usedRowsCount = currentWorkSheet.UsedRange.Rows.Count For Row = 1 To (usedRowsCount) Cells(Row, 42).Value = "1" Next Row End Sub
I want to insert in Sript component-Edit Script
File path+name and Sheet:"C:\Users\Healthcare\Desktop\DB_INPUT_12162013.xls" and Sheet1
Can u guide me on Readonly variable: ?
Readwrite variable ?
Please provide Edit script (by consider above code) ?
Please help me.
Thanks
-MADHU
SISS package output using DTEXEC command
Hello,
I need a help in executing SISS package using DTEXEC command
Here is the command i use
DTEXEC.EXE /F "C:\\excel_to_table.dtsx" /set \package.variables[filepath].Value;"C:\sample.xlsx" /set \package.variables[servername].Value;"000.000.000.0" /set \package.variables[database].Value;"Databasename" /set \package.variables[username].Value;"username" /set \package.variables[password].Value;"password"
In the package, I'm inserting the rows into a table. Now i want to display the number of records imported and number of duplicate records. Is it possible to get the values and display as result in command prompt.
Please advice.
Thanks,
Venkat.
Best Regards, Venkat
How to run 2012 SSIS package passing in starttime and endtime parameters.
Need to trigger DTS package that will collect logs passing in starttime and endtime. I have package created with many Project parameters and deployed to SSSIDB using project deployment of SSIS2012. How can I trigger this manually?
Tried using Dtexec with /isserver option but it always complains that packagepath is not correct.
with /f option , its complaining that connections with guid not found. I have many connections and params , what am I doing wrong here.
Appreciate any feedback ASAP.
Data Flow Task: Excel Source, out of syncronisation Error
Hello Everybody,
I use an Excel Source to import data. The SSIS task works properly as long as all fields in the first data line are filled. But some of the data fields are optional and can be empty. That's no problem as long as the empty fields occur in row two or later. If the empty fields occur already in line one I get the I tried to change the advanced settings of the Excel Source and switch the datatyp from double-precsion float (DT-R8) to unicode string (DT_WSTR). But then I get afterwards problems if I want to convert the data to the format of the respective fields in the database. The same happens if I adjust the sample file.
What I would need is something like a nullable setting. But that's not possible, right? Alternative I can change the order of the rows upfront (what I'm doing manually at the moment), but this is not a proper solution.
Is there a best practice how to handle such an issue?
Thanks in advance for every hint.
Best regards
Boris
Mapping column names stored in a table to one data table dynamically
Hi everyone,
Can someone help me - I am trying to import different file types (CSV, TXT, XLS) into a common table.
The column mapping for the input files is mapped in a look up table - so file 1.txt can have columns order as 12345 while file 2.csv can have columns order 54321.
How would I dynamically set up the correct mapping depending on which file I am busy with in my foreach loop. (an example would be much appreciated - I am relatively new to SSIS and have a deadline coming up)
Thanks,
How to extract 3 SP lists from each of 100 SP sites?
Thank you in advance for your help. I am familiar with SSRS but only beginning to work with SSIS, so a high level response may be all I need. We have project data in a SQL Server db (MS Project Server 2010 Enterprise Reporting Database) and ancillary data in SharePoint 2010 Enterprise (a primary site for each project, each of those having three lists of interest). We use SSRS and its SP connector to pull data from both sources. It works great in development but the SSRS SP connection fails when everything is deployed to our report servers, so we are exploring using an SSIS package instead to extract the list data from SP and load it into three tables in SQL server. (The SSRS report would then stop using the SP connector and just pull that list data from these three SQL tables instead.)
We installed the SP source and destination sample application from Codeplex and created a package that successfully loads three SQL Server tables with data from one project site. Now we wonder how we can drive that package through all the project site URLs, appending to the three SQL Server tables each time.
It’s easy with T-SQL to create a table with the URLs and list names, and twe could replace he hard coded URL and list names in the package with variables or configuration parameters to accept those values. But we don’t know how to “drive” or trigger the package for every URL. Can the list exist in SSIS and drive an extraction for each URL and list name? Or does the list reside in another process (like a T-SQL query) that triggers the SSIS package for each URL and list name?
Thanks again for your help.
Attunity connector for SQL 2012 -
Hi,
I am setting up a SQL 2012 environment on windows server 2008R2 64bit. Does the instructions in the link also apply for 2012 or does anyone know of an equivalent guide for 2012 anywhere? I looked but can't find one myself.
http://technet.microsoft.com/en-us/library/ee470675%28v=sql.100%29.aspx
Its the installation bit I am particularly interested in i.e. is the below correct:
Installation: The Oracle client software must be installed on the computer running SQL Server Integration Services (SSIS)Oracle database versions 9.2.0.4 and higher are supported Additional considerations for 64-bit environments: On 64-bit platforms (both x64 and IA64), you need only install the Attunity Oracle 64 bit connector for the appropriate architecture (x64 or IA64). You should not install the Attunity Oracle 32 bit connector alongside the 64-bit versions, because the 64 bit connector installs both 32-bit and 64-bit versions.The Oracle 32 Bit client is required in order to develop packages on a 64-bit computer because SQL Server Business Intelligence Studio runs in 32-bit mode. The Oracle 64 Bit client is required in order to run packages on a 64-bit computer. If you run the package in 32-bit mode, you do not need the Oracle 64 Bit client. In summary, if you want both to develop and to run SSIS packages on a 64-bit computer: Install the Attunity Oracle 64 bit connector.Install the Oracle 11G 32 Bit client.Install the Oracle 11G 64 Bit client.Restart the computer after the Oracle installations are complete.You should be able to develop and run SSIS packages. If after completing these steps you still experience functional issues, you can use the SQLPLUS Oracle utility to connect to the database in order to confirm that the client was installed properly.
Thanks
SSIS job performance issues
Hi,
I have an SSIS job that runs a view and the data output from that view is populated into a table on a different database on the same server.
Until about two weeks ago this was taking less than 45 minutes to run but it now takes over 9 hours.
So far in my investigation it seems that the slow part of the process is in the populating of the data into the table on the other database. When I run the view query on it's own it completes in 57 seconds.
How do I investigate this and hopefully speed it up?
Oh, by the way I'm using SQL Server 2008 R2
Thanks
Paul
SSIS and VS2013 and SQL Server 2008r2
So I am about to work an SSIS project that started it's life with 2008r2, I do not know what version of VS it was written with.
I'd like to upgrade to 2013 and and complete the project with it.
So my question is, is VS2013 compatiable with Sql Server 2008r2.
Thanks.
SSIS 2012 is intermittently failing with below "Invalid date format" while importing data from a source table into a Destination table with same exact schema.
We migrated Packages from SSIS 2008 to 2012. The Package is working fine in all the environments except in one of our environment.
SSIS 2012 is intermittently failing with below error while importing data from a source table into a Destination table with same exact schema.
Error: 2014-01-28 15:52:05.19
Code: 0x80004005
Source: xxxxxxxx SSIS.Pipeline
Description: Unspecified error
End Error
Error: 2014-01-28 15:52:05.19
Code: 0xC0202009
Source: Process xxxxxx Load TableName [48]
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Invalid date format".
End Error
Error: 2014-01-28 15:52:05.19
Code: 0xC020901C
Source: Process xxxxxxxx Load TableName [48]
Description: There was an error with Load TableName.Inputs[OLE DB Destination Input].Columns[Updated] on Load TableName.Inputs[OLE DB Destination Input]. The column status returned was: "Conversion failed because the data value overflowed
the specified type.".
End Error
But when we reorder the column in "Updated" in Destination table, the package is importing data successfully.
This looks like bug to me, Any suggestion?
annot insert the value NULL into column 'Total', table 'tempdb.dbo.#ERTotal____________________________________________________________________________________________________________00000025E0B3'; column does not allow nulls. INSERT fails.
I inherited the following sp and i am getting the followint error
annot insert the value NULL into column 'Total', table 'tempdb.dbo.#ERTotal____________________________________________________________________________________________________________00000025E0B3'; column does not allow nulls. INSERT fails.
I am pretty new to sql and having a hard time getting this stored proc to run again.. Can anyone help?
set @GrandTotal =(Select
SUM(a.[Total]+ b.[Total]+c.[Total]+d.[Total]+e.[Total]+f.[Total])
from #Level1 a,#Level2 b,#Level3 c,#Level4 d,#Level5 e,#Level6 f)
Set @GrandVisits = (Select
SUM(a.[Visits]+ b.[Visits]+c.[Visits]+d.[Visits]+e.[Visits]+f.[Visits])
from #Level1 a,#Level2 b,#Level3 c,#Level4 d,#Level5 e,#Level6 f)
Set @GrandAvg = (@GrandTotal/@GrandVisits)
insert into #ERTotal
([Level],[Visits],[Total],[Avg])
(Select'Totals',@GrandVisits,@GrandTotal,@GrandAvg )
How to load delta rows
Good Morning ,
I have an SSIS package in TEST and that loads data from the source into the warehouse. This job runs every day. The records wont be repeated as each new day its new set of records. For example on February 1st if there are 1000 records in the source db my package will run and load all the 1000 records into the destination table. The next day on February 2nd the source db might have 800 new records or maybe NONE. How can i acheive the following :
1) Just load the NEW set of records (800 in the example i provided above) (i do not want to use TRUNCATE in the EXECUTE SQL TASK as these records are in largenumbers).
2) If there are no new records for that day , my package shouldnt load any records in the above example (1000 old records).
Please need advice.
Thanks
Get rid of this error
How do I get rid of this? The pkg is copied from one server to another. Multiple devs worked on it. The pkg gives error every time it opens.
Thank you
How do I upload a CSV file with embedded quotation marks into a table via ETL
I'm having a problem importing a CSV file via ETL that contains double-quotes, and prior solutions aren't helping. My data looks like this:
A | B114SA | CHLORASCRUB SWAB INS SUBASSEMB |
A | S273SA | CHLORASCRUB MAXI INS SUBASSEMB |
A | 2AB286 | WEB ZEE ANTISEPT 5410\4.5" CD |
A | 2AB512 | WEB PDI PVP IODINE PREP PAD 3870/4.5 |
A | 2AB542 | WEB ZEE CLEAN WIPE NP5410/4.5 |
If I set the "Text Qualifier" to ' " ', then run it, it falls over on the third row, with the following error:
- Executing (Error)
Messages
Error 0xc0202055: Data Flow Task 1: The column delimiter for column "Column 2" was not found.
(SQL Server Import and Export Wizard)
Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "H:\AS400_file_transfers\LIMS\ACTITEMPF.CSV" on data row 3.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - ACTITEMPF_CSV" (1) returned error code 0xC0202092. 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.
(SQL Server Import and Export Wizard)
Any help?