Sponsored Content
Top Forums Web Development How do you sync tables in mysql between two different servers? Post 302380518 by Hammadi dali on Tuesday 15th of December 2009 11:31:32 AM
Old 12-15-2009
Hi
You can look for the difference between the table's columns by column like this:
PHP Code:
select from table ABC  where ABC.<column namenot in (select ABC2.<ColumnNamefrom table ABC1 where ABC.<columnName> = ABC1.<columnName>) 
Then refering to the result of the query update the tables.

Cheers
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

TODO: Sync User Tables Between Databases

Need to eventually sync the MY.UNIX userdata to the forums database (and others). Suggestions on the best approach welcome. (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

sync files from two different servers.

I have a directory called UNIX 1 which contains 2 files and uploaded into two different servers. Now I want to check whether the directory contains both the files. If not, then need to sync the directory. Please let me know how to do that in shell scripting. (2 Replies)
Discussion started by: madan1
2 Replies

3. UNIX for Advanced & Expert Users

How to Sync two servers

Hi All, want to sync. two servers , both are having solaris os. If am updating any thing in one server , it will automatically sync. with the other server . Is it possible , if so den how ? (3 Replies)
Discussion started by: natraj005
3 Replies

4. Programming

MySQL: Create a relation between two tables.

Hello everybody, I'm having troubles creating a relation between two tables in a MySQL database. Having two tables, being one which contains users information (username, password, user ID, etc) and the other the one which contains transactions information (operation type, user ID of the user who... (2 Replies)
Discussion started by: semash!
2 Replies

5. Programming

MySQL join four tables!

Hello; I want merge four MySQL tables to get the intersection that have a common field for all of them. Join two tables is fine to me, but my this case is different from common situations and there are not very many discussions about it. Can anybody give me some idea? Thanks a lot! Here is part... (8 Replies)
Discussion started by: yifangt
8 Replies

6. Solaris

Client does not sync date with ntp servers

We had a network problem a couple of days before that caused 1 interface to down and up. But today I have noticed that our date is wrong, our system have 4 servers and the other 3 are OK. I used <date> command, the result is: Fri Jan 2 17:57:55 ICT 1970 I have tried set date to be the same as... (3 Replies)
Discussion started by: salvation3103
3 Replies

7. Solaris

Best practise for keeping cronjobs across 2 servers in sync

Hi all, I have 2 server A and B. B is acting as standby for A. The cronjobs running in A must not be run in B until failover. The activation of cronjobs in B can be manual. In server A, I am doing the following 1) create a cron/job script that does "crontab -l >... (5 Replies)
Discussion started by: javanoob
5 Replies
DB2_TABLES(3)								 1							     DB2_TABLES(3)

db2_tables - Returns a result set listing the tables and associated metadata in a database

SYNOPSIS
resource db2_tables (resource $connection, [string $qualifier], [string $schema], [string $table-name], [string $table-type]) DESCRIPTION
Returns a result set listing the tables and associated metadata in a database. PARAMETERS
o $connection - A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. o $qualifier - A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string. o $schema - The schema which contains the tables. This parameter accepts a search pattern containing _ and % as wildcards. o $table-name - The name of the table. This parameter accepts a search pattern containing _ and % as wildcards. o $table-type - A list of comma-delimited table type identifiers. To match all table types, pass NULL or an empty string. Valid table type iden- tifiers include: ALIAS, HIERARCHY TABLE, INOPERATIVE VIEW, NICKNAME, MATERIALIZED QUERY TABLE, SYSTEM TABLE, TABLE, TYPED TABLE, TYPED VIEW, and VIEW. RETURN VALUES
Returns a statement resource with a result set containing rows describing the tables that match the specified parameters. The rows are composed of the following columns: +------------+---------------------------------------------------+ |Column name | | | | | | | Description | | | | +------------+---------------------------------------------------+ | TABLE_CAT | | | | | | | The catalog that contains the table. The value is | | | NULL if this table does not have catalogs. | | | | |TABLE_SCHEM | | | | | | | Name of the schema that contains the table. | | | | |TABLE_NAME | | | | | | | Name of the table. | | | | |TABLE_TYPE | | | | | | | Table type identifier for the table. | | | | | REMARKS | | | | | | | Description of the table. | | | | +------------+---------------------------------------------------+ SEE ALSO
db2_column_privileges(3), db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_spe- cial_columns(3), db2_statistics(3), db2_table_privileges(3). PHP Documentation Group DB2_TABLES(3)
All times are GMT -4. The time now is 02:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy