SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 share inventory between two databases
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

niravmehta
Starting Member

United Kingdom
1 Posts

Posted - 07/02/2013 :  07:51:59  Show Profile  Reply with Quote
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

India
52249 Posts

Posted - 07/02/2013 :  07:57:27  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000