473,609 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python, unix and mssql

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
Jul 18 '05 #1
3 2191
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
Jul 18 '05 #2
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

Jul 18 '05 #3
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
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2332
by: Josh Close | last post by:
Is there a python module that uses the mssql client tools to connect to mssql? When you install php on windows and you want mssql connectivity, you need the client tools and it uses that api to connect. I know there is an ADO connection for postgres to connect from windows, but that's different. Is there anything like this for python? -Josh
3
1706
by: Brane | last post by:
can someone please give me some info regarding subject please advice regards brane
3
2300
by: John Fabiani | last post by:
Hi, I'm hoping someone on the list has connected to sybase/MsSQL with something that works with DBAPI 2.0 from a linux box (SUSE 9.2) because I can't seem to get it done. I found Object Craft's python code that uses FreeTDS. But I can't get it compiled. The code is looking for "sybdb.h" (first error) - of course I don't have "sybdb.h". It is not in Object Crafts code nor in the FreeTDS source. I'm guessing that I need sybase develop...
5
2013
by: Peter Maas | last post by:
I have inherited an extremely messy ASP/VBScript application which is a pain for me to support. Now the customer is thinking about a redesign. I'd like to rewrite the whole thing in Python but the app has to meet some conditions like - IIS frontend - MSSQL db server - Win32 authentication - No 'ugly' URLs like http://server/cgi-bin/frontend.cgi?main.py - Performance: intranet with ~ 1000 users
9
2070
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash script that allows anyone to download, compile (with flags given by user) and install Python and some external modules (e.g. wxPython, PyGTK, Numeric...). I use Python every day and when new version of Python (or some external module) is released, I...
9
1918
by: arvind | last post by:
Hi all, I am going to work on Python 2.4.3 and MSSQL database server on Windows platform. But I don't know how to make the connectivity or rather which module to import. I searched for the modules in the Python library, but I couldn't find which module to go for. Please help me out!
1
1809
by: Marcin Wiszowaty | last post by:
Hello, I work at a company that has 2 development enviroments. One Unix which i dont know anything about and the othe vs.net 03 with MSSQL server 2000 for db. How can i cause applications (scripts) to get run in unix while using preferably vb.net or c# applications run in windows. So far all the unix aplications are started manualy through the command window. Files are sent using FTP. We have XceedFTP client to send files to unix from...
1
5935
by: Aspersieman | last post by:
On Wed, 05 Nov 2008 08:35:23 +0200, 3000 billg <billg3000@hos.twgg.org> wrote: Hi Excellent choice :)
0
8127
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5509
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2529
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.