473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1413
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
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 5 '06 #4

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

Similar topics

8
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...
5
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...
3
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:...
0
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...
48
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...
3
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...
1
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...
11
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...
10
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.