Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cirene - 28 Mar 2008 19:31 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.