when i execute dtsx package through command line i am triggered with the following error saying
1.The connection is not found , the error is thrown by connections collection when the specific connection element is not found
2.Cannot resolve package path to an object in the package "xxxxxxx".Verify that the package path is valid
3.The package path referenced an object that cannot be found , this occurs when an attempt is made to resolve a package path to an object that cannot be found
But this works fine when i run the package through Business Intelligence development studio.
Taking a guess here while I wait on an answer to the comment, generally when a package runs fine in BIDS but doesn't work from the commandline, I find it's related to 64/32 bit incompatibility.
Are you using Excel, Access or anything else that under the sheets uses the JET driver? That only works in 32 bit mode.
On a 64 bit OS, by default when you create a new ODBC connection, you'll be creating it in the 64 bit namespace which the 32bit version won't be able to access?
Are you using Informix or UDB/DB2 drivers? I only ever found 32 versions of those.
Running a package from the command line
dtexec is the command line mechanism for running an SSIS package. It comes in 2 flavors for 64 bit OS, both are named dtexec and generally the 32 bit is referenced in the Windows Path environment variable
On a 64 bit OS, the default path to the 64 bit would be "c:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTExec.exe"
Still on 64 bit OS, the path to the 32 version would be "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe"
To run a package named FooBar.dtsx that lives in C:\Src\MyProject\MyProject, invocation would be
"c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /file C:\Src\MyProject\MyProject\FooBar.dtsx
If that package lives on SQL Server (DEVSQL01) in the folder MyProject, this would be the call to run the same package.
"c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /SQL \MyProject\FooBar /SERVER DEVSQL01
Edit
To apply a configuration, you need to specify the /CONF option
"c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /file C:\Src\MyProject\MyProject\FooBar.dtsx /CONF C:\FooBar.dtsConfig
Looking at your comments, the only difference between our usage is you have wrapped everything in double quotes. Try it without the preceding and trailing quote.
type below text to call SSIS package
dtexec /f
/set \package.variables[Variable]; value
Example:- dtexec /f E:\test_package\test_package\Package.dtsx
/set \package.variables[id];1
Reference Ways to execute SSIS package
The /SQL option is for packages deployed to the MSDB -> servername\StoredPackages\MSDB\
Related
I am having a really hard time with ssis lol. I have visual studio 2019 community and I installed ssis & data tools following this article. But when I try to run a package using dtexec, I get the error, To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher. But I thought that I did install ssis? Also I am confused as to what which dtexec I should be using I have it in the 110,120, & 130 folders?
: "C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\dtexec.exe" /f Package.dtsx
Microsoft (R) SQL Server Execute Package Utility
Version 13.0.4561.14 for 32-bit
Copyright (C) 2016 Microsoft. All rights reserved.
Started: 6:31:15 PM
Error: 2021-01-27 18:31:15.76
Code: 0xC000F427
Source: Expression Task
Description: To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.
End Error
Warning: 2021-01-27 18:31:15.76
Code: 0x80019002
Source: Package
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 6:31:15 PM
Finished: 6:31:15 PM
Elapsed: 0.14 seconds
Error message is correct stating that you need SSIS Server to run dtsx package.
Article you quoted describes how to install Development Environment for SSIS; this development environment allows to create and edit packages and run packages inside Visual Studio for debug purposes only. Package executions other than inside Visual Studio have to be done under SSIS Server environment.
Conclusion -- to run package in "productive environment" i.e. without manual actions in Visual Studio, you have to install some version of SSIS Server or execute package on existing SSIS server.
Different versions of DTExec in "110,120, & 130 folders" refer to different versions of SSIS. In the Visual Studio you have ability to develop packages for different versions of SSIS. As you specify SSIS version in SSIS Project properties, VS in package debug run corresponding version of DTExec. 130 corresponds to SQL Server 2016, see SO answer on this with more info.
This is a followup of a question I asked before. In a nutshell I run a 64 bit version of cmd from visual studio (which is 32 bit application). I do this because I need to run a command oscdimg.exe which is only accessible from 64 bit version of cmd.
<Target Name="AfterBuild">
<Exec Command="%windir%\sysnative\cmd.exe /c "$(ProjectDir)test.bat UPLOAD"" WorkingDirectory="$(ProjectDir)" />
</Target>
Now while this works fine, I receive following error.
error MSB3073: The command "%windir%\sysnative\cmd.exe /c "C:\XXXX\XXX\XXX\test.bat UPLOAD"" exited with code -1.
While this error is not disrupting my work, meaning the batch performs its tasks successfully, it still is nice to fix this error message, as others in my team questions this error message.
I am making an assumption that this error is triggered because although the visual studio is 32 bit application, the build or exec calls for windows operating system application which may be 64 bit application. And 64 bit application cannot see the sysnative virtual folder.
Is there any way to resolve this error?
EDIT: Added argument to the command to simulate the real use and to show the reason I add ".
One of the recent surprise for me is that robocopy returns 1 when it finishes the copy successfully, the author #Valamas shows in italic
Confusion will set in when no files are copied = no error in VS. Then when there are changes, files do get copied, VS errors but everything the developer wanted was done.
VS picks up and interprets this return value as an error when robocopy is the last command in the batch file.
In the case of robocopy, VS returns 1 and not -1 so it is slightly different from my current situation. However, since my batch file is functioning as intended, I felt safe enough to return 0 once the batch is completed without error.
exit 0
And I no longer see the MSB3073.
For this post's issue, since oscdimg is my last command in the batch file, I am assuming that oscdimg returns non-zero value after it succeeds.
I could not find supporting document regarding oscdimg.
I need to connect to a database and use a wallet file.
If i try with my SQL Developer i end up with "ocijdbc.dll: Cant load IA 32bit .dll on a AMD 64-bit platform."
I have both installed JDK 32 bit (in C:Prog32bit) and JDK 64 bit (C:Prog) for development.
I tried to set JavaHome in sqldeveloper/bin/sqldeveloper.conf manually
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_51
My next step was to edit %USER_HOME%/sqldeveloper/sqldeveloper.conf and I set SetJavaHome there too, but none didn't work.
Next step was, i edited sqldeveloper/bin/sqldeveloper.bat and set:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_51"
path="C:\Program Files (x86)\Java\jdk1.7.0_51\bin%"
java.exe -Xmx640M -Xms128M -Xveri....
My last try was to use the command line (as I would do on linux) and run:
D:\sqldeveloper>PATH="C:\Program Files (x86)\Java\jdk1.7.0_51\bin"
D:\sqldeveloper>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
D:\sqldeveloper>sqldeveloper.exe
But i still receive the message sqldeveloper is running 64 bit Java.
I found a workarround. An older version of SQL Developer (bundeld with jdk) is available at http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-downloads-v322-2080107.html
The main problem in this case is that you have installed a 32 bits Oracle Driver to connect to your database in a 64 bit machine. There is no problem with that but you need to set SetJavaHome to a jdk directory that contains 32 bits version.
In sqldeveloper 4 you need to edit the file:
"C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf"
and inside this config file change the default directory for jdk1.7.0_71 32 bits is like this:
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_71
After you use this path, check in Task Manager that your process sqldeveloper looks like this:
sqldeveloper.exe *32
If your process starts with that "*32" you could be able to connect using your 32 bits oracle driver.
Set the SetJavaHome value at %appdata% "Roaming\sqldeveloper\1.0.0.0.0\product.conf"
This could be cause of connection type as well.
Before connecting to database,
Right click on database and goto properties
Change the connection type to Basic from TNS, set the port and service name/SID, provide password and save the connection.
Try testing the connection, this resolved the issue for me.
Machine does not have full sql server installed. but following distributable packages are installed on my machine:-
Microsoft® SQL Server® 2008 R2 Command Line Utilities
Microsoft® SQL Server® 2008 R2 Native Client
I have a batch file that runs bcp utility. If i run this batch file from the folder where bcp.exe is sitting (...tools\binn) it works.
but my dump question is if there is any way i can run this bcp utility from c:\ drive only. Right now if it run from c:\ drive it says:-
bcp is not recognized as an internal or external command,...
If you add the directory (...tools\binn) to your PATH variable or use the full path of the bcp executable this will work.
To add a directory to your PATH Control Panel > System > Advanced System Settings > Environment Variables.
Then find the Path Variable under system variables and add your bcp directory to the list (seperated by ;)
Just copy the bcp.exe from the other SQL Server or from respective SQL Server path
and copy it to batch file path, where you have your script.
While running the batch script, also please run from the same path in command line.
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 months ago.
Improve this question
How to uninstall / completely remove Oracle 11g (client)?
deinstall.bat doesn't work.
Edit: Further discussion related to why this question was closed and deleted: https://meta.stackexchange.com/questions/190441/why-was-this-question-related-to-uninstalling-the-oracle-database-client-deleted
Assuming a Windows installation, do please refer to this:
http://www.oracle-base.com/articles/misc/ManualOracleUninstall.php
Uninstall all Oracle components using the Oracle Universal Installer (OUI).
Run regedit.exe and delete the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE key. This contains registry entires for all Oracle products.
Delete any references to Oracle services left behind in the following part of the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ora* It should
be pretty obvious which ones relate to Oracle.
Reboot your machine.
Delete the "C:\Oracle" directory, or whatever directory is your ORACLE_BASE.
Delete the "C:\Program Files\Oracle" directory.
Empty the contents of your "C:\temp" directory.
Empty your recycle bin.
Calling additional attention to some great comments that were left here:
Be careful when following anything listed here (above or below), as doing so may remove or damage any other Oracle-installed products.
For 64-bit Windows (x64), you need also to delete the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE key from the registry.
Clean-up by removing any related shortcuts that were installed to the Start Menu.
Clean-up environment variables:
Consider removing %ORACLE_HOME%.
Remove any paths no longer needed from %PATH%.
This set of instructions happens to match an almost identical process that I had reverse-engineered myself over the years after a few messed-up Oracle installs, and has almost always met the need.
Note that even if the OUI is no longer available or doesn't work, simply following the remaining steps should still be sufficient.
(Revision #7 reverted as to not misquote the original source, and to not remove credit to the other comments that contributed to the answer. Further edits are appreciated (and then please remove this comment), if a way can be found to maintain these considerations.)
There are some more actions you should consider:
Remove Registry Entries for MS Distributed Transaction Coordinator (MSDTC)
Note: on the Internet I found this step only at a single (private) page. I don't know if it is required/working or if it breaks anything on your PC.
Open Regedit
Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\MSDTC\MTxOCI
Add an x before each string for OracleOciLib, OracleSqlLib, and OracleXaLib
Navigate to HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\MSDTC\MTxOCI
Add an x before each string for OracleOciLib, OracleSqlLib, and OracleXaLib
Otherwise these files, if they exist, will still be in use next time you reboot, and unable to be deleted.
Remove environment variable ORACLE_HOME, ORACLE_BASE, TNS_ADMIN, NLS_LANG if exist
Check also Oracle doc to find all Oracle related environment variables, however apart from variables listed above they are very rarely used on Windows Client: Oracle Environment Variables
Unregister oci.dll
Open a command line window (Start Menu -> Run... -> cmd)
Enter regsvr32 /u oci.dll, resp. %windir%\SysWOW64\regsvr32 /u oci.dll
In some cases the file %ORACLE_HOME%\bin\oci.dll is locked and you cannot delete it. In such case rename the file (e.g. to oci.dll.x) and reboot the PC, afterwards you can delete it.
Remove Oracle .NET assemblies from Global Assembly Cache (GAC). You do this typically with the gacutil utility, if available on your system. Would be like this:
gacutil /u Policy.10.1.Oracle.DataAccess
gacutil /u Policy.10.2.Oracle.DataAccess
gacutil /u Policy.1.102.Oracle.DataAccess
gacutil /u Policy.1.111.Oracle.DataAccess
gacutil /u Policy.2.102.Oracle.DataAccess
gacutil /u Policy.2.111.Oracle.DataAccess
gacutil /u Policy.2.112.Oracle.DataAccess
gacutil /u Policy.2.121.Oracle.DataAccess
gacutil /u Policy.2.122.Oracle.DataAccess
gacutil /u Policy.4.112.Oracle.DataAccess
gacutil /u Policy.4.121.Oracle.DataAccess
gacutil /u Policy.4.122.Oracle.DataAccess
gacutil /u Oracle.DataAccess
gacutil /u Oracle.DataAccess.resources
gacutil /u Policy.4.121.Oracle.ManagedDataAccess
gacutil /u Policy.4.122.Oracle.ManagedDataAccess
gacutil /u Oracle.ManagedDataAccess
gacutil /u Oracle.ManagedDataAccess.resources
gacutil /u Oracle.ManagedDataAccessDTC
gacutil /u Oracle.ManagedDataAccessIOP
gacutil /u Oracle.ManagedDataAccess.EntityFramework
Entry System.Data.OracleClient should not be removed, this one is installed by Microsoft - not an Oracle component!
Instead of gacutil /u ... you can also use OraProvCfg /action:ungac /providerpath:... if OraProvCfg is still available on your system. You may find it at %ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe.
With a text editor, open XML Config file %SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config and delete branch <oracle.manageddataaccess.client>, if existing.
Do the same with:
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
%SYSTEMROOT%\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\Config\web.config
Instead of editing the XML Config file manually you can also run (if OraProvCfg.exe is still available on your system):
%ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe /action:unconfig /product:odpm /frameworkversion:v4.0.30319
%ORACLE_HOME%\odp.net\managed\x86\OraProvCfg.exe /action:unconfig /product:odpm /frameworkversion:v4.0.30319
%ORACLE_HOME%\odp.net\managed\x64\OraProvCfg.exe /action:unconfig /product:odp /frameworkversion:v4.0.30319
%ORACLE_HOME%\odp.net\managed\x86\OraProvCfg.exe /action:unconfig /product:odp /frameworkversion:v4.0.30319
Check following Registry Keys and delete them if existing
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed
HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.DataAccess.EntityFramework6\
HKLM\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net
HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net
HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess
HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6
HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed
HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.DataAccess.EntityFramework6\
HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Managed Driver
HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Unmanaged Driver
HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Provider for OLE DB
Delete the Inventory folder, typically C:\Program Files\Oracle\Inventory and C:\Program Files (x86)\Oracle\Inventory
Delete temp folders %TEMP%\deinstall\, %TEMP%\OraInstall\ and %TEMP%\CVU* (e.g %TEMP%\CVU_11.1.0.2.0_domscheit) if existing.
Do everything suggested by ziesemer.
You may also want to remove from the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\<any Ora* drivers> keys
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers<any Ora* driver> values
So they no longer appear in the "ODBC Drivers that are installed on your system" in ODBC Data Source Administrator
Do everything suggested by ziesemer.
You may also want to :
Stop the Oracle-related services (before deleting them from the
registry).
In the registry, look not only for entries named "Oracle"
but also e.g. for "ODP".