The project runs in Visual Studio and when started from the Integration Services Catalog.
When I run it from the command line with a parameter file, both of these lines:
/Par $Project::MaxRows;"250000"
/Par $Project::MaxRun;"45"
Cause this error:
Failed to execute IS server package because of error 0x80131904.
Description: The data type of the input value is not compatible with the data type of the 'Int32'
Source: .Net SqlClient Data Provider
If I take these lines out, the project runs fine with the defaults, which are the same as what is specified.
Any ideas on how to debug this?
UPDATE:
Fixed the issue by changing the types of the parameters to String and casting to int where they are used. But I'm still struggling with the "works when submitted from SSIS but not from command line" thing. I'd like to understand why.
EDIT: Changed the Title to reflect the actual problem.
Try this:
/Par "$Project::MaxRows(Int32)";250000
/Par "$Project::MaxRun(Int32)";45
There are some good examples of working with dtexec here -> http://technet.microsoft.com/en-us/library/hh231187.aspx
Related
I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D4E5AF42-7999-473C-8082-6EFC676953C4}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
It has been doing this ever since I copied the package over. I have followed through online guides and run the regsvr32 dts.dll and this said it was successful but nothing has changed. I still get the error, why is this?
The SSIS package seems to validate my containers, it takes a long time to do this compared to the other two and then fails later on in the validation throwing the above error message.
You can't just copy the package, but you need additionally to change the name and generate new GUID (which identifies the COM object) for this package. Check this MSDN article for more info.
Here is the workaround: Solution Explorer -> right click project ->properties->debugging->Run64bitRuntime->set to false.
I hope it helps others. The solution worked for me:
I registered the assembly using the gacutil.exe. My SSIS project target server version was SQL 2012. So, I was using the DTSPipelineWrap.dll version 11.0. I opened the "Developer Command Prompt for VS2015" in Administrator mode, then typed the following command: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe /i "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll"
Then from my SSIS script task, References--> I removed the existing DTSPipelineWrap which was using the assembly from the location "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll". Then in the References folder, right click-->Add Reference-->Browse find the assembly from the location "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.DTSPipelineWrap\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SQLServer.DTSPipelineWrap.dll"
Click Ok. Rebuild the code and executed the package. It has worked for me.
In my case this is was a validation overload/timeout, the package contained references to hundreds of tables.
Opening the offending data flow forced re-validation and cleared the error.
Project --> Properties --> Configuration Properties --> Debugging
and then change Run64BitRuntime to False under Debug Options
In case this might help someone: I got this error due to timeout issues caused by a poorly optimised query. There was nothing inherently wrong with the SSIS package and it ran fine once i fixed the problem in the DB Source.
I am trying to deploy a Play Framework 2.3 application to OpenShift.
I am following this example: https://github.com/JamesSullivan/play2-openshift-quickstart
Building and deploying the application is working (by that I mean the push to the git repository is working and the build is completing successfully), but during startup I see this error in play.log:
AbstractConnectionHook -
Failed to obtain initial connection Sleeping for 0ms and trying again.
Attempts left: 0. Exception: null.
Message:No suitable driver found for jdbc:${OPENSHIFT_POSTGRESQL_DB_URL}
Oops, cannot start the server.
Configuration error: Configuration error[Cannot connect to database [default]]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94)
at play.api.Configuration.reportError(Configuration.scala:743)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:247)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:238)
at scala.collection.immutable.List.map(List.scala:272)
at play.api.db.BoneCPPlugin.onStart(DB.scala:238)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.api.Play$.start(Play.scala:90)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:55)
at play.core.server.NettyServer$.createServer(NettyServer.scala:244)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at play.core.server.NettyServer.main(NettyServer.scala)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:${OPENSHIFT_POSTGRESQL_DB_URL}
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:363)
at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
at play.api.db.BoneCPPlugin$$anonfun$onStart$1.apply(DB.scala:240)
... 18 more
So it looks like the ${OPENSHIFT_POSTGRESQL_DB_URL} environment variable token-substitution is not working.
If I log in to my application, I see this via env (obviously I replaced the username, password, IP and port for the purposes of posting here):
OPENSHIFT_POSTGRESQL_DB_URL=postgresql://xxxx:yyyy#ip:port
I have also tried using the other environment variables, like OPENSHIFT_POSTGRESQL_DB_HOST but those too do not get substituted.
The relevant part of my openshift.conf looks like this:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:${OPENSHIFT_POSTGRESQL_DB_URL}"
db.default.user=myappuser
db.default.password=myapppassword
From the linked quickstart project, the following command is used to start the Play server (again, I replaced server-ip for the purposes of this post):
/app-root/runtime/repo/target/universal/stage/bin/myapp
"-DapplyEvolutions.default=true"
-Dhttp.port=8080 -Dhttp.address=server-ip
-Dconfig.resource=openshift.conf
You can see the openshift.conf file being referenced.
I tried a lot of things, eventually I found something that worked:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://"${OPENSHIFT_POSTGRESQL_DB_HOST}":"${OPENSHIFT_POSTGRESQL_DB_PORT}/mydb
db.default.user=(((db-user)))
db.default.password=(((dp-password)))
The upshot is, it seems, you need to watch out very carefully for correct usage of the quotation characters.
It looks "wrong" (at first glance) since the last quotation character closes the string prior to the OPENSHIFT_POSTGRESQL_DB_PORT variable.
I am wondering what the correct format is for passing connection string properties on the command line when using dtexec:
dtexec.exe /Ser IpAddress\Instance /IS "\SSISDB\Data Warehouse\MyProject\MyPackage.dtsx" /DumpOnError /Set \Package.Variables[DW_ConnectionString].Properties[Value];\""Data Source=IpAddress;Initial Catalog=DWDB;Provider=SQLNCLI10.1;IntegratedSecurity=SSPI;"\"
I have defined the above command line configuration where I am attempting to pass override properties for the default connection string properties. The packages I'm targeting are not using package connections, but instead project level parameters/properties have been defined to store the DB connections.
For some reason I can't get this to work . I am getting an error message on the server saying
Failed to configure an overridden property that has the
following path: \Package.Variables
[DW_ConnectionString].Properties
[Value]. An error occurred while setting the value of
property "Value". The error returned is 0x80020009
Is my format correct for overriding properties?
The packages are hosted on a remote server
Try using DTEXECUI next time to generate your command string. It has places for all of the variables, connection managers etc. All you have to do is bring up your package and it fills everything in. You then enter any changes you want in the GUI then go to the Command line tab and it will give you the string to put after DTEXEC.EXEC. You can of course also run the package from DTEXECUI also.
It turns out that my format was wrong:
It's incorrect to use /Set Package Variable in this context:
The correct format is:
/Par "$Project::DW_ConnectionString";\""Data Source=Server\Instance;Initial Catalog=myDb;Provider=SQLNCLI11.1;Integrated Security=SSPI;AutoTranslate=False;"\"
I'm having an issue scheduling a .dtsx package to execute as a SQL Server Agent job. I've Googled the problem, but can't find the required solution for my particular issue.
The SQL Server version is 2012 Business Intelligence Edition.
The package runs fine within Visual Studio.
The job is set to run under the "SQL Server Agent Service Account".
The file is on the same server as the DB.
The error log in part is:
...complete End Progress Progress: 2013-01-09 20:51:48.58
Source: Inheader File Import Validating: 33% complete End
Progress Progress: 2013-01-09 20:51:48.58 Source: Inheader File
Import Validating: 66% complete End Progress Progress:
2013-01-09 20:51:48.59 Source: Inheader File Import
Validating: 100% complete End Progress Progress: 2013-01-09
20:51:48.59 Source: Product File Import ... The command line
parameters are invalid... The step failed.
This looks similar to the log generated when running the package within VS, so it doesn't appear to be a permissions issue - it looks to be processing the script.
I haven't changed the command line parameters from those generated when configuring the step, they are(I've altered sensitive data):
/FILE "\"C:\...filepath...\package.dtsx\"" /CHECKPOINTING OFF /REPORTING E
A lot of the links I have found don't really mention the file type packages, and I'm a bit stuck so any help would be much appreciated.
I'm also confused as to why the error wouldn't occur prior to the execution of the package.
Assuming this is accurate:
/FILE "\"C:\...filepath...\package.dtsx\"" /CHECKPOINTING OFF /REPORTING E
then the backslash and quote before the start of the path, and the backslash and quote after the .dtsx extention, are the likely culprits.
Things should look more like this:
/FILE "C:\...filepath...\package.dtsx" /CHECKPOINTING OFF /REPORTING E
i have a Main Package and 2 child packages(Load and Export). i have both child packages on the server in shared folder. when i execute Main Package its giving me the following Error for one of the Child package.
Error: Error 0xC0012050 while loading package file "\mhfile02\DIRFILEDEV\CHG77253\SSIS Packages\AaeAutoenrollee_Load.dtsx". Package failed validation from the ExecutePackage task. The package cannot run. .
Can anybody tell me what could be wrong?
Thanks
Are you running the package via SQL Server Agent?
Try running the child packages individually, it may be throwing other errors. If the package runs without error, the problem is probably on the Main package settings.
Some questions that may help you?
1. when you loaded the packages to the server, did you set any Protection Level (eg encrypt sensitive data with key, user key, etc?) setting these can make a package fail loading when run via SQL Server Agent
2. Try adding /msdb/ to the path of the child package.
If you are connecting in the child package to an Excel file,
and you set on the child solution property page
Under -
"Configuration Propeties"
"Debugging"
the variable "Run64BitRunTime" = False
You have to do it also on the Parent Package!
This error message means that your child package will not pass the validation. Check your child package to see if there's any task inside that does not pass the validation (a red cross appears beside it).
Maybe you have something being dynamically created that is used in such task (like constructing the connection string at runtime for some connection manager). Try set this task's DelayValidation property to True.
From one day to another, I got this error in Visual Studio / SSDT too (VS 2013, with SSIS 2014). Note: I have project deployment model, not package deployment.
I have ProtectionLevel = EncryptSensitiveWithPassword.
In the master package, on all package execution tasks, I had to retype the password for the sub-packages again. After that, it worked again. I guess the master package had some corruption, no idea why.
Greetings,
Roli
If you are connecting in the child package to an Excel file, then set DelayValidation = False on the child package excel connection manager.