Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

How do I use VS2017 to backup database to an older version of SQL server?

$
0
0

I am attempting to build and remotely host the standard VS2017 ASP.Net web forms template as a starter to developing it further for my own application.

I have built the application and deployed it on a hosted server where it works until it accesses the MSSQLLocalDB database using a connection string like "Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-Test-123.mdf". This produces the error "The server was not found or was not accessible."

My hosted server's help desk tells me that is because Windows Authentication is not allowed on the shared server and I do not have permissions to attach a database. They have suggested that I create a database and user, backup the database on my development computer and restore it to the hosted database.

I produced the backup with VS2017 and a script like "BACKUP DATABASE [aspnet-Test-123] TO DISK = N'C:\Users\xx\source\repos\Test\Test\App_Data\aspnet-Test-123.bak' WITH NOFORMAT, INIT, NAME = N'Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO".

I attempted to restore the backup on the hosted service which generated the error "The database was backed up on a server running version 13.00.4001. That version is incompatible with this server, which is running version 11.00.3128."

How do I use VS2017 to backup the database to an older version of SQL server? Or, is there another way I can get my VS2017 template project to access its server hosted database?


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>