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

Discussion in 'ASP .Net' started by Cirene, Mar 28, 2008.

  1. Cirene

    Cirene Guest

    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!
     
    Cirene, Mar 28, 2008
    #1
    1. Advertising

  2. On Mar 28, 7:31 pm, "Cirene" <> wrote:
    > 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.
     
    Alexey Smirnov, Mar 28, 2008
    #2
    1. Advertising

  3. On Mar 28, 11:12 pm, Alexey Smirnov <> wrote:
    > On Mar 28, 7:31 pm, "Cirene" <> wrote:
    >
    > > 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 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
     
    Alexey Smirnov, Mar 28, 2008
    #3
  4. Cirene

    Cirene Guest

    Thanks Alexey.
    "Alexey Smirnov" <> wrote in message
    news:...
    On Mar 28, 11:12 pm, Alexey Smirnov <> wrote:
    > On Mar 28, 7:31 pm, "Cirene" <> wrote:
    >
    > > 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
    > 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
     
    Cirene, Mar 29, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mok
    Replies:
    1
    Views:
    3,184
    Gerhard Pretorius
    Sep 7, 2005
  2. =?Utf-8?B?dmE=?=
    Replies:
    4
    Views:
    2,852
    =?Utf-8?B?dmE=?=
    Feb 22, 2006
  3. H5N1
    Replies:
    0
    Views:
    312
  4. Gabriel
    Replies:
    0
    Views:
    315
    Gabriel
    Mar 12, 2007
  5. Louis R.
    Replies:
    5
    Views:
    579
    Steven Cheng
    Jan 14, 2009
Loading...

Share This Page