Creating and connecting of the copy of MSSQL database to a WEB Application


I need some step by step instructions with MSSQL Driven WebApp.
I think it is a couple steps solution however I would need some help with it, please:

I have a Virtual Dedicated Server with Windows server 2008 R2 and SQL Server Management Studio 2008 R2 and it is accessible with Remote desktop connection.

There is a web based app which is fully connected to MSSQL database on the same server. The app is fully functional, no issues with that. The website is built in .NET (I think 3.5 or 4.0).

Database name: ABCApp
User which is used for connection: sa (system admin)

The connection string is
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCApp;User ID=sa;Password= ABCAppPassword" />

I would like to create a copy of the ABCApp and a copy of the LIVE database for a parallel (beta) development. The copy has to be 100% disconnected from the live version.

I created a separate hosting and placed all the files on the same Virtual Dedicated Server already and it is working perfectly, however it uses the LIVE database.

Since I have no experience with MSSQL I would like to ask what would be the next step by step instructions to make the BETA version of ABCApp run with a BETA version of the database (which needs to be created and connected to the BETA version of ABCApp

If you need any additional info please let me know.

Thank you for your help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if you hostings are on the same server it will be using the live database, change the name of the database for the dev instance ABCAppDEV and amend the connection string accordingly

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mimarkAuthor Commented:

Thank you for your reply

- I created a new database with the name ABCAppDEV (by restoring from the backup of the live database)
- Created a new user with the name BETA
- Modified the connection string from:
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCApp;User ID=sa;Password= SaUserPassword" />
<add name="ABCApp" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog= ABCAppDEV;User ID=beta;Password= BetaUserPassword" />
And still it didn't work

Actually, I experimented for a bit and looked into the User Mapping for BETA user and for the DEV database was activated following:

I activated one more

and it seems to be working.

A couple tiny questions (to confirm):
- was everything done correctly? Did I need to change the name to <add name="ABCAppDEV"
- do I have rename Instance name for ABCAppDEV database?
- Is it everything I needed to do?
- Are this right permissions for the BETA user? Is it not too much?
- Should I enable or disable anything?

The most important for me is that this BETA user will not be able to access any other databases on the SQL server or have access to any other settings or anything else on SQL server.

Could you please confirm that everything is correct?

If it is then I will close the question as solved and award points.

Thank you
mimarkAuthor Commented:
Seems to be working, please see edited reply above.
Thank you
the surest way to do that is create a beta username and password, that only has access to the beta database, use the beta credentials in the connection string you use on the beta site
mimarkAuthor Commented:
Thank you for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.