Restore to remote database from my local machine - sql-server

I am registered at Go Daddy and want to restore the database there from my local machine. The tool they provide me with doesn't work unless it's from them. I'm trying to restore from my local SQL server, but when I browse I can't restore the local files of the remote database.

They're intentionally preventing users from restoring backups that are "foreign" to them in order to satisfy an obscure Microsoft security recommendation.
You will have to perform a schema comparison and a data comparison between your local machine and the empty database on the hosting to generate the scripts to re-create all of the objects and data. (Having those scripts available in a source control storage would also be helpful.)

There are basically two ways to restored the Database using Sql Server.
Through SSMS Restore Utility.
Manual Database restore Script from here

Related

Restore marklogic database by extracting config from backup

I have been given a copy of a Marklogic v9 database backup which was taken from a Marklogic server running on linux.
I now need to restore the database from the backup dump, onto a windows 2016 server, but the MarkLogic database on the destination windows server doesnt exist.
Is it possible to somehow extract the MarkLogic database configuration from the backup dump , create a database on the destination server then restore over that database? In the backup dump I have a forests directory and all the XML/cfg/label files in the root directory of backup dump.
Or do I need a MarkLogic admin to extract the config of prod database that was backed up, then create an empty database on the destination server ( using the extracted prod database config ), then restore over that? I notice you cant restore without an existing database to restore over.
Or do I alternatively create a dummy database on my destination server of the same name as the prod database, then restore over that? The disk layout obviously will be different.
Any help appreciated.
You cannot restore a backup from a different architecture. If you need to move from Linux to Windows, I'd recommend using MLCP export/import, or maybe even copy. In any case you will need to have a target database up and running. You could export the configuration from one system, and import it in the other using our REST apis, like Configuration Management API or Management API. Our community tool ML-Gradle could be of help with that.
HTH!

Edit SQL Server backup file to change database and file paths to allow restoring multiple times to same Amazon RDS instance as different databases

Goal: Backup and Restore a SQL Server database multiple times onto an Amazon RDS SQL Server instance with different database and file names.
So Amazon RDS added the ability to access SQL Server database backups and "import" and "export", yay! But you can't change the database name or the file names, boo!
For non-production databases, I want to put them on a single RDS instance, e.g. dev, test, integration, etc. since I don't need much performance and it would save a lot of money.
I have been seeking to come up with a solution for cloning a database onto an Amazon RDS instance, specifying the database name. I don't want to (i.e. not allowed to) spend $6000 for Red Gate SQL Clone. Trying to hack a combination of scripting, bcp, import/export, etc is likely going to take a lot of time.
With the introduction of import/export a database in RDS via SQL backups, I have a new option. The problem is I can't specify database and filenames on "import"(restore).
I thought about writing a script that gets the database backup from RDS, restores it to a local SQL Server Express instance specifying the database name and files that I'll want on the destination, then backup this, then import/restore to Amazon. This is an option but it will take WAY longer than is probably practical.
So... my final thought at this point and my question: is there a reliable way to simply edit/patch the backup file to change the database and file names?
Even if you could afford SQL CLone, I'm not sure it would function on AWS as I believe it requires Windows Hyper-V, which isn't supported on Windows Server VMs on AWS.
Windocks has also just released support for SQL Server cloning, but they also use Hyper-V based approach . . . so if you have options outside of AWS I believe their solution fits your budget . . . but again, not on AWS.
Disclosure: I am the Co-Founder of WinDocks

Tool/script to clone SQL Server database with reduced rights (without backup functionality)?

In short, I need a way to copy a database from one server to another without access to backup functionality, i.e. read and recreate schema and other objects with statements like CREATE TABLE, copy data with INSERT, copy constraints with ALTER TABLE etc...
I have a database on SQL Server in a large enterprise. There is one PROD-like DB and multiple individual developer instances that are supposed to be kept in sync with it by way of running the same migration scripts. However, this is not always done and instances tend to fall behind up to the point where auto-migrate is impossible and manual migrate takes a lot of time.
Normally, we would just restore those databases from a backup, but most rights for managing the databases are reserved for dbas, as a dev I can only read/write schema and data, but not make\restore backups, so this takes a lot of bureaucracy to do. I'm looking for a script or tool to clone PROD-like database without using backup.
P.S. We have SQL Source control from RedGate that we use for part of our migration process, I'm thinking if I could use it somehow?
SQL Source Control isn't the right tool to refresh dev environments from production. If you can't access a backup, you could try using a combination of SQL Compare and SQL Data Compare.

how to repair master database in sql server 2005

For some unknown reasons, all of a sudden my sql servers master database has been corrupted and sql service won't run. I have spent hours and tried various things like trying to run the service under different accounts, also checked that no compression is set in the data folder etc but nothing seems to work. I copied master database from another instance and the service would start and I can connect to the database instance via management studio but I won't see my databases. I have backup of the corrupted master database (mdf and log file) but just wondering how can we fix this database to see all my databases? thanks
Just restore from the backup (good to have one!), it's the recommended way:
http://blogs.technet.com/b/fort_sql/archive/2011/02/01/the-easiest-way-to-rebuild-the-sql-server-master-database.aspx
In case you don't have a good backup, you will have to rebuild master database:
http://msdn.microsoft.com/en-us/library/ms144259%28v=sql.90%29.aspx
Copying over from another existing instance is not recommended.

How do I keep security settings when I restore a database from another server

I have two SQL Servers and I want to do a backup on one of them and then restore that on the other server. The catch is that the database already exists on the server I'm restoring to, and I want to keep the security settings the way they are on the server I'm restoring to.
The other catch is that I want to do all of this from PowerShell, so no GUI operations.
Or is this maybe the wrong solution to the problem. Is there maybe another way to move the data without doing a backup/restore and keeping the security settings?
In my environment we use Powershell scripts with Red Gate Compare Professional to restore databases and persist security plus database object differences. The process is fairly simple
Create a Red Gate snapshot of the destination database. Using the Red Gate command-line tool. The file it generates is very small and only contain users, permissions, and objects--basically everything except for the data.
Restore the source database over the destination database using T-SQL
Use the command-line Red Gate tools to compare and synchronize snapshot created in step to the nearly restored database. Any security or object changes are restored.
This solution does require purchasing the Professional edition of SQL Compare and installing the tool on the development server from which the script can be executed. All of this can easily be put into SQL Agent job. The use of Powershell is really kind of basic since we're just executing sqlcompare.exe
There is an article here explaining how to script SQL Server permissions through SMO via PowerShell. Your scenario would then be to script permissions from your initial DB before restoring the backup, then execute the generated script after backup has been restored.

Resources