Best way to update SQL Server db that is in production?

C

Cirene

First, sorry if this is a stupid/open ended question...

This is a theorhetical question...

I am a single freelance developer (not part of a team.)

If I create an ASP.NET website that accesses a SQL Server db, when I later
want to add a field, edit a table, add a table, etc... what is the best way
to do this in the design process?

Do I copy the mdf from the server to my local machine, make the changes,
code, test, etc... then upload the new mdf and reattach it somehow? If the
changes take a few weeks I don't want to "miss" data that's been added
online since I started working. I know that I don't want to be connected to
the live db via my dev machine to do the work.

Any links/articles/suggestions appreciated! Sorry I just don't know much
about this.

Thanks in advance!
 
G

Guest

Do I copy the mdf from the server to my local machine, make the changes,
code, test, etc... then upload the new mdf and reattach it somehow?  

When your SQL Server does allow remote connections then all changes
could be made from the client using SQL Management Studio. If it does
not allow connections from remote then you can use something like Web
Data Administrator
http://www.microsoft.com/downloads/...72-5e6c-459e-a6d8-6745a729c3c9&displaylang=en
which has to be deployed to the server, or a custom script (to execute
T-SQL). All changes to the test db can be made using both SQL Server
Management Studio inteface and T-SQL:

to add a field, edit a table: ALTER TABLE....
add a table: CREATE TABLE...

etc.
 
G

Guest

When your SQL Server does allow remote connections then all changes
could be made from the client using SQL Management Studio. If it does
not allow connections from remote then you can use something like Web
Data Administratorhttp://www.microsoft.com/downloads/details.aspx?familyid=f0d03472-5e6...
which has to be deployed to the server, or a custom script (to execute
T-SQL). All changes to the test db can be made using both SQL Server
Management Studio inteface and T-SQL:

to add a field, edit a table: ALTER TABLE....
add a table: CREATE TABLE...

etc.

And I forgot to add that you can also use to Replication to
synchronize the data/schema changes. It depends on the database. And
this is a topic for sql server newsgroup
 
C

Cirene

Thanks Alexey.
When your SQL Server does allow remote connections then all changes
could be made from the client using SQL Management Studio. If it does
not allow connections from remote then you can use something like Web
Data
Administratorhttp://www.microsoft.com/downloads/details.aspx?familyid=f0d03472-5e6...
which has to be deployed to the server, or a custom script (to execute
T-SQL). All changes to the test db can be made using both SQL Server
Management Studio inteface and T-SQL:

to add a field, edit a table: ALTER TABLE....
add a table: CREATE TABLE...

etc.

And I forgot to add that you can also use to Replication to
synchronize the data/schema changes. It depends on the database. And
this is a topic for sql server newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top