Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python, unix and mssql

Reply
Thread Tools

Python, unix and mssql

 
 
francisl
Guest
Posts: n/a
 
      12-22-2004
We have to build some script were I work to make a dynamic server inventory.

But, the project team, a windows crew, start it all in vbscript and on
mssql. Note, due to political reason, we can not use mysql or anyother
one that are not *authorize*, it's oracle or mssql. Now we have to make
it work also with our sun and HP unix server(plus one Linux).

So I propose to use python, and after they see my litle python/wxwindow
program, that list windows registry value relate to SUS automatic update
and that let it remotely force a check. They were amaze on how short it
took to make us save a lot of time. - Windows by default put a static
value in its LastWaitTimeout key, in their doc they said 48 hrs. But 48
hrs is to long for a good schedule on production server. Plus it give us
headaches to validate all the update on our network. (~75 winnt/2k/2k3
servers)

back to subject
Question.
Can we, directly from unix select and insert data in a remote mssql
database?

if not, my second though was to put a litle python server on the server
holding the mssql database, which will accept request and insert it in
the database. But is that possible?

Thank you
 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      12-23-2004
francisl wrote:
> Can we, directly from unix select and insert data in a remote mssql
> database?


Sorry, I can't answer that one.

> if not, my second though was to put a litle python server on the server
> holding the mssql database, which will accept request and insert it in
> the database. But is that possible?


Definitely possible. You could, for example, use Pyro
quite effectively for something like that.

-Peter
 
Reply With Quote
 
 
 
 
Steve Holden
Guest
Posts: n/a
 
      12-23-2004
francisl wrote:

> We have to build some script were I work to make a dynamic server
> inventory.
>
> But, the project team, a windows crew, start it all in vbscript and on
> mssql. Note, due to political reason, we can not use mysql or anyother
> one that are not *authorize*, it's oracle or mssql. Now we have to make
> it work also with our sun and HP unix server(plus one Linux).
>
> So I propose to use python, and after they see my litle python/wxwindow
> program, that list windows registry value relate to SUS automatic update
> and that let it remotely force a check. They were amaze on how short it
> took to make us save a lot of time. - Windows by default put a static
> value in its LastWaitTimeout key, in their doc they said 48 hrs. But 48
> hrs is to long for a good schedule on production server. Plus it give us
> headaches to validate all the update on our network. (~75 winnt/2k/2k3
> servers)
>
> back to subject
> Question.
> Can we, directly from unix select and insert data in a remote mssql
> database?
>
> if not, my second though was to put a litle python server on the server
> holding the mssql database, which will accept request and insert it in
> the database. But is that possible?
>
> Thank you


If ODBC access is permissible then you could, for example, use mxODBC on
top of one of the generic ODBC drivers for Unix.

Since Oracle is also an "approved" database you might also want to think
about using the cxOracle module, which AFAIK is available on both
Windows and Unix-like platforms.

There are several ways you could have remote Python processes talking to
each other. Pyro is a package that would let you handle this situation
relatively easily, and I'm sure others will chime in with their favored
solutions.

regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
 
Reply With Quote
 
Scott David Daniels
Guest
Posts: n/a
 
      12-23-2004
francisl wrote:

> Can we, directly from unix select and insert data in a remote mssql
> database?
>

In some sense you can. I used python and mxODBC to talk ODBC protocol
to DB2 / MS SqlServer / Access. It was quite a while ago, and I may
have had to use an odbc-on-linux piece I don't know about. But the
upshot was that my (large, data and CPU-intensive) program ran portably
on both Win2K and Linux. The mxODBC solution will cost money, but not
a lot (and MAL has done a great job letting you discover things about
the far end of the ODBC connection -- development is simple). The
switch between databases was really minimal effort on my part -- the
sysadmin who had to create and backup the DBs was not as sanguine about
the changes. Check with Marc-Andre about the current state of the art
for linux ODBC drivers.

> if not, my second though was to put a litle python server on the server
> holding the mssql database, which will accept request and insert it in
> the database. But is that possible?

This is also easy, and you can simply design a little socket watcher to
get commands, execute them, and return results.

> Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I've got doubt about MARS feature support in ASP.NET 2.0 and MSSQL 2.0 Optimus ASP .Net 2 08-11-2009 07:00 AM
project built using ASP.NET or JSP and MSSQL =?Utf-8?B?eWVucnV5ZWU=?= ASP .Net 0 04-14-2005 08:23 PM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C Programming 18 01-10-2005 03:35 AM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C++ 12 01-10-2005 03:35 AM
my own perl "dos->unix"/"unix->dos" Robert Wallace Perl Misc 7 01-22-2004 10:59 PM



Advertisments