locked
Does Visual Studio come with SQL Server Studio? RRS feed

  • Question

  • User-1994446809 posted

    Hello Forum,

    I recently learned that when hosting website with database, it is required that the database is backed up before uploading; and that it is the .bak file that will be uploaded. I want to find out if downloading visual studio comes with SQL server management studio or do I have to download SQL server separately to back up the database? 

    I need directions on how to upload my aspx files and database too.

    Thank you

    Thursday, December 17, 2020 6:30 PM

All replies

  • User475983607 posted

    Your question is very difficult to understand.  If you need SQL server, you can download SQL Express and install it on your local machine.

    https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15

    There's also SQL Server Management Studio (SSMS) which is a GUI interface and tools for SQL server.  SSMS allows you to restore a backup.

    I need directions on how to upload my aspx files and database too.

    You really need to read deployment documentation.   there's too much to cover in a forum and we cannot see the state of your code. 

    ASPX files are not the only files that must be copied to the host.  

    Databases are typically scripted.  You execute a script to create the database tables.  You can also do a backup and restore but usually you do not want to move development data to production.

    https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis

    Google; https://www.google.com/search?q=deploy+aspx+to+iis

    Thursday, December 17, 2020 7:48 PM
  • User753101303 posted

    Hi,

    georgeakpan233

    it is required that the database is backed up before uploading

    You are using SQL Local Db? You have to take extra precaution when your database is a file stored in a folder on your web site (usually App_Data) as you could lost alll your data if this file is overwritten.

    You don't really have this problem if you are using a "true" database service that doesn't store data as part of your web site.

    Thursday, December 17, 2020 9:34 PM
  • User-1994446809 posted

    Hi PatriceSC,

    You are using SQL Local Db? You have to take extra precaution when your database is a file stored in a folder on your web site (usually App_Data) as you could lost alll your data if this file is overwritten.

    Yes , I am using local Db. What can be done to take an extra precaution for database file stored in a folder?

    Please I need guidance on this, if you can. Thank you

    Friday, December 18, 2020 11:12 AM
  • User753101303 posted

    First Im' not using it at least on live sites. In your publishing profiles you should have an option to :
    - NOT delete all files found on the site
    - NOT deploy files found inside your local App_*Data folder

    It should allow to keep your db file intact when deploying (of course you still need to update the db structure possibly using script files).

    Also backups shuld be likely part of a dailty routine. You could likely schedule an app calling a special page in your site that would use the BACKUP DATABASE statement and that would download this backup on a daily basis.

    At some point and depending on the risk/cost you can afford, consider moving to something which is safer.

    Friday, December 18, 2020 11:40 AM
  • User541108374 posted

    Hi,

    I want to find out if downloading visual studio comes with SQL server management studio

    No. There's, depending on the version of Visual Studio, some way to interact with SQL databases. You can either install SSMS or Download and install Azure Data Studio - Azure Data Studio | Microsoft Docs.

    it is required that the database is backed up before uploading; and that it is the .bak file that will be uploaded.

    I'm not 100% following your question here. It's good practice to regularly make a backup of your live database so you can restore it when needed from that last point of backup in time. When you already have running application with a database and you simply want to change some logic in your application you can upload it as such. Likely it's best to make a backup of your database first before doing so. When you created new tables/columns or made changes to the DDL of your database which needs to ship you can make a script and use the aforementioned tools to execute these on your live database (or use migrations when using an ORM like Entity Framework).

    Kris.

    Friday, December 18, 2020 12:06 PM
  • User379720387 posted

    The hosting companies I have used all require a .bak file to create the db inside their hosting environment.

    For your local environment it is more convenient to use SQL Server Express, which comes with SS Management Studio SSMS. From there you can create a backup and use it on the hosting company.

    Inside SSMS you can connection both to the local db and the remote db at the hosting company.

    The features and capabilities of SSMS make it very easy to use a Sql Server Express db.

    Saturday, December 19, 2020 12:21 AM