locked
Upload SQL Database to Server RRS feed

  • Question

  • User2062246664 posted

    Okay, I am still really new at this so nobody laugh if this seems simple stupid. 

    I created a little web page and while working on the project created a new database by right clicking on my app and clicking "Add New item" then choosing SQL Database.  I added tables and everything was working just dandy on my machine.  I FTP'd the files up to my web server and am now getting an error.  SQL is installed on the server, but I have a couple of questions.

    1. Does SQL have to be installed on the server if you create one of these databases by doing the Add New Item button?

    2. After Uploading it to a server with SQL installed, the database shows in my App Data folder, but gives me an error.  What needs done to move this database to the server besides uploading it?

    Here is my error:

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings 
    SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
     
    Tuesday, September 19, 2006 6:22 AM

Answers

  • User2062246664 posted
    Anyone????  Anything???
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 19, 2006 11:05 AM

All replies

  • User2062246664 posted
    Anyone????  Anything???
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 19, 2006 11:05 AM
  • User1416329745 posted

    Try the links below for all you need and it works so read the thread and links carefully don't just click and say it doesnot work.  Post again if you still need help.

    http://msdn.microsoft.com/vstudio/express/sql/compare/default.aspx

    http://forums.asp.net/thread/1379211.aspx

    Tuesday, September 19, 2006 11:13 AM
  • User2062246664 posted

    I read through the entire thread you posted, but I am not sure it is the same thing I am running into.  (Not to question you cause I recognize you and you have help me in the past (MUCH THANKS))

    I am new and here is what I did.  I setup a new site.  I have a server with SQL 2005 on it (Full Blown).  I created a database on my local machine by right clicking on the root folder of the site and then clicking on Add A New Item.  I chose SQL Database from my options and gave it a name.  I then created tables.  I made the site and everything went fine.  I then went to publish the site to the remote server.  As soon as I moved it from my machine to the server I started getting that error I listed above.  The databases show in the App_Data folder of the site when I open up the FTP, but it is almost like the site is trying to connect back to my production machine or to an instance of SQL Express or something, but that isn't on the server. 

    I know I probably don't make much sense, but that is the best way I know to describe what I am running into. 

    So, the app works fine.  I publish it to a remote server and I get that error.

    Tuesday, September 19, 2006 11:25 AM
  • User1416329745 posted

    You have to modify your connectionstring  and related info in the web.config to point to the new server and you need to create permissions for the networkservice account on the server  level and database.  You may still get errors but now your application may still be pointing to your development box. 

     And another thing it is better to backup and restore in the production server so it is native to the production server and you will get the correct errors to fix if any.

     Hope this helps.

    Tuesday, September 19, 2006 11:39 AM
  • User2062246664 posted

    When you say backup and restore are you talking about the whole project.  I have been through every menu and can't find an option for backup and restoring the project.

     I really appreciate your time and your patience. 

    Tuesday, September 19, 2006 12:13 PM
  • User1416329745 posted
    No just the MDF because it is a database in the backup and restore wizard choose the restore from device option.  Hope this helps.
    Tuesday, September 19, 2006 12:17 PM
  • User2062246664 posted

    Sorry about all the questions.  Is this backup and restore wizard in VS2005 or in SQL Server Manager?

    Tuesday, September 19, 2006 1:22 PM
  • User2062246664 posted

    Okay, I did something right here cause I have part of it working now.  My main database for the data is working.  I detached and reattached it and changed my connection string and the front end is working now. 

    My backend that is managed by the ASPNETDB.MDF database is not working.  I can add it to the server like I did the last one, but I am not sure where you tell your web app to point to it instead of the folder it is in.

     

    Tuesday, September 19, 2006 1:35 PM
  • User1416329745 posted

    Here is one link of what you need to do about that database and also search his blog because he covered most things you need to know.  Hope this helps.

    http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx

    Tuesday, September 19, 2006 2:10 PM
  • User2062246664 posted

    Thanks again for your help.  I physically moved the databases over and reattached them.  I changed the Connections in IIS under the ASP.NET configuration and got it working. 

    The only thing I was still wondering about was the backup tool you mentioned.  Is that in VS2005 or SQL Server managent?

    Tuesday, September 19, 2006 2:24 PM
  • User1416329745 posted

    The Backup and Restore Wizard is in SQL Server two ways to access it right click on your database in Management Studio then all tasks or at the top of Management Studio with your database open click on Wizards and you will see the Wizards the Backup and Restore is one of them.  The reason for the database to be open is because it is context sensitive.  Run a search on all of them because you need them to manage your databases.  Post again if you still have questions.  I am glad to see your problem is resolved.

     

     

    Tuesday, September 19, 2006 2:33 PM