SQL Server Agent Adding a Parameter for a CmdExec - sql-server-2008

I want to add a parameter to a step that runs an operating system (CmdExec) in SQL Server Agent. I have searched everywhere and asked my coworkers and none of them had tried it before. I have attached a picture of the screen. I was thinking that I might be able to add the parameter (file path) after the .exe statement, but wasn't sure.
I thought the following might work:
Executable Path Parameter Path
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
This is on a production server and I didn't want to break anything if this isn't correct.
Thanks!

Yes You can use parameters, so your command would be:
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
If there is a space in the name don't forget to use quotes as specified in tip in screenshot:
"C:\My Program\MyApp.exe" "E:\App Info\Client\Config.txt"
Since You want to try it on production server, consider testing your configuration and software on test environment first. If You doubt that this will work, You can set job to execute only this single step to make sure it will work as expected.

Related

How do I build a specific dtproj file within a solution?

I have a solution full of SSIS projects, and I'm trying to build a single one via command line. I know I need to use the devenv.com executable, and if I use devenv.com solution.sln /Rebuild it will process the whole set of projects. However, I cannot seem to get the additional parameters correct. When I try devenv.com solution.sln /Rebuild "Development" /Project "projname", I get an enigmatic The operation could not be completed. The parameter is incorrect. Which parameter? What should it be? I've tried replicating this answer's syntax, but I get the same error. How do I find out what parameter is incorrect? So far the closest I can get is to rename the .sln file so it can't be found and just specify the .dtproj file.

OMA firmware update using Leshan server: Where to save the files?

I'm quite new to the world of the IOT (protocols). I want to update some devices remotely (they will be installed about 8000km away from my working place). I have found out that LWM2M would fit to my scope.
Because the internet connection there is not stable and the bandwidth is low, I have decided to also install a Raspberry Pi to collect the data of the sensors and to install a Leshan server to trigger the updates.
I have tested the devices and I can register them to the Leshan server on the Pi, read some data, and reboot the devices. The problem is, I don't know where to save my binary file for the update, so that the device can download them.
I tried following steps:
Save the file on [leshan-dir]/update.bin.
Write the "Package URI": coap://[raspi-IP]:5683/update.bin
After that, the backgroud color of the button "Write" changes to green.
Execute the update
The response of the server is 404 [Not Found].
I have looked for any API to find out where I can save the .bin file, but without success. And because nobody seems to have had a similar error, I start thinking I have missed some points.
Where do I have to save the files on the Raspbery Pi, so that I can perform an update?
I found a solution for the problem I exposed above.
I use from the californium-project the demo-app cf-simplefile-server (Ref. https://github.com/eclipse/californium/tree/2.0.x/demo-apps/cf-simplefile-server)
Note: You have to checkout to the git-branch 2.0.x to use it.
To run the leshan server and the file-server on the same machine I had to change the port of one of the server using the file Californium.properties.
I decide to change the ones of the file-server to 5685 and 5686
When both server runs I can insert in Package URI something like:
coap://[[ip_of_the_pi]]:5685/data/[[name_of_the_firmware_file]]
Probably there are better solution for it, but for a coap/lwm2m beginner like it works very well.
Note: If you have bigger file to transfer you can also change the property MAX_RESOURCE_BODY_SIZE
I hope this may help somebody.
Regards,
Elvys

Parameter Value: "Get values from a query" not working on host

I'm having problems when using the option "Get values from a query" in my Parameter settings.
On the server everything works like a charm.
But when I deploy and then launch the report on my hosting, I get an error message:
If I use the option: "None", then everything works fine.
I've placed a test Tablix, to see the result of the dataset on the host, and also this causes no problem.
So the issue is only with the "Get values from a query" section AND only on the hosting.
Anybody got an idea?
EDIT: I turned EnableRemoteErrors on, as requested by the errormessage, but no additional info is given.
The detail of the error is in the SSRS log file located at -->
<SSSRS_INSTALL_DIR>\Report Server\Log Files.
That is where I would go. Based how you describe the dataset driving the parameters works but not when given a value then I would expect this to be a parameter mismatch or missing parameter. Make sure that you are feeding the dataset the parameters you think you are. Also, if you don't allow nulls then make sure you are supplying a default value.
You said, you placed a tablix on the report showing the results of the YearsDOW dataset and this fails. If this also fails when you set your available values to 'None' then we can assume, as the error states, that the issue was with executing the query itself, not your report design.
As this seems to work when you run it from your local machine in development but fails when run from the server I would suspect it's an authentication/permissions issue.
Check the credentials on the datasource in your development environment and compare these to the SSRS server's version of the datasource. Remember, by default datasources do not get overwritten so it maybe that you deployed the datasource initially with one set of credentials then then changed them in your development environment.
If this is the case and the datasource is not used for other reports on the server, then you can either change the project properties to overwrite datasources but personally I prefer to delete the datasource from the server and then redeploy, that way future changes won't affect the servers version unintentionally.
If the datasource is used in other reports without problems then you could just rename the datasource to something unique so it will get redeployed under the new name and your report will point to that new version.

Msbuild running in Jenkins target calling HgPull fails with HgProcessException: The command <hg.exe> is not available

I am porting over an MSBuild script from CCnet to run in Jenkins. The MSBuild project is used to create a deployment package. I would rather have Jenkins drive this process itself but that's a longer term aim.
The problem i am having is (as in the title) when we try and use the HgPull target, from the MSBuild mecurial task (http://msbuildhg.codeplex.com/) we get the error message
HgProcessException: The command hg.exe is not available [Path to project]
I have seen on the project web site that someone solved it by adding the LibraryLocation proeprty to the target but that seems to have made no difference. My target currently looks like this:
Target Name="UpdateSources">
<HgPull
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Force="true"
Update="true"
LocalPath="$(SourcePath)"
/>
<HgUpdate
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Clean="true"
LocalPath="$(SourcePath)"
/>
I'm rather at a loss. Please let me know if you need any more information added to this post to solve this issue. I'm really quite new to MSBuild so really not sure where to start investigating this.
EDIT:
One thing i forgot to mention was that i have tried running the MSbuild command in a console window on the build server and still get the same result. This is really odd given it works fine in CCNet, what magic is CCNet doing to make this command work?
This is now resolved, unfortunately i'm not sure what changes i made to correct these. I believe it may have been down to path separators and whether they where trailing or not in another part of the config file. It does so annoy me with the lack of resilience/consistency between applications where you need to specify paths with/without trailing slashes.
Just a thought, but try adding 'C:\Program Files\TortoiseHg' to your system path. Maybe CCNet has it specified somewhere that Jenkins doesn't have access to.
Also, just for sanity's sake, verify that hg.exe actually exists at that location.

Not able to make calls to mod_roster_odbc functions

I tried to use my own custom roster by integrating mod_roster_odbc. I changed the config file too (commented out mod_roster and make a new entry for mod_roster_odbc). After running with this setup, mod_roster_odbc module is getting started ( I put some logs to in start function, those I can see). But none of other function is not getting called as I alter presence or logged out/logged in.
Please help to identify where I am making the mistake.
I think I know the answer to this. many websites tell you to use mod_roster_odbc.erl to create your own rostering. I believe thats your problem. Many of the functions are merged into mod_roster.erl file itself. I dont think this is mentioned anywhere.
So what you need to do is in ejabberd.cfg enable mod_roster_odbc but dont remove the mod_roster.erl file with the odbc file. This file will take care.
Finally you need to create a rosterusers table (or something like it) so that ejabber can query for friend list. After these changes, just restart ejabber server and you should be good to go. hope this helps.