I have developed a website in C# and SQl server 2005, now I need a clone website with different domain name. But I want to use the same database in both sites. Means, if I update the website from any of the admin, the changes should be replicated in both
sites immediately. The website is hosted at HostGator.
Please suggest me best possible solutions for this.
Some free applications support such configurations. What is special there is they keep a unique id value for each site.
And when you connect from website1.com they read data from a table with that unique id. So you need to alter your database tables and add a new column to seperate your data. And you need to add a new parameter to your stored procedures to read the data for
the current website.
SAP tables also keep such data called ClientId in every table.
But it is also possible to seperate your applications databases. Of course if it is possible to have two databases on your webhost
naveen1988
Member
14 Points
26 Posts
Common database in two same type of websites
Apr 24, 2012 05:06 AM|LINK
I have developed a website in C# and SQl server 2005, now I need a clone website with different domain name. But I want to use the same database in both sites. Means, if I update the website from any of the admin, the changes should be replicated in both sites immediately. The website is hosted at HostGator.
Please suggest me best possible solutions for this.
Thanks
Naveen Jain
nijhawan.sau...
All-Star
16398 Points
3172 Posts
Re: Common database in two same type of websites
Apr 24, 2012 05:13 AM|LINK
Just set your connection strings for each site, and connect .
You can use a single DB server.
eralper
Contributor
6048 Points
971 Posts
Re: Common database in two same type of websites
Apr 24, 2012 06:08 AM|LINK
Hi Naveen,
Some free applications support such configurations. What is special there is they keep a unique id value for each site.
And when you connect from website1.com they read data from a table with that unique id. So you need to alter your database tables and add a new column to seperate your data. And you need to add a new parameter to your stored procedures to read the data for the current website.
SAP tables also keep such data called ClientId in every table.
But it is also possible to seperate your applications databases. Of course if it is possible to have two databases on your webhost
SQL Server 2012