Process Task - Unzipping files is failing - ssis-2012

I am using sql 2012 SSIS process task to unzip my files but I am getting the following error
[Execute Process Task] Error:
In Executing "C:\Windows\System32\compact.exe" "x F:\Imports\RenLearn\'Roseville City School District'.zip -oF:\Imports\RenLearn\Roseville City School District" at "",
The process exit code was "1" while the expected was "0".
The two paths above are created as variables along with the path to . Any suggestions and thanks ahead of time.

I had the exact same problem and I realised that I had copied the .exe file in the same folder as the .zip files because this resolved my problem in BIDS, but in Data Tools it seems like necessary to do that.. sounds little weird, but it worked for me so perhaps it will for you as well. :-)

If you have set the "Working directory" property, you need to remove it to make the task work.

Remove the space in zip file name as the Execute process fails if the file contains special characters. Instead of spaces, use "_" and try it. Even the same issue I got later was sorted out by this approach.

Related

Parsing logs in Zabbix

i'm try to parse logs from windows folder in Zabbix, but everyday creates a new directory like "2022_03_15" and log files in her, how parse a new name directory?
log["C:\Windows\Temp\app\web\0\Log\YYYY_MM_DD\Application.log"]
The logrt item would come closest but reading https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/zabbix_agent#supported-item-keys
It notes:
file_regexp - absolute path to file and the file name described by a regular expression. Note that only the file name is a regular expression
So, sadly, this is not possible yet.
You could try to work around this by first using a list to find the latest directory and use lld to create a new log item when that is needed. For these cases it is a pity that the file and location are part of the item key.

Erlang : exception error: no match of right hand side value {error,enoent} while reading a text file

I am currenly working on an erlang project and stuck in reading the file. I want to read a text file which is in the /src folder where all the erlang and a text file are in the same structure. Then too, I am not being able to read the file despite of specifying file paths. Any help would be appreciated.
start() ->
{ok,DataList} = file:consult("Calls.txt"),
io:format("** Calls to be made **"),
io:fwrite("~w~n",[DataList]).
The data file stores contents like : {john, [jill,joe,bob]}.
Try add folder name to the path or try set full patch to the file:
1> {ok,DataList} = file:consult("src/Calls.txt").
Notes: the error {error,enoent} mean that the file does not exist or you don't have a rights to read/write current file, for this case need set 777 rights or similar.
If you need to use src/call.txt, then this simply means that your IDE (or you) has created a src folder in which the calls.txt file has been placed. At the same time, the IDE is using a path that only includes the top level folder (i.e., the root folder for the IDE project). So src/call.txt must be used in that case. This isn’t a problem with Erlang, or even the IDE. It’s just the way your project is set up.
You can do either of two things. Move the calls.txt file up one level in the IDE file manager, so that it can be referenced as calls.txt, not src/call.txt. You can also just change the path to “calls.txt” before you run it from the command line.
enoent means "Error: No Entry/Entity". It means the file couldn't be found. When I try your code, it works correctly and outputs
[{john,[jill,joe,bob]}]

'C:\Program' is not recognized error

I set ANT_HOME=C:\Program Files\ant-1.8.0
then try to build local host by Weblogic. But, it gives me the following error:
C:\Program' is not recognized as an internal or external command.
I already tried putting quotes when defining the variable: "ANT_HOME=C:\Program Files\ant-1.8.0". but it is not working either, it shows the following error message:
Files\ant-1.8.0""=="" was unexpected at this time.
I have been stuck here for the past few weeks. Iv'e googled it many times but I still cant resolve the problem.
Edited:
dir c:\pro /x
didn't show the Progra~1 and Progra~2
set "var=content" is a good practice to avoid having unintended trailing spaces, but your error occures when using the value. There you need qoutes (that are not part of your variable content with the above syntax):
set "folder=c:\program Files"
dir %folder%
dir "%folder%"
the first dir will give you "file not found", because it tries to show you the contents of c:\program (which doesn't exist) plus the contents of files (which also doesn't exist). The second dir will show you successfully the contents of "c:\program files"
Even current versions of Windows automatically create a second file name which adheres to the old 8.3 naming scheme which has been there since DOS was invented. This name does not contain a space character which makes it a good candidate to be used in scenarios like that described by you.
Unless this has been explicitly disabled you can show the alternative filenames.
Open a dosbox and enter dir C:\pro* /x. The result will be similar to this:
I ran this on a German Windows 10 Pro but the output will be identical on other versions of Windows.
You can see that for C:\Program Files Windows created an alternative name C:\Progra~1.

SP2-0310: unable to open file "dba_files_all.sql"

Please advise. This SQLPlus call:
SQL > #dba_files_all
...is not working.
SP2-0310: unable to open file "dba_files_all.sql"
How can I resolve the error?
You need to provide the path of the file as string.
Put the path in double quotes and it will work.
For example:
#"C:\Users\Arpan Saini\Zions R2\Reports Statements and Notices\Patch\08312017_Patch_16.2.3.17\DB Scripts\snsp.sql";
I encountered this error when attempting to execute a file in the same folder as the calling function. In my example, this process:
Was executed in SQL Developer;
Has been a long-standing part of my system (moving a setup file with some settings and variable names through various folders; those folder names include the feature IDs and a short description);
Has worked fine in the past;
Did not require any pathing in my case because the files were in the same folder;
Failed on the most recent attempt with the error above (SP2-0310).
The issue in my situation was that the folder name in which it failed included a character (#) that was valid for a Windows file name, but confusing to SQL Developer.
1.Use absolute path:
/u01/app/oaracle/test.sql
2.Check the path to see if script exists:
ls -l /u01/app/oaracle/test.sql
Note that
SQL> #some_file.sql
means that sql app you are using will look for that using "absolute path" so if you want to use "relative path" use following format [add ?]
SQL> #?some_file.sql
else, use "full path" with first command.
All the answers so far imply that absolute paths are required. That aren't. Relative paths in sql is pretty universal in sql tools. Sometimes, you have to configure a lost default configuration such as in the case of SQLDeveloper as explained in this answer:
https://stackoverflow.com/a/24003529/442968
I just run into same error when I was trying to unlock oe schema.
While reading the error, I realized that when I run the following line:
>SQL #?/demo/schema/order_entry/oe_main.sql
The error returned a completely different path
SP2-0310: unable to open file "C:/app/USER/product/18.0.0/dbhomeXE/demo/schema/order_entry/oe_main.sql"
Thus I copied my sql file to the path specified by the error and everything worked. I recommend that you do the same. Check the path in the error and adjust accordingly.
Use absolute path or run sqlplus command from a shell/dos that points to the path of the script. Also, to use a masterscript, refer to subscripts with ##.
verify that your file has an extension .sql not .sql.txt

How do I fix 'Setup project with custom action file not found' exception?

I am trying to create a setup project for a Windows Service. I've followed the directions at http://support.microsoft.com/kb/816169 to create the setup project with no trouble.
I want to be able to get a value during the installation in order to update the app.config with the user's desired settings. I added a Textboxes (A) dialog to retrieve the values. I set the Edit1Property property to "TIMETORUN", and in my Primary Output action's CustomActionData property I put in the following: /TimeToRun="[TIMETORUN]\". So far so good. Running the setup I can retrieve the TimeToRun value from the Context.Parameters collection without issue.
In order to locate the app.config I need to also pass in the value of the TARGETDIR Windows Installer Property to my custom action. This is where things begin to fall apart. In order to achieve this, the above CustomActionData must be altered like so: /TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\". Now when I run the setup I get the following error message:
Error 1001. Exception occurred while initializing the installation.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\SysWOW64\Files' or one of its dependencies. The system cannot
find the file specified.
If you google this problem you will inevitably find people having tremendous success by simply adding the trailing slash to the /TargetDir="[TARGETDIR]\" portion of the CustomActionData. This unfortunately does not solve my issue.
I tried so many different variations of the CustomActionData string and none of them worked. I tried logging to a file from my overridden Install method to determine where the breakage was, but no log file is created because it's not even getting that far. As the error indicates, the failure is during the Initialization step.
I have a hunch that it could be one of the dependencies that the setup project is trying to load. Perhaps somehow something is being appended to the CustomActionData string and isn't playing well with the TARGETDIR value (which contains spaces, i.e. "C:\Program Files\My Company\Project Name"). Again, this is another hunch that I cannot seem to confirm due to my inability to debug the setup process.
One further thing to mention, and yes it's another hunch, could this be an issue with Setup Projects on 64-bit version of Windows? I'm running Windows 7 Professional.
I'll provide names of the dependencies in case it helps:
Microsoft .NET Framework
Microsoft.SqlServer.DtsMsg.dll
Microsoft.SqlServer.DTSPipelineWrap.dll
Microsoft.SqlServer.DTSRuntimeWrap.dll
Microsoft.SQLServer.ManagedDTS.dll
Microsoft.SqlServer.msxml6_interop.dll
Microsoft.SqlServer.PipelineHost.dll
Microsoft.SqlServer.SqlTDiagM.dll
As you may glean from the dependencies, the Windows Service is scheduling a call to a DTSX package.
Sorry for the long rant. Thanks for any help you can provide.
The answer is so maddeningly simple. If the last argument in the CustomActionData is going to contain spaces and thus you have to surround it with quotes and a trailing slash, you must also have a space following the trailing slash, like this:
/TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\ "
The solution and explanation can be found here.
Had a similar issue. In my case, it was odd because my installer had ran successfully once, then I uninstalled my app via Add/Remove Programs successfully, did some coding (did NOT touch my CustomActionData string), and rebuilt my project and setup project. It was when I re-ran my MSI that I got this error.
The coding I had done was to bring in more values of more parameters I had been specifying in my CustomActionData string. That syntax for getting the parameter values (i.e. string filepath = Context.Paramenters["filepath"]), which was in my Installer class, was actually fine, but as I found out, the syntax of the later parameters I was now trying to get from my CustomActionData string had not been correct, from the very beginning. I had failed to add a second quote around one of those parameters, so nothing else could be obtained.
I was using the "Textboxes (A)" and "Textboxes (B)" windows in the User Interface section. A has 1 box, EDITA1, where I get the path to a file, and B has 2 boxes, EDITB1 and EDITB2, for some database parameters. My CustomActionData string looked like this:
/filepath="[EDITA1]" /host="[EDITB1] /port="[EDITB2]"
It should have been:
/filepath="[EDITA1]" /host="[EDITB1]" /port="[EDITB2]"
(closing quote on [EDITB1])

Resources