Moving SQL Server database to shared hosting using backup - sql-server

I need to move my SQL Server database to shared hosting. Is there a tool there that allows me to import a database backup file? I'm stuck with actually making .bak file.
Its suggested that I use SQL Server Management Studio (SSMS), I tried downloading it from here, but failed to install.
I found I could run a query like
BACKUP DATABASE mydbname TO disk = 'd:\bak'
but can't figure out where I do this in VS 2010.
I'm stuck on this lame problem, please give me a hint.

This little utility could be your solution, it's free for any manually backups.
SQLBackupAndFTP
However, remember that a SQLServer backup could be restored only on the same or subsequent versions of SQLServer

Resolved: I found this detailed tutorial on how to install SSMS here.
Then I used following query to make backup:
BACKUP DATABASE mydbname TO disk = 'd:\bak'

Related

Sql management Studio 2014 crashed + backup databases before reinstall

I have installed sql server 2014 standard edition on windows server 2012R2, it was working fine. but after few days i try to open management studio but it says cannot find one or more components try reinstalling the application. i have seen many solution for recovery and reinstalling but my first concern is data backup. as its a live system i dont want to lose any data. can any one tell so surely that how i can backup data and recover management studio. are there any files which need to be copied and can be replaced after reinstalling. i will be thankful if some one can give sure answer. Again remember its a live system i cannot lose any data. Thanks
I hope that SQL services are still online, you can take backup using sqlcmd and try to repair the management studio.
example.
SqlCmd -E -S Server_Name –Q “BACKUP DATABASE [Name_of_Database] TO DISK=’X:PathToBackupLocation[Name_of_Database].bak'”

How to restore SQL Server 2014 database to SQL Server Express 2012

When I try to restored DB , every time I am getting this error
TITLE: Microsoft SQL Server Management Studio ------------------------------ Restore of database 'PramodDb' failed.
(Microsoft.SqlServer.Management.RelationalEngineTasks)
------------------------------ ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: The database was backed up on a server
running version 12.00.4100. That version is incompatible with this
server, which is running version 11.00.6020. Either restore the
database on a server that supports the backup, or use a backup that is
compatible with this server. (Microsoft.SqlServer.SmoExtented)
Please help me.
Like always it helps to read the error. Let me quote pretty much all of your error message:
The database was backed up on a server running version 12.00.4100. That
version is incompatible with this server, which is running version 11.00.6020.
Either restore the database on a server that supports the backup, or use a
backup that is compatible with this server.
General rule: No downgrade. On top, restoring on express is generally possibly problematic due to the limitations of the express version.
So, you need to either export/script import the database, or grab yourself and install the free developer version. Ever since they made this one free there is no excuse for even the most junior developer not to work against it.
The answer you cannot do that. You cannot downgrade a database.
As far as the work around is concerned you need to use the Import/Export wizards in SSMS to make it working.
You can't, but...
You can try Scripting your 2014 database and execute the Scripts on a blank 2012 database.
To open the Generate and Publish Scripts Wizard: In Object Explorer, expand Databases, right-click a database, point to Tasks, and then click Generate Scripts. Follow the steps in the Wizard to script all database's objects.
Note the disk space required.
You can script schema and data. See the following article:
https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/

Adventureworks restore failed

I've just installed MS SQL Server Express 2014 and SQL Server Management Studio 2014 under Windows 10. I'm following the official Microsoft tutorial on database fundamentals, which uses the Adventureworks DW2008 database. I have tried to restore this dB using the Restore GUI, but it fails every time, as shown here:
AdventureWorks restore failure
I have verified the backup media, but it still fails. I have also restored a different dB, and that worked fine, so I know I am following the correct procedure. I have the file (AdventureworksDW2008Big.bak) in the following location:
C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Backup
Yes, I have thoroughly researched this, but still apologies if there is already an answer on here - I couldn't find it.
The DW in the filename is for Data Warehouse and only works on that edition of SQL Server. As you only installed SQL Express you cannot use it.
Why not try Adventure Works 2014 Full Database Backup.zip instead. If you really need 2008/R2 try the none-DW from here:
AdventureWorks2008R2_Database.zip
AdventureWorks2008_Database.zip
I do not know if it will solve your problem or not,
but I had same problem. I mean I am using SQL SERVER 2017 and I wanted to restore AdventureWorks2012.
I received restore failed error, and I decided to restore AdventureWorks2017. my queries on AdventureWorks2012 in an older system in university led to the same results as my queries in AdventureWorks2017 in my system. if you are using a version of SQL SERVER and trying to restore an older or another version of AdventureWorks, you can try the same way.
I mean restoring a version of AdventureWorks which is the same as the version of your SQL SERVER.
Best to run SSMS as an administrator to avoid access denied errors (do this by right click on SSMS and choose More -> administrator)
copy adventureworksxx.bak into the sql server DATA directory where by
default all databases are usually located. ( Note: if it is in other directory
the restore may not find it OR may cause errors later)
Restore the database

My database has been deleted suddenly on the server how to recover it?

I'm running an application on windows server that connect to a SQL Server database.
Today, when I opened SQL Server Management Studio, I was surprised the database is not in the list of the databases!
I don't know what's the reason. I searched in the server files but I can't find the database and also in the recycle bin.
I put my database in C:\db\myWeb.mdf and suddenly it's been removed!
Can anyone tell me how to recover the database?
UPDATE:
I used stealer phoenix to find the database files deleted on disk but unfortunately i didn't find the db then i tried to add new database with the same name of the deleted db but SQL management studio said that the database "MyWeb" already exist! that's mean it's some where in the server but i couldn't find it ?! .
The only thing you can do when the actual database files are missing is restore a backup of your server.
Optionally, when you have no backup, you could use a hard disk recovery tool (like Runtime GetDataBack to find the database files deleted on disk).

How do I backup the data in SQL Server 2008 on a third party host?

I have a SQL Server 2008 database that is hosted by a third party host (heart internet).
How would I go about backing this up?
I used SQL Server Management Studio Express 2008 to create the tables within the database, but the backup options within this app seem to be only of use if you have direct access to the server machine (which I don't)
It's also worth noting that I am using change tracking - I presume this data would be lost should any backup be restored?
Thanks In Advance!
(PS - SQL Server 2008 novice here!)
If they allow you to run backups to a particular folder that you have access to you can just do it with the regular backup command:
backup database dbname to disk = 'y:\users\YourHomePath'
If they do not do that you might want to use the Database Publishing Wizard to script out your database (depending on the size this might be very slow)
You can create a .DAT file into a shared disk and to download it through FTP.

Resources