473,586 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

making identical table changes on many databases

Hi,
We have a significant (and increasing) number of identical databases
spread over numerous servers (linux) and are finding it a pain making
table changes since we are currently issuing the alter command manually
against each db. We are looking for ways to simplify this process - one
idea we have is to put the alter stmt into a script file and have
another script which issues a connect to each db and then execute the
script containing the alter stmt. Some sort of error handling would be
needed of course. Anyone doing anything similar or have any other ideas
?
Regards,
John Enevoldson

Aug 3 '06 #1
3 1440
I've done exactly that. Implementation included using a list of
databases to be processed one at a time, which made it easy to update
the process without recoding the procedure. I also included the following:
1. The ability to use an input parameter to update a one or more
databases only. (Great for testing an update and incremental
implementation. )
2. Output from the update(s) was appended to a file - feed it into a
"tee" command with the append option so you can see the results and have
a permanent record of the updates. The output file can be fed into grep
to verify what databases were updated.
3. Append a timestamp to the file before writing any output to it. If
you have multiple DBAs, include the userid with the timestamp.

Keep the output file from the updates as a permanent record of the
completed work. I also used the name of the file containing the update
statements to form the output file name.
Phil Sherman

jo************* @pulsen.se wrote:
Hi,
We have a significant (and increasing) number of identical databases
spread over numerous servers (linux) and are finding it a pain making
table changes since we are currently issuing the alter command manually
against each db. We are looking for ways to simplify this process - one
idea we have is to put the alter stmt into a script file and have
another script which issues a connect to each db and then execute the
script containing the alter stmt. Some sort of error handling would be
needed of course. Anyone doing anything similar or have any other ideas
?
Regards,
John Enevoldson
Aug 3 '06 #2
Hey, guys,

I am curious, why do you have lots of copies of identical databases?
Do they have the same scheme and different data, or is the data
identical too? Is it an embedded application?

Cheers,
-Paul LaPointe

Phil Sherman wrote:
I've done exactly that. Implementation included using a list of
databases to be processed one at a time, which made it easy to update
the process without recoding the procedure. I also included the following:
1. The ability to use an input parameter to update a one or more
databases only. (Great for testing an update and incremental
implementation. )
2. Output from the update(s) was appended to a file - feed it into a
"tee" command with the append option so you can see the results and have
a permanent record of the updates. The output file can be fed into grep
to verify what databases were updated.
3. Append a timestamp to the file before writing any output to it. If
you have multiple DBAs, include the userid with the timestamp.

Keep the output file from the updates as a permanent record of the
completed work. I also used the name of the file containing the update
statements to form the output file name.
Phil Sherman

jo************* @pulsen.se wrote:
Hi,
We have a significant (and increasing) number of identical databases
spread over numerous servers (linux) and are finding it a pain making
table changes since we are currently issuing the alter command manually
against each db. We are looking for ways to simplify this process - one
idea we have is to put the alter stmt into a script file and have
another script which issues a connect to each db and then execute the
script containing the alter stmt. Some sort of error handling would be
needed of course. Anyone doing anything similar or have any other ideas
?
Regards,
John Enevoldson
Aug 4 '06 #3
Development1, Development2, unit test, systems test, audit/validation,
production. This doesn't include cases where there are multiple
production systems for different business units that insist that their
data must be totally separate (including hardware) from other business
units. Yes, I know it sounds insane but when that's the way a client
wants to run their business, or that's the way their auditors tell them
it has to be done, the DBA can't arbitrarily tell them that they can't
keep everything separate.

Welcome to the real world!

Phil Sherman

paul.lapointe wrote:
Hey, guys,

I am curious, why do you have lots of copies of identical databases?
Do they have the same scheme and different data, or is the data
identical too? Is it an embedded application?

Cheers,
-Paul LaPointe

Phil Sherman wrote:
>>I've done exactly that. Implementation included using a list of
databases to be processed one at a time, which made it easy to update
the process without recoding the procedure. I also included the following:
1. The ability to use an input parameter to update a one or more
databases only. (Great for testing an update and incremental
implementatio n.)
2. Output from the update(s) was appended to a file - feed it into a
"tee" command with the append option so you can see the results and have
a permanent record of the updates. The output file can be fed into grep
to verify what databases were updated.
3. Append a timestamp to the file before writing any output to it. If
you have multiple DBAs, include the userid with the timestamp.

Keep the output file from the updates as a permanent record of the
completed work. I also used the name of the file containing the update
statements to form the output file name.
Phil Sherman

jo*********** **@pulsen.se wrote:
>>>Hi,
We have a significant (and increasing) number of identical databases
spread over numerous servers (linux) and are finding it a pain making
table changes since we are currently issuing the alter command manually
against each db. We are looking for ways to simplify this process - one
idea we have is to put the alter stmt into a script file and have
another script which issues a connect to each db and then execute the
script containing the alter stmt. Some sort of error handling would be
needed of course. Anyone doing anything similar or have any other ideas
?
Regards,
John Enevoldson

Aug 5 '06 #4

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

Similar topics

8
1772
by: Greg | last post by:
Hello, I've to manage many 'table' (having same scheme) on the same server. And I ask myself what could be the best to do (and if you know, why) : Creating as many database (the name would be a 8byte int value (converted to a string)) as necessary, all with the same table struct (and table name), or create 1 database and in it create...
5
3739
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for Office 2000. I am creating a database to track student athletes. I have created the following tables. The table title is to the far left, with fields...
3
4901
by: Raj | last post by:
Hi, I am trying to add some more information to the table which already has a lot a data (like 2-3000 records). The new information may be adding 2-3 new columns worth. Now my questions are: (1)Is it a good idea to add new columns to the existing table? then it will create these new columns for all old records, will it not result in wasting...
0
1921
by: Mike Cox | last post by:
Hi. As most of you know, comp.databases.postgresql.general is a wonderful resource. What you may not know is that it has not gone through a process that would enable it to be listed on hundreds of usenet servers worldwide by default. Normally groups that are under the comp.* hierarchy go through a something called RFD and CFV. ...
48
3841
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a query of all students in both tables with no duplicates. No clue whatsoever.
3
2165
by: AK | last post by:
Hi Our product uses MS-SQL Server 2000. One of our customer has 10 installations with each installation stroring data in its own database. Now the customer wants to consolidate these databases into one and we already have plan for that by consolidating one DB at a time. But first they want to find how many unique or duplicate entries they...
1
1407
by: Parasyke | last post by:
Thanks in advance to anyone on this... I have a central (Access 2003) database that I need to import about 10 tables from other databases (also Access 2003). Unfortunately they all have the table with an identical name (Orders). Due to the complexity of each database I can't easily cahnge the name of the ten. Is there a way I can import these...
11
35390
by: inpuarg | last post by:
I have 2 datatables. They are identical. I want to compare them by cell's content. They are all same. But dt1 == dt2 or dt1.GetHashCode() == dt2.GetHashCode() doesn 't work. There are big amount of rows in theese datatables . So i don 't want to enumerate each rows. This is not efficient and unacceptable for my current application.
10
3231
by: Phil Latio | last post by:
I am inserting data into user table which contains 5 fields, sounds simple enough normally but 2 of the fields are designated as UNIQUE. If someone does enter a value which already exists, how do I capture this specific error? Would it make more sense to actually run a SELECT query first and if that returned a result, then I use that for...
0
7839
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...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
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...
0
6614
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...
0
5390
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...
0
3837
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...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
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
1449
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.