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!
Alexey Smirnov - 28 Mar 2008 23:12 GMT
> 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/details.aspx?familyid=f0d03472-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.
Alexey Smirnov - 28 Mar 2008 23:23 GMT
> > 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?
[quoted text clipped - 11 lines]
>
> 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
Cirene - 29 Mar 2008 03:34 GMT
Thanks Alexey.
> On Mar 28, 7:31 pm, "Cirene" <cir...@nowhere.com> wrote:
>
[quoted text clipped - 14 lines]
>
> 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