How to upload an updated MSSQL Database?
MSSQL
How to upload an updated MSSQL Database?
bwol
05-28-2008, 3:39 PM
I am new to using MSSQL and have a basic question:
I have a MSSQL database that I want to use with my asp.net website. Using "Control Panel >> Database >> MSSQL Admin" I was able to get the information neccessary to upload my database to the SQL server via FTP. I was then able to attach the database and connect to it from my asp.net website -- Horray!
However, after I added a new stored procedure to my database (using Visual Web Developer 2008 express) and I wanted to upload my new database to the sql server, so I logged in via FTP and overwrote the first database with the updated version.
Problem: When I tried to call my new stored procedure, I got an error saying that the new stored procedure could not be found. It seemed to me that the new (updated ) database was somehow not being recognized. To test my theory, I renamed my original stored procedure (which I was able to use with no problem) and overwrote the database on the SQL server and then tried calling the original stored procedure using its original name from my asp.net website. This should have resulted in an error, but instead I was able to call it with no problem, which seems to confirm that updated version of the MSSQL database is not being "recognized."
So...how do I upload an updated version of a database once I have already uploaded to the SQL server and "attached" it?
Any help is much apprecaited!
Re: How to upload an updated MSSQL Database?
deanman
05-28-2008, 3:47 PM
Ftping your data base to your sql server backup folder does not automatically attach it to the sql server!
You have to attach your database via control panel.
PS: You can use sql admin to check your stored procedures.
I <3 WebHost4Life.com
Re: How to upload an updated MSSQL Database?
bwol
05-29-2008, 7:01 AM
Thanks for the advice deanman!
I was able to create my new stored procedure using sql admin and it worked fine.
Just to clarify, I did attach my database via the control panel after the first time I uploaded it. Would I need to attach it a second time via the control panel if I upload an updated version of the database?
Thanks again for the help.
Re: How to upload an updated MSSQL Database?
deanman
05-29-2008, 9:05 AM
<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="/Themes/default/images/icon-quote.gif"> <strong>bwol wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4">Thanks for the advice deanman!<br><br>I was able to create my new stored procedure using sql admin and it worked fine.<br><br>Just to clarify, I did attach my database via the control panel after the first time I uploaded it. Would I need to attach it a second time via the control panel if I upload an updated version of the database?<br><br>Thanks again for the help.<br><br></td></tr></table></td></tr></table></BLOCKQUOTE>
Well, one can ftp a SQL data base to the store only. Thereafter, one has either to 'restore' or 'attach' that data base file via control panel. That's the way it works and ftping a data base file to the backup store does NOT 'restore' or 'attach' anything. That's why it didn't work after you did the upload of the updated version of your data base. Keep in mind that the BACKUP store and the data base store are different locations.
I <3 WebHost4Life.com
webhost4life.com