What special issues are at play when loading a config file from the command prompt with DTExec? - sql-server-2005

If I run a package from the Management Studio, and specify a configuration file, everything works as expected. I can also set the package to get it's config path from an environment variable, and that approach works as well.
However, if I try and run the package from the command prompt with DTExec I get the error:
Cannot load the XML configuration
file. The XML configuration file may
be malformed or not valid.
The command I'm using to execute the package is:
dtexec /conf ConfigurationDemo.dtsConfig /f Package.dtsx
I am running the dtexec from the folder where these two files reside. Is there an addtional switch or something that must used to get dtexec to behave the same was at the management Stduio in launching a package?

Have you checked the config file is a valid XML file? By the look of the error message there may be a problem with it. When you run it from SSMS is it using the same config file?

Related

Error in running trace32 with command line

I have a .cmm file which helps in debugging of Qcomm chipsets.
This file has a line : cd ../../../../../modem_proc
When I run this same cmm file using T32 GUI, it runs fine and does the work. But when I am trying to run the same file using windows command line using,
C:\T32\bin\windows64>t32mqdsp6.exe -c C:\T32\config.t32 -s D:\path\to\xxx.cmm
Following error is thrown in T32: syntax error in B::cd ../../../../../modem_proc
What am I missing here? I have no hands-on experience with T32 what-so-ever.
The problem probably results from different working directories. Type
PRINT OS.PWD()
in the GUI and add it to the top of the script. I'd suspect they are different.
Don't use working directory relative paths, instead use paths relative to the script, e.g.
CD ~~~~/../../../../modem_proc
The four tilde (~) symbols mean "directory of the currently executed script". There's still a possible issue with this solution when using multiple GUIs and the intercom, but for most use-cases this should be OK.
When starting TRACE32 (up to build 99518) without option "-s", it starts a default script t32.cmm form your TRACE32 installation directory. But t32.cmm is not executed, when "-s" is used.
So probably your t32.cmm is changing your working directory. If so you can fix the issue by adding the line
DO ~~/t32.cmm
to the top of your script xxx.cmm.
See also https://www.lauterbach.com/frames.html?help_autostart.html
The default working path is also set by the TRACE32 configuration file. That is the file passed with "-c". So if your are using a different configuration file than C:\T32\config.t32 when starting your TRACE32 GUI the normal way, then you should use that configuration file also when starting TRACE32 from the command line.
To get the path of the configuration file usually used, start TRACE32, execute command AREAand then command PRINT OS.PCF()
Furthermore dev15 is probably right here https://stackoverflow.com/a/53671657/4727717:
Use paths relative to the PRACTICE script (cmm-file) by starting each path with four tildes.

Yii2 archive installation symbolic link issue

I am trying to install Yii framework via archive file in Windows 7...after downloading the file I tried extracting it into a folder in my C:\wamp\www\bid location, however, I encounter an error saying this:
! C:\wamp\www\bid\yii-basic-app-2.0.2.tgz: Cannot create symbolic link C:\wamp\www\bid\basic\vendor\bin\markdown
A required privilege is not held by the client.
! C:\wamp\www\bid\yii-basic-app-2.0.2.tgz: Cannot create symbolic link C:\wamp\www\bid\basic\vendor\bin\yii
A required privilege is not held by the client.
I thought that perhaps Winrar can't extract tgz files so I downloaded 7-zip...Using 7-zip it extracted into a tar file and the tar file was extracted with no errors...For some reason though I do not seem to have the framework folder that seem to be in other people's directory structure...Moreover after trying create my own framework folder and performing this command:
yiic webapp C:\wamp\www\bid
It states that yiic is not recognized as an internal or external command
Can someone tell me what I'm doing wrong...I've tried setting this up numerous times and failed
You need to run 7-Zip File Manager in administrator mode.
Right-click the icon of 7-Zip File Manager, and then click "Run as administrator".
you need to call the command with php since it is actually a external command, i do it like this
php ./yiic webapp NameOfApp
This way your terminal understand that yii is a program that runs with php.
Another solution is to add the yii path to your environmental variable, regards

Using SSIS package to zip all the txt files and move to related folder [duplicate]

I am trying to zip the contents of a Folder in SSIS, there are files and folders in the source folder and I need to zip them all individually. I can get the files to zip fine my problem is the folders.
I have to use 7.zip to create the zipped packages.
Can anyone point me to a good tutorial. I haven't been able to implement any of the samples that I have found.
Thanks
This is how I have configured it.
Its easy to configure but the trick is in constructing the Arguments. Though you see the Arguments as static in the screenshot, its actually coming from a variable and that variable is set in the Arguments expression of Execute Process Task.
I presume you will have this Execute Process task in a For Each File Ennumerator with Traverse SubFolders checked.
Once you have this basic setup in place, all you need to do is work on building the arguments to do the zipping, how you want them. A good place to find all the command line arguments is here.
Finally, the only issue I ran into was not providing a working directory in the command line arguments for 7zip. The package used to run fine on my dev environment but used to fail when running on the server via a SQL job. This was because 7zip didn't have access to the 'Temp' folder on the SQL Server, which it uses by default as the 'working directory'. I got round this problem by specifying the 'working directory as follows at the end of the command line arguments, using the -ws switch:
For e.g:
a -t7z DestinationFile.7z SourceFile -wS:YourTempDirectoryToWhichTheSQLAgentHasRights

SSIS package runs without Config file

I am New to SSIS config side. I have created one package with its config file. My Project placed into my account folder at server. but I created the config file which I placed at shared drive folder and also copy the mypackage.dtsx file into another shared folder.
Now I have ran the package with dtexec.exe /f "mypackage.dtsx" without using config file even though it successfully run.
even I have changed some of the property into the config file and ran the package with use of the dtexec.exe command(mentioned above) and it was executed successfully.
So I have a question that, Do I need the config file at dtexec.exe command line because I can run my package by "dtexec.exe /f "mypackage.dtsx" " too?
I saw the syntax of dtexec.exe /f "package.dtsx" /config "myconfig.dtsconfig"
Please guide me...Does the package contains the config file and its changes?
The package will remember it's saved settings. The benefit of a config file is that if you need to override/shange the settings that are contained in it, you can do that without needing to open, fix, and redeploy your package. A config file is not ever necessary, it is just a convenience to you the developer, especially if your environment has a strict change management policy. It is usually easier to change values in a config than to edit and redeploy a package under strict change managment.
CLARIFICATION
It appears from your question that you may be thinking that when you change the config it will change your package regardless of including your config in your execution. All of the information from the config will be in the package at the time you save it, but it may differ from what is in the config. If you run without config, you are running exactly what is saved in the package. Package executions work like this:
Load package with all configurations from the saved .dtsx file
Check for configurations to load.
Load configuration in memory and overwrite values loaded from .dtsx package.
Execute.
This is simplified, and there are other things going on, but at the basic level this is accurate.

How can i specify the relative file of dtsconfig file for SSIS in SQL JOBS

I am working with ssis package. and i developed some packages with the configuration file. In the configuration file i given the all relative paths of the connections like FlatFileConnection, OLEDB Connection etc. it is running fine with dtexec command with /config configuration file path.
But now i need to create a sql job to run this ssis package automatically every day. In this case i want to give the relative path of the config file(I dont want to hard code to the path of configuration file. it should take from the same path of the .dtsx file path) . how can i do this?
Thanks in advance.
Eshwer
You can’t!
You must have the path for the config file on your job step.
If you had it configured somewhere else you would need a configuration to show where the cofig file is. Doesn’t make sense, right?
In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job…, name it , myJob.
Under Steps, New Step, name it, Step1,
Type: SQL Server Integration Service Package
Run as: myProxy
Package source: File System
Browse to select your package file xxx.dtsx
Click Ok
Schedule your job and enable it.........