Does anyone have a backup strategy for SQL Azure databases? - sql-server

I'm using SQL Azure on a project and it works great. The problem is that the usual backup features do not exist. I have exported the database a couple of times using SQLAzureMW ( http://sqlazuremw.codeplex.com/ ) but this tool is now choking trying to download the database data with bcp. In any case, it's not as nice a solution as SQL Server backups.
Is anyone aware of a commercial or open source tool, or other technique, for making reliable backups of SQL Azure databases? This is really a showstopper.

Starting with update 4, SQL Azure now supports database copies. You can make a copy of your database, kept in Azure, and use that to retrieve data in the event of an accidental deletion or schema bugaboo:
http://msdn.microsoft.com/en-us/library/ff951624.aspx
It's still up to you to get that database off Azure and onto your own local SQL Server, though, but at least you've got a mechanism for making a point-in-time copy.

Microsoft takes care of the backups for you. There is no reason to back up SQL Azure databases yourself.

Yes, we had the same problem and couldn't find any good/simple solutions, so we cobbled together a solution using Red Gate: http://mooneyblog.mmdbsolutions.com/index.php/2011/01/11/simple-database-backups-with-sql-azure

SQL Azure will support PIT (Point in time) backup/restore (mainly restore) later this year (2011), CTP in summer. There is some (little) preliminary info here info here.

Related

Is there a simple solution to replicate data from SQL Server Azure to PostgreSQL Azure?

I need to regularly (but incrementally) sync (one way) the contents of a set of SQL Server Azure tables to a PostgreSQL Azure instance.
Here are some of the avenues I've considered:
Linked server from SQL Server. No go. Apparently Azure doesn't support linked servers.
Foreign Data Wrapper from PostgreSQL. No go. PostgreSQL on Azure only supports the postgres_fdw, not the needed tds_fdw.
Azure Data Factory. No go. The data copy process doesn't work incrementally, and the sink pipeline component doesn't support PosgreSQL.
Commercial replication solutions. Too expensive for a startup and most aren't hosted.
SymmetricDS or ReplicaDB. These might work, but aren't hosted so we may or may not save time over building a custom solution after all the time and effort of configuration and debugging.
Am I missing an obvious solution?
Congratulations, you solved your problem. It will be better that if you could share us more detail about your simple replication system.

What is the best way to migrate a large SQL Database to Azure SQL?

I have to migrate an existing database in Azure SQL. Currently the db is ~400 Gb large. I've tried using the SQL Database Migration Wizard from codeplex (https://sqlazuremw.codeplex.com/), due to the fact that my database isn't quite compatible with SQL Azure (missing cluster indexes, index fill factors, etc. ) which the tool manages to 'fix' somehow. The problem with this tool is that I've started it about 10 days ago and it is still copying (one thing to mention is that the database is stored on a VM in Azure in the same zone). This won't work for me. Any possible solutions?
I've tried exporting a .bacpac from the SQL Server Management Studio (2014), but even if I try fixing all the incompatibilities I still get new ones. It's a never ending process so I gave up this solution.
Thank you in advance for your help.

Transfer SQL Data between two databses

I am using two similar SQL database in two different servers one is local and another one is online. I want to transfer data at the end of the day from the local server to the online server.
what is the best method to automatically transfer data and protecting primary keys effectively.
Thank you
Use Red-Gate Data Compare. It's commercial, though.
(I'm just a satisfied customer and in no way related to Red-gate)
Open SQL Server Management Studio and connect to both servers, in the Object Explorer right-click on a server and choose Tasks, and select Import Data or Export Data, then it's a simple wizard to go from there.
SSMS can also do a schema compare (no need to pay for RedGate Comparison software) if needed.
Have you considered using Replication?
replication tutorial
I believe what you are trying to do is a Mirror database, updated daily, if that is the case:
Using Database Mirroring is a best practice (Instead of manually doing this yourself), I suggest:
Read about Mirroring here: Database Mirroring
Follow this guide: Setting Up Database Mirroring
Your local server should be the principal and your online will be the mirror
I highly recommend this approach , instead of manually scripting the data (see link to answer below), it will give you benefits such as automatic failover (when your local server crashes it will use the remote one) , you can read all about the benefits in the links above.
If you eventually want to do it manually for any reason, or you don't have the SQL Server Enterprise edition , then read my answer to this question:
sql-server-copying-tables-from-one-database-to-another

Replication with SQL Server 2008 Web edition

I need to use replication between my databases. But me hosting provides only Web Edition of SQL Server. In web edition replication is not supported. May be anyone have some suggestions?
Thanks
If you are savvy with programming then you can accomplish a very slim form of replication through code. If not, you might be out of luck.
You can have DML triggers on your tables that you would normally have as articles for replication, and when the data changes log it to a table with the necessary information. Then have a scheduled task that runs an application to push those changes to the logical subscriber(s). Just an idea, but it looks like you may have to get creative.

How to automatically store data from Oracle in SQL Server (according to a schedule)

Hello,
I'm new here, so sorry, if my question is too basic. However, maybe you have some advice, example, links, which could help me... I'm trying to find something helpfull for few days, but no results as for now.
I'm working in a distributed environment. I have a Oracle server hundreds of miles away and a MS SQL server close to me. I'm writing a application using Visual Web Developer 2008 Express. I need some data from Oracle. It's not worth to query the Oracle server every time i need some data from it. I'd prefer to run some Oracle queries once each night and store results in some local (SQL Server) tables. I assume, I should run queries through standard windows scheduler (Windows Server 2008). I have the basic connectivity - I can open Oracle Database from local Visual Studio.
The questions are:
How to write a query/procedure/function that would get data from Oracle and put them into a SQL Server table (possibly recreated before each query run)?
How can I run such a query from command line (or in other way run from scheduler)
What naming conventions are applicable? In VS I use something like //IP.IP.IP.IP/Name and a user with password.
Thanks for any help or advice.
Regards,
Matteo
I suggest you speak to the DBA's of the Oracle and SQL Server databases, as there may be other considerations you need to bear in mind. (Data Integrity, Security, ownership etc.)
One route you could follow would be to implement DTS (For older databases) or SSIS (for new versions of SQL Server) processes to copy the data across on the schedule you want. (This is pretty much what they were built for.)
How much data are we talking about?
If there is a small quantity that you need to transfer every day, you can write a stupid fetch and insert script in language of your choice.
You only need to search for better solutions if "sync" would take too much resources.
Thanks...
I'm the DBA for the SQL Server, which will serve only for my application. For Oracle I just want to read data and I have enough privileges and agreement with DBA's. Security, ownership and integrity are not an issue for now. I just need some technical advise how to get data from Oracle to MSSQL tables on a schedule.
I use MS SQL Server 2008 Express SP1. I'm very close to solve my problem - I have established connections and everything installed and working. I just don't know, how to run a query, which would get data from Oracle and put into MSSQL, on regular basis, without manual interaction.
I've some experience in programming, but not much in databases (except creating complex SQl queries). Therefore some example or links to detailed description would be helpful. I'm not sure about naming conventions, differences between procedures, functions and queries, command line options to run db automation procedures and so on. I'm also not sure, about which mechanisms or technologies are available in MS SQL Server 2008 Express edition.

Resources