SQL Server using Windows Authentication - windows

I'm totally new to Windows programming.
I wish to connect to a SQL Server that utilizes AD authentication. All we need is a simplest possible command line utility to fetch some data and dump it to a text file. Can I use VBScript for this/any-other-simple-script?
My first preference was to use Perl on Unix. Tried dbi:Sybase, doesn't seem to work :(.
TIA.
Edit: I don't have admin privs so my options are pretty limited. Cannot install Python.

If you want a simple "script" try out python pymssql:
http://pymssql.sourceforge.net/
available for windows python 2.4 , 2.5 , 2.6:
http://sourceforge.net/projects/pymssql/files/pymssql/1.0.2/
just install it and check out the samples:
http://pymssql.sourceforge.net/examples_pymssql.php

Googling by keywords powershell + sql server + windows authentication gives several solutions:
http://www.mssqltips.com/tip.asp?tip=1947
http://www.powershellcommunity.org/Forums/tabid/54/aff/24/aft/4540/afv/topic/Default.aspx
http://technet.microsoft.com/en-us/magazine/gg313741.aspx
etc

Related

Build models in h2o flow in windows, use on an AIX server? Help for a non-programmer

I'm hoping someone can give me some advise for taking models built in h2o flow on a windows machine and exporting/using them on an AIX server.
I've been able to use the flow graphical interface to build some models. I'm not a java coder / programmer so have some trouble understanding the instructions on the pojo/mojo files in the documentation and really looking for some step-by-step help on using them.
I have h2o running on a windows desktop machine. The place I want to use it is within SAS programs running on an AIX server. The AIX server has java.
I'm assuming I can do something like:
build model in h2o on my windows desktop
download the pojo or mojo files
do something????
put resulting file(s) from step 3 on the AIX server
use SAS to write out a CSV file in the same format I used to build the model in h2o
use SAS to issue unix command line statements that feed the .csv file into the exported files from step 3 using java and generate a new output .csv file with scored records
read the scores back into my SAS program and continue on my way
Is this do-able?
If not, can someone give me a "for dummies" explanation of how I might do something similar? I don't have admin rights on the AIX server so can't install software.
Thanks for your help.
AIX is big endian and windows (intel) is little endian. So as far as I know the H2O model generated on windows will not directly work on AIX, I think there is some work needed in H2O to make that work. But you can host that model on a PowerVM linux box next to AIX on same power system if that helps. Because you can have a little endian Linux.
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power%20Systems/page/H2O%20Driverless%20AI%20for%20Data%20on%20IBM%20AIX

Possible ways to run windows batch command from Unix

I am trying to run a windows batch command from CentOS 6. I would like to know the best way to achieve this. I explored PsExec and WinExe utilities in unix to connect to windows machine and run the required commands.
I am trying this on a windows VM which is within company network, hence kindly highlight any specific network issues that I may have to check for the setup to run.
Any pointers would help.
Have you seen the examples from the PowerShell for Linux GitHub pages, as the working examples seem to cover this off nicely?
https://github.com/PowerShell/PowerShell/tree/master/demos/SSHRemoting
It will require SSH installed onto your Windows server, but otherwise seems to tick all of your boxes.

Missing Script in WebSphere 7.0

The book and video tutorials that i am following for WebSphere Administration talks about "pmt.sh" script and how to use it.
However, in my WebSphere installation on Linux which is WAS 7.0 [not a ND package] I do not find any "pmt.sh" script.
Can you please let me know the equivalent script of the same and some idea about why it is missing in my Install?
The pmt.sh tool is not available on 64 bit systems.
You will need to use the manage profiles command line tool instead. See the link below to learn how to get and use the interactive wrapper for the command line tool, which makes the command line tool more user friendly.
http://www-01.ibm.com/support/docview.wss?uid=swg21442487

Installation with visual studio 2010

I need to create setup file for installation of these:
-Web app
-Win service
-Run some sql scripts.
I wanted to do all in one setup. For example I want to make method like CreateSetup and in that method to create setup file which will contain installation/run of above 3 things.
If you have some links or idea how to do it please share.
Thank you in advance.
If I come across some solution I will post it here for others as well.
It might very well be worth your while to sit down and learn WIX, it seems the preferred method of dealing with more complex setups. I haven't done the tasks outlined here, but I did mange to have an installer that set up an application on a Windows Mobile device.
Looking around a bit, it does seem you can install web applications: http://www.codeproject.com/Articles/115036/Creating-WIX-Installer-for-ASP-NET-Web-Application
And a windows service: http://blog.tentaclesoftware.com/archive/2009/01/01/21.aspx
And run SQL scripts: How to run sql script to create database using Wix
It does appear you could even capture what is required to build a SQL string through the windows installer GUI, and use that to know where to run the SQL script, and set up any needed connection strings.

Need to see if all Critical Updates are installed on a Windows Server in VBScript

I have a requirement where I need to check Remote Servers to see if all of their Critical updates are installed and then return PASS or FAIL.
Is there a way with WMI for me to do this with VBScript?
EDIT:
I did find this
Windows Update Check with vbscript but it only works on the local machine and not remote.
This link with UpdateHF_v2.6a.vbs by Rob Dunn is made to work with all versions of Windows. It's made with VBS to use WMI, and works on local and remote hosts.. I've been using 2.5a for years. There is no changelog, though Rob is updating the script in response to feedback.
http://community.spiceworks.com/scripts/show/82-windows-update-agent-force-script-email-results-version-2-6
If you need "wrappers" to do this in bulk using a list of computers and psexec to run it, let me know. :)

Resources