when i use a two server . i want take a data from a two different server in a
single table . plz give me suggetion for me
when i use a two server . i want take a data from a two different server in a
single table . plz give me suggetion for me
connect from one server to another through proper authorisation then read the data.
Hi Hitesh!
I guess u need use "join". write a procedure which connect both the servers & then connect the databases and then use join for combine tables.
Hope this will work!
Thanks & Regards.
M.A.Raafay.
debasisdas How exactly do you connect from one data server to another, read and store/join the data to the other server?
raafay, where will this procedure(I assume you are talking about DB stored procedure) reside that can join both tables from two different servers??
There might be many ways of achieving this work done. One among them is to use the import/export functions of the database. Export the data from one data server into a file, import it to the other.
After that it is child's play to work with the data you have.
Usually you can do this 9If in Unix) by just writing a script that connects to one server, exports the data exit the connection. Connect to the other server where you want to store the final data , import this exported data file...
But in reality we bearly get into such situation. Related tabled should be maintained in a single database and the communication between data servers if needed must be better architectured.
If you need any more help/info, let me know.
Cheers!
Kalayama
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
Using LinkedServer concept we can connect & get the data's from the 2 different database or different servers..
Using OPENDATASOURCE we can get it.
Syntax:
OPENDATASOURCE ( provider_name, init_string )
refer the SQL Server Help
http://msdn2.microsoft.com/en-us/library/ms179856.aspx
Hi,
I am not sure where you want to use the data but you can follow the below method.
First Need to create a view like Select * from server1.table Union Select * from Server2.table
then your view will be ready to use if structure of both tables is same.
Regards,
Upendra