Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 share inventory between two databases

Author  Topic 

niravmehta
Starting Member

1 Post

Posted - 2013-07-02 : 07:51:59
Hi
I have common product table in db1 and db2. now i want to make it one table because it have one inventory (stock of products) what is the best solution to share product table among two different database.

I have few thoughts
1) writing trigger on update/delete/insert one table and update another same time.
Or
2) creating view on product table and used in second db (i dont know how)

3) replication (i dont know how)

can you guide me on this please. any of the solution or any alternative or best way of doing this ?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-02 : 07:57:27
if you want this to be a ongoing task and always keep tables synchronised i would suggest replication.

http://databases.about.com/cs/sqlserver/a/aa041303a.htm

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -