Home > Back-end >  The same database data transfer between two servers
The same database data transfer between two servers

Time:09-21

Two servers are linked together, the database structure completely consistent, how can you put the data in the table1 DB1 PC1 is transferred to the PC2 in DB2 table2, table1 and table2 table structure completely consistent,
As if to say there is a call the DBLink, where the statement can use ADOquery execution?

CodePudding user response:

MSSQL? Local area network (LAN)?
Database with synchronization and replication mechanism

Read program cycle, insert can also

CodePudding user response:

Under the research database, such as MySQL has the function of master-slave replication

CodePudding user response:

SQL function of import and export data, synchronization in the SQL server agent,

CodePudding user response:

Another, completely copy to make A database file, the database B on recovery, both is the same,

CodePudding user response:

Should is to make A database backup files,

CodePudding user response:

Use mssql2000 DTS
Mssql2008 use SSIS

CodePudding user response:

Can remember there is a link, the link and like the same database operations, with a link table name, haven't contact for a long time, don't know right

CodePudding user response:

Oracle can dblink directly, so, relative to the 2 tables in A database, can be directly insert A () the select * from B

CodePudding user response:

It can be:
A machine server ServerA
B machine server ServerB
1, join in ServerB ServerA client code, let ServerB can access to the client's name ServerA,
2, begin ServerB zero during the night, through the second cycle:
(1) database tables list cycle
(2) the cycle of rows in the table
3. Write a method to update copy ServerA and ServerB, data with watches,

CodePudding user response:

Can use the database OGG technical implementation

CodePudding user response:

In SQL to establish link server first, and then you can use the SQL statements directly to the table and record two servers to operation,

CodePudding user response:

Table 1 cycle, inserted into the table 2. This is the most direct way,

CodePudding user response:

The building hasn't been solved, the matter for DataSnap a piece of cake,

CodePudding user response:

The following is used in the example,
The exec sp_addlinkedserver 'target server alias',' ', 'SQLOLEDB', 'the target server IP'
The exec sp_addlinkedsrvlogin 'target server alias',' false ', null, 'login user name' and 'password'
When not to perform the following statement is ok,
The exec sp_dropserver 'target server alias',' droplogins'

Transfer the data directly in the SQL statement is ok, example:
Insert into the target server alias. The database name. Dbo. The table name select * from table name

CodePudding user response:

On the 14th floor qq_19784269
reference response:
is used in the example below,
The exec sp_addlinkedserver 'target server alias',' ', 'SQLOLEDB', 'the target server IP'
The exec sp_addlinkedsrvlogin 'target server alias',' false ', null, 'login user name' and 'password'
When not to perform the following statement is ok,
The exec sp_dropserver 'target server alias',' droplogins'

Transfer the data directly in the SQL statement is ok, example:
Insert into the target server alias. The database name. Dbo. Table name select * from table name


Learning, though not to copy, but this seems to be better with dots

CodePudding user response:

reference 15 floor liups response:
learning, though not to copy, but this seems to be better in some


This method in essentially is possible, but to use programming language to operate when not line, also is to use ADOQUERY you say no, should be also need some Settings, is in the study, I am currently operating is to use two database connections, but is very slow, one million data to an hour can go out,

CodePudding user response:

What also need to set?
The exec sp_addlinkedserver 'target server alias',' ', 'SQLOLEDB', 'the target server IP'
The exec sp_addlinkedsrvlogin 'target server alias',' false ', null, 'login user name' and 'password'
The exec sp_dropserver 'target server alias',' droplogins'

Which three statements if saved as a stored procedure execution complains:
In the sys. Can not find a server in the servers' XXX ', verify that the specified server name is correct, if necessary, please execute the stored procedure sp_addlinkedserver to add servers to the sys. The servers,

Online to find the solution is just to say to want to change the server name, and then not then, I see a sea!!!!!

CodePudding user response:

Use mssql2000 DTS
Use SSIS mssql2008
Oracle has DBlink
  • Related