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

Unable to export Integration Service Catalogue project to an ISPAC file

$
0
0

Unable to export the Integration service catalogue project to an ISPAC file.

The project contains multiple packages. I have tried both options ieISPAC file as well as trying to create a new project in visual studio(import and export wizard package). Both are throwing the below message.

It is throwing the below error.

Value does not fall within the expected range. (Microsoft.SqlServer.ManagedDTS)

Can somebody shed some light on why this is happening. Please let me know if I need to provide some further information.




Update entire SQL table w/ SSIS

$
0
0

Hi.

I would like some help please. I have a table in CSV file that the content changes from time to time and I need to update the SQL table with SSIS package. 

>> Initial data imported from CSV file to SQL table (Table1):

Index_Mot;ID;DateTime;Hour;Minute;Second;TotalHours
1;MP6BC001MO01;06/11/2019 10:06;10;0;0;3000
1;MP6BC001MO02;06/11/2019 11:06;11;0;0;4000
1;MP6BC001MO03;06/11/2019 12:06;12;0;0;5000
1;MP6BC001MO04;06/11/2019 13:06;13;0;0;6000

>> After run the package in SSIS I want to update SQL table, as below:

Index_Mot;ID;DateTime;Hour;Minute;Second;TotalHours
1;MP6BC001MO01;06/11/2019 20:06;20;0;0;7000
1;MP6BC001MO02;06/11/2019 21:06;21;0;0;8000
1;MP6BC001MO03;06/11/2019 22:06;22;0;0;9000
1;MP6BC001MO04;06/11/2019 23:06;23;0;0;10000

I tried using OLE DB Command as below unsuccessfully:

UPDATE [DB1]. [Dbo]. [Table1]
    SET [ID] =?
       , [DateTime] =?
       , [Hour] =?
       , [Minute] =?
       , [Second] =?
       , [TotalHours] =?
  WHERE [INDEX_Mot] = 1

Can someone help me please ?

Cheers,

Berg

SSIS connection String Error on 2016 Sql Server

$
0
0

As part of the DW SQL Server 2016 migration, I ran these two projects and they failed with the same error.

'Argument ""$Project::CM.OTQR.ConnectionString";"Data "Source=xxxxxxdev;Initial" "Catalog=OTQR;Provider=SQLNCLI11.1;Integrated" "Security=SSPI;Auto" Translate=False;"" for option "parameter" is not valid.  The command line parameters are invalid.  The step failed."

These projects run fine on Sql server 2014, but when copied over to Sql 2016, the connection strings gets jumbled with additional space characters and throws the above error. I manually test the connections and they work. ut when the package is deployed on the 2016 Sql  server , it fails.

Suspecting its a version bug or issue.. but has anyone run into this and found a work around it so far. Any pointers?

Thank you kindly
GAmofah

Entity farme work and sql server problem.

$
0
0

I have a database based website in MVC and it works great.

I decided to an a entity framework and locally that works great too.

However if I try to create the entity framework model with an online database it wont connect to the server, it says it doesnt exist or cant log on. My website logs on to the server ok so the server is there.

Just out of interest I put the same server details into SSMS and SSRS and neither can find the server.

I have turned off firewall and Norton security but no joy.

I even reinstalled sql server 2017.

The server is

mssqluk5.prosql.net

Any help would be appreciated, Nigel


n.Wright

how to get the expression for The_Dp_Matches_11_07_2019.csv

$
0
0

Its giving me

"The_Dp_Matches_"+(DT_WSTR,30)getdate()+".csv" ---- The_Dp_Matches_2019-11-07 15:49:09.090000000.csv


SSIS Error "Operand type clash: image is incompatible with geometry"

$
0
0

Hello,

I'm trying to move a "geometry" column in SSIS... from a SQL 2017 server to a SQL 2014 server (tried a 2017 destination also) and am getting this error...

"Operand type clash: image is incompatible with geometry"

In both the source and destination outputs/inputs the column is getting detected as DT_IMAGE... so I guess geometry is not natively-supported in SSIS (?).

I'd appreciate any help, thanks.

- Martin



- Martin V.

SSIS Log Provider for SQL Server Logging Enabled on a Package using a SQL Server Connection. when I convert this Package connection to Project connection, throws an Error

$
0
0

Hi All,

Today, I faced an issue with existing project and Packages. 

  1. Have a Connection Called DW_Manager to Connect to SQL Server DB: DWMANAGER to capture log using SSIS Logging (Basically It will create a table [dbo].[sysssislog] under System Tables in Database: DWMANAGER ).Note: This is a package Connection and not a Project Connection. 
  2. Logging Enabled for a package(Go to Menu--> SSIS-->Logging -->Providers and Logs-->Provider Type-->SSIS Log Provider for SQL Server-->Name: SSIS Log Provider for SQL Server1-->Description: Writes log entries for events to a SQL Server database-->Configuration: DW_Manager) https://www.sqlshack.com/overview-of-ssis-package-logging/
  3. Have a Project Parameter called PP_DW_Manager and provide connection details here: Data Source=Server1;Initial Catalog=DWMANAGER;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;
  4. Open a Package-->Select Connection DW_Manager-->Properties-->Expression-->False (This means It is not taking value from Project parameter)

If I deploy this package, It works fine (loads data). 

  1. The Time, I convert DW_MANAGER from Package connection to Project Connection, My Package starts throwing below error message but it loads data
  2. The Time, I convert DW_MANAGER, to use Project Parameter (Open a Package-->Select Connection DW_Manager-->Properties-->Expression-->True-->Property Expression Editor-->Property: ConnectionString-->Expression: @[$Project::PP_DW_Manager]), It starts failing (Don't Load any data. It fails at validation If a run job through SQL Agent JOB. If I run this package from BIDS It works with below error message). 

If I convert connection DW_MANAGER to Project Connection still It works and loads data though it throws and Error Message: 

Error: The connection "DW_MANAGER" is not found. This error is thrown by Connections collection when the specific connection element is not found.


Conclusion: If a "SSIS Log Provider for SQL Server logging" is enabled on a package then connection used under configuration should be a package connection and can't be a Project Connection. The time We convert connection DW_Manager from package connection to Project Connection We get above error message. and Time we use Project parameter for DW_Manager connection, then it fails validation SQL Server Agent Job But If same package I Run on BIDS, It loads data with above error Message. 

Not sure this is expected behavior ? Or this is a bug?

Guys, Please correct me If am wrong. We are using SSIS 2012.

I found couple of threads but things are not clear.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/91394766-c56f-492f-b62a-40aeeb8bdfeb/sql-2012-ssis-log-provider-the-connection-quotquot-is-not-found-this-error-is-thrown-by?forum=sqlintegrationservices

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2af470ac-d76d-4162-849f-a5e0411aa053/the-connection-quotquot-is-not-found-this-error-is-thrown-by-connections-collection-when-the?forum=sqlintegrationservices

  Logging:

https://www.sqlshack.com/overview-of-ssis-package-logging/


Thanks Shiven:) If Answer is Helpful, Please Vote





How To add parameter to Origin Data Source ADO.NET


SSIS OLEDB Source has a view selected and Validation is taking more than 5-10 minutes? What is reason?

$
0
0

Hi Guys,

I have 4-5 Packages where OLEDB source has view selected. When we open the package Validation is taking lot of time. 

What is the reason for this.?


Thanks Shiven:) If Answer is Helpful, Please Vote

SSIS OLEDB Source has a view selected (Data Access Mode is Table or View) and Validation is taking more than 5-10 minutes? What is reason?

$
0
0

Hi Guys,

I have 4-5 Packages where OLEDB source has view selected (Data Access Mode is Table or View). When we open the package Validation is taking lot of time. 

What is the reason for this.?


Thanks Shiven:) If Answer is Helpful, Please Vote


Format a written Variable from a script task SSIS 2010

$
0
0

Hi

I have a script task in SSIS 2010

This will write the modified date of the excel file into a variable - [User::LastFileDate]

This is the line in the script task

 Dts.Variables["User::LastFileDate"].Value = theFile.LastWriteTime;

I just want the format to be like with a rounded timestamp 06/11/2019 00:00:00 and not 06/11/2019 09:45:01 - I would like please

06/11/2019 00:00:00

Please help team


Use Environment variable in the package path of 'Execute Package Task'

$
0
0

Hi,

I am with a problem, in the development environment my packages are stored in one path, and in the production environment, my packages are stored in another path. My project is configured as 'Package Deployment Model' instead of 'Project Deployment Model'.
I want to simulate a relative path for my problem, so I want to use an environment variable that will have different values for package path in development/production.

path: VARIABLE/PackageName.dtsx

Is it possible what I want? If not possible, what I can do in Package Deployment Model to solve this problem?
I know that the environment variable isn't the best approach, because I will not be able to have two versions of SSIS configured at the same time in my machine. The best thing to me would be to be independent of path configuration/customization; a default approach. But the Environment variable was the only thing that I thought.

Best Regards,
Luis.


ignoring failure to connect to 1 or more of 12 servers

$
0
0

Hi, we run 2017 std.  I've done my best in the image below to show at a high level the general architecture we use to consolidate info from 12 servers. 

Failure to connect to 1 or more of the 12 servers in their oledb source components should be forgiven so the package can accomplish whatever is possible.

Regarding the package.  It acts incrementally on the data by keeping a table around called job control and using that table to record the high keys from what is really like 22 servers (and thus 22 locations), 11 of which are already replicated to 11 db's on 1 server .   The pkg doesn't write to the job control table until component "Add New Job Control" executes.  That job control table's columns are location identifier, high key and package run date.  There is also an expiration flag column so we can keep a little history in this table. 

The component called "Record High Mod Dates" retrieves those high keys which are recorded temporarily and later baked into dynamically built queries.  "Record High Mod Dates" is the 1st of two components where the 12 servers are connected to.

The component called "Stage Hist" is the 2nd component in which the 12 servers are connected to and where the dynamic sql is run.

Right now the package fails upon failure to connect to any server.  I'd like to forgive failures to connect to 1 or more of the 12 servers without overly complicating the pkg.   connection attempts are always thru oledb source components.  as you can imagine i'd want to somehow share connection failures by location with the component called "Add New Job Control" so only the previous high keys for those failed locations would be inserted to Job Control.  I'd probably want to share with "Stage Hist" any failures encountered in "Record High Mod Dates".

I'm looking at this article https://www.timmitchell.net/post/2013/08/05/continue-package-execution-after-error-in-ssis/ and see that event handlers might help in all of this.  But in general i'm wondering what the available alternatives are for this sort of thing.  I suppose for every one of the 12 oledb sources I could have a separate dft whose failure path could handle this class of problem.

 

 

SSIS: Capturing the [File Creation Date] and [File Size] of many .csv files into separate user variables, inside a For Each Loop Container using Script Task (in the Control Flow) - C# code needed; archiving the files into separate folders.

$
0
0

I have good experience in SSIS, but nil as far as Script Task and Script Component are concerned.

I have a situation in which I am loading many .csv files into a SQL Server destination table. I am using a For Each Loop Container.

I am loading these files, capturing the File Name, Row Count, and other information needed into various SSIS user variables.

I load some of these variables into an Audit Tracker table using an Execute SQL Task in the Control Flow, after the Data Flow Task (all inside a For Each Loop Container)

Upto this point, everything is fine.

Now our client wants to capture the FileCreationDate (i.e.Date Modified) andFileSize of each of these .csv files. I need to capture them in separate user variables.

Obviously I need help, because this cannot be done without some scripting.

In the Control Flow, inside the ForEachLoop Container, I have added a ScriptTask immediately after the Data Flow Task.

I have the following three user variables in the package:

1) User::Filename (string variable for each.csv files;this is fine, no issue)
2) User::FileCreatedDateTime (variable to capture the creation date of each .csv file; please let me know whether DateTime datatype will be okay)
3) User::FileSize (variable to capture the size of each .csv file; let me know whether string datatype will be okay)

Now, can anyone let me know the following settings inside the Script Task Editor ?

Script Tab

Language as Microsoft Visual C# 2017   (disabled)

Entry Point: Main   (Is this correct?)

ReadOnlyVariables:  (What should I set  ?)

ReadWriteVariables:  (What should I set  ?)

Expressions Tab:

What expressions should I set ?  i.e. Property and Expression. 

Edit Script:

What code should I type ? I referred to these two websites, but not able to get the right code

http://www.techbrothersit.com/2011/02/ssis-load-files-information-to-sql.html

https://stackoverflow.com/questions/31556943/ssis-read-file-modification-date

Can someone please give me the clear code and clarify the other doubts ?




modification date into a variable ssis script task

$
0
0

Hi

i am using a script task to store a excel file modification date into a variable - However , when i use

Dts.Variables["User::FileLastModifiedDate"].Value= fileInfo.LastWriteTime;

I am returned in the variable

30/12/1899 00:00:00

it should be 06/11/2019 14:31:21

i kindly also need it to be formatted to 06/11/2019 00:00:00 (rounded time)

please help



how to get prious date? instead of 8 i need 07--yesterday

SSIS connection error with - "The Specified service does not exist as an installed service".

$
0
0

Hi,

https://social.msdn.microsoft.com/Forums/getfile/1502345 -- Image link for Connection Error

I tried with all 16.x and 17.X versions of SSMS. But no luck. This issue is happening only for one user and he has all admin related permissions. 

SQL Server is 2016 and SSMS also 16 version. Please help me in finding the fix or any workaround.

Configure SSIS Project to use Environmental Variables under Integration Services Catalogs? but removing and re adding reference will cause your job to fail.

$
0
0

To Configure SSIS Project to use Environmental Variables under Integration Services Catalogs, we have to go through couple of steps:

  1. Create Environment-->Connect SSIS Catalogs-->Go to SSISDB-->Expand one folder-->you will see folders here Projects and Environments -->Go to Environments--> Right click and click on create environments or use scriptEXEC [SSISDB].[catalog].[create_environment] @environment_name=N'Prod', @environment_description=N'All the variable under this Environment holds Production related values', @folder_name=N'STG' GO
  2. Add Variables under this Environment 'Prod'. It is better to keep variables name same as project parameters name and assign values to each variables.
  3. Now Expand Projects folder-->Select one ssis project-->right click-->click on configure-->here you will see 2 options Parameters and References --> click on References --> and add an Environment to it.
  4. now select Parameters-->and for each variables for those you want to use Environment references then set parameter value to "Use Environmental Variable" and select right variable from drop down list. Do it for all required Parameters.
  5. Now when you create a SQL Job to run SSIS packages from Catalogs you can set to use configured Environment. Add a Step to you job and select a package from project-->go to job step properties--> configuration --> check the checkbox Environment and you will see mapping is done automatically.
  6. If all setup correctly, job will run successfully.
  7. If You generate create script for your job then you will see there is a reference in it for environment something like this: @command=N'/ISSERVER "\"\SSISDB\ODS\MyPackage.dtsx\"" /SERVER "\"sql01\"" /ENVREFERENCE 25 /Par"\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E'
  8. You can use below query to find this ENV Reference number.

/*Query To Find EnvironmentReferenceID For Each SSIS Project*/
SELECT PackagePathName = FORMATMESSAGE('\SSISDB\%s\%s\%s\', F2.name, PJ.name, PK.name), 
       EnvironnmentPathName = FORMATMESSAGE('\SSISDB\%s\%s', F.name, E.name), 
       EnvironmentReferenceID = ER.reference_id, 
       ProjectFolder = F.name, 
       Project = PJ.name, 
       Package = PK.name, 
       EnvironmentFolder = F2.name, 
       Environment = E.name
FROM catalog.folders AS F
     INNER JOIN catalog.environments AS E ON E.folder_id = F.folder_id
     INNER JOIN catalog.environment_references AS ER ON(ER.reference_type = 'A'
                                                        AND ER.environment_folder_name = F.name
                                                        AND ER.environment_name = E.name)
                                                       OR (ER.reference_type = 'R'
                                                           AND ER.environment_name = E.name)
     INNER JOIN catalog.projects AS PJ ON PJ.project_id = ER.project_id
                                          AND PJ.folder_id = F.folder_id
     INNER JOIN catalog.packages AS PK ON PK.project_id = PJ.project_id
     INNER JOIN catalog.folders AS F2 ON F2.folder_id = PJ.folder_id
ORDER BY 2;

Now for some reason you removed environment reference from a project in SSIS Catalogs and re-added then

  1. all your existing jobs, those are having steps to run packages from this project, will start failing
  2. You need to modify these jobs, those are having steps to run packages from this project, to re configure Job step Properties to tick the check box Environment. Now if you generate the create script for your job you will see different value for ENVREFERENCE.
  3. How do you find how many jobs having steps from a specific SSIS Catalogs project, here is the query:

USE [msdb]

/*Query to get Job Name by Passing Package Name*/
SELECT
/*Job Information*/
a.job_id
   ,a.name
   ,a.description
/*SSIS package Information*/
   ,b.name
   ,b.id
   ,b.description
/*Job steps Information*/
   ,js.step_id
   ,js.step_name
   ,js.subsystem
   ,js.command

FROM msdb.dbo.sysjobs a
LEFT JOIN msdb.dbo.sysjobsteps js
ON js.job_id = a.job_id
LEFT JOIN msdb.dbo.sysssispackages b
ON a.name = b.name
WHERE js.command LIKE '%\SSISDB\ODS\%'
ORDER BY 1

My question: Is there any way to find and update all the jobs for missing environment configuration through SQL script? 


Thanks Shiven:) If Answer is Helpful, Please Vote


ssis is not able to open the csv file. since the file name is defaulted to text? how can this be fixed

How to create SSIS packages ?

$
0
0

Hello, after installing SSIS 2016 how does one create SSIS packages?

When connecting in via Management Studio there doesn't appear to be any Create New package selection type.

Would it need to be created outside of Management Studio like Visual Studio?

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>