How to copy SQL Azure schema to another SQL Azure database? [closed] - sql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have developed/managed my dev database in SQL Azure, but I can't figure out how to copy the schema of my dev SQL Azure database so I can upload it to my production SQL Azure database? I have heard of other third party tools, but is this the best way? If so, what is a good tool to use for this?

http://sqlazuremw.codeplex.com/ is also a quite simple to use and efficient tool

If your production database is empty and you just need to clone your current dev database -
you can export your DevDB to .bacpac file and then import back it on production server.
Old portal have that functionality there: Database->subscription->server->Pick database, import\export on the top.
New portal: DB, click on servers tab, select server -> databases tab, Import\Export buttons on bottom panel
If you need just migrate your schema to production database, which filled with data and should't be interrupted - you can create SQLProject type (if i remember correctly - you need SQL Server Data Tools, SSDT. Also its available with SQL2012 Tools\Studio) and then you can compare your Azure DB Schema to empty project and script schema back to sql constructs. Then just publish newly created scripts to your production database.

Two tools you should never do without when working with SQL are SQL Compare and SQL Data Compare by Redgate. They have saved me countless hours of work and will streamline what you want to do. I've used them with azure and they work well and do the job for us.
See http://www.red-gate.com/products/sql-development/sql-developer-bundle/
The first product will compare and create your schema and the second will let you synch your data. Sometimes it's just better to pay for the right tools and this is that case.

SQL Azure MW (http://sqlazuremw.codeplex.com/) works ok, although it did fall apart on me a couple of times when working with a lot of tables in the schema.
Another option is also Azure Data Sync, but as far as I know, it also doesn't want to work if you have more than 500 tables in your database.
What I did in the end is sqlcmd with the SQL dump of the database:
http://msdn.microsoft.com/en-us/library/windowsazure/ee336280.aspx
that took ages, but worked fine. The big problem is how to get it back locally :-)

Related

How to do regular Azure SQL Server bacpac extracts to save on-prem [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I know Azure does its own backups in the cloud. However, due to company policy I need to generate a local backup copy of the database and be date-time stamped.
I've read this, and it has allowed me to create a .bacpac file and import it into our on-prem SQL server (2019). What I want is a way to save the bacpac file on a network folder, on a regular basis.
UPDATE - no I don't have to, store the bacpac file in an on-prem database. I only mentioned it to say, yes I can do this extra step. What I really want is to simply save the bacpac file, date-stamped in the filename, and in a network folder on-prem.
If you don't mind use third-part tool to regular backup Azure SQL database to local, please ref this blog: How to backup Azure SQL Database to Local Machine. It provides all the way to backup the Azure database to local, include regular backup features.
This blog provide the tools SqlBackupAndFtp to help us regular backup the database. The output .bacpac backup file name schema example like this: Mydatabase202103250956, databasename+date.
It also give the tutorial to Backup Azure SQL Database Using BCP Utility:
bcp sqlftpbackupdb.SalesLT.CustomerAddress out c:\sqlfile\cust.dat -c -U daniel -S tcp:sqlftpbackupserver.database.windows.net
You also could ref the official document: https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-export?WT.mc_id=DP-MVP-5001259&view=sql-server-ver15.
HTH.

Azure sql server backup to Azure blob - CherrySafe replacement [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am new to Azure SQL server and trying to understand how do I backup Azure SQL databases to Azure blob few times a day.
My company is currently using [Cherry Safe][1] to backup Azure SQL Databases but Cherry Safe is shutting down in 2 weeks.
As I read more about it, it seems like I can configure export to Azure blob but I do not see that option. I see history of exports but I do not know where is the configuration to schedule or change it.
For long term retention, I see an option to configure retention vault.
Are there replacement services out there that Cherry Safe users are using?
Do I need an external service or I can configure the backups myself?
Thanks.
It seems that you could backup sql server to azure blob storage, not the azure sql server.
You could use SQLBackupAndFTP to backup Azure sql database to local machine.
1.Connect SQLBackupAndFTP to the logical SQL Server in the Azure
2.Create a job for regular Azure SQL Database backup
Also as you have said, you could use long-term backup retention to backup.
It allows you to preserve weekly, monthly, and yearly backups for an extended period of time up to 10 years.
Restore a database from a specific long-term backup if the database has been configured with a long-term retention policy. This allows you to restore an old version of the database to satisfy a compliance request or to run an old version of the application. See Long-term retention.
You don't need to use any third party to backup Azure SQL database, they have much better backup and retention tool on portal. Read this https://learn.microsoft.com/en-us/azure/sql-database/sql-database-long-term-backup-retention-configure

Why does sql require a server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm new to SQL, and i'm trying to understand something basic about it.
Why do we need a server to connect to when using SQL?
In my very narrow vision of it, it just uses some databases, which could be implemented as arrays for example (or whatever it is that is implemented "backstage").
For example, if I want to set up a table in my computer and do some operations on it, what usage does the server has? Why can't it "just be there"?
I think the reason for your confusion is too narrow interpretation of the word "server" as a separate hardware box.
A server does not need to run on separate hardware, or even in a separate virtual environment. It could be another process on the same computer, or even a library within your process. What makes it a server is an ability to accept and process requests from clients. It does not matter where the server runs physically: as long as you follow a protocol in which requests originate on the client side, you have a server.
What you're envisioning (roughly) is referred to as an in-process database and they do exist for SQL. SQL Server is set up to be used by multiple users or applications so it makes sense for it to be a central server that many clients can connect to so they can share the same data.
If you only want to process data locally, there is SQL Express LocalDB, SQLite and a few others that allow you to essentially embed a SQL engine inside your application.
You are, perhaps, confusing SQL the language with SQL Server, a Microsoft product that implements SQL.
SQL itself has many, many implementations. Many of those implementations do not use a server. MS Access, SQLite, FileMaker are common SQL-using products that rely on file-sharing rather than a client-server setup to provide multi-user access. These products can all also be used on a single machine without sharing files.
There are also implementations of SQL that use CSV files for storage although these are less common.
Finally, many of the client-server SQL products offer related, smaller-scale implementations that do not require a server. These are generally implemented using file-sharing as well.
It depends on what you are needing. Some instances of SQL, such as SQLite3, are local and file based. They have no server. Most provide a server because of the problem they address.
But lets address why a server is needed. Consider a Microsoft Access application where the databases are files shared over a network. Suppose 5 people are working with the same file. They each search for something, and the entire file must be passed over the network. Suppose one edits a record. The next time the others do a search, they will have to load the entire file again. If the file is large this is a huge performance hit. This is why servers were created.
A server receives only the SQL. The server does either a search, or an edit, and returns only the data that has been requested. For any database of reasonable size the performance improvement is huge.
Another benefit of a server is access control. With a server you can have multiple accounts and control what databases and even tables they have access to, and what activities they are allowed to perform.
In short, the server was created to address the problems that arise when you have multiple clients working with a single database.

Hiding tables from database users [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a web application using a database in SQL Server 2008. I am the developer of this project and this project has been hosted elsewhere.
I've delivered the project to the administrator. Now the administrator is able to connect to SQL Server but I don't want the administrator to be able to see the database tables.
Is there any way to do this?
I've seen this done before by the makers of ACT. Their product installs a new instance of SQL Server Express and as part of that process they encrypt the sa password for the instance. This makes it 'impossible' for others to connect to the database using anything other than their product and add-on tools.
I don't know exactly how they do it, but perhaps you could search for encrypting sa password or something similar and find out how to do it.
Shy of installing your own instance of SQL Server I am not sure how you would go about this.
Bear in mind that your application will need to then provide the ability to backup, tune, modify, etc the database as the DBA would not have access to the instance of SQL Server.
Incidentally, we threw ACT out once we saw this - I didn't, and still don't, like the idea of a black box running on one of our servers.
In the end, you'll probably find that this added layer of protection (for you, not the client) just isn't worth the aggravation. While you may have proprietary information in the form of the database schema the odds of the client reverse engineering your application and then making their own are slim. Even if they did, it is hard to make good software - they likely wouldn't get it 'right' anyway.
My advice, don't worry about this, focus on making your software great so there is no reason for them to roll their own or look elsewhere.
Simple: No, he is DBA. He can not do his job without the ability to work with the database. Get over your objections.
You cannot limit the rights of an administrator on a server.
The administrator also has access to pretty much all tables that store your encryption keys, so TDE won't work.
If he is a security admin or one of the other roles, that might solve the issue as by default such roles has no permissions on your data.
SQL Administrators normally have these roles to protect your data. They need it.
If the data is very sensitive, you need to use alternative means to secure it, such as applying your own encryption before saving the sensitive values. (AES etc.)

Help me put Oracle terminology into SQL Server terminology [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
My company is now supporting Oracle for the first time, and most of my colleagues are SQL Server developers who haven't really worked with Oracle. I'm a little bit familiar with Oracle, but far from a genius on the subject. Unfortunately, that is enough to mean that I know more about Oracle than most of my co-workers, so I find myself constantly struggling to explain concepts I'm still learning myself in terms that people who aren't familiar with Oracle at all can understand.
The biggest problem that I run into is in knowing how SQL Server terminology translates into Oracle terminology. I understand that there's not a direct 1:1 mapping of terms, but it would be helpful to be able to know how to put Oracle concepts into SQL Server terminology and vice-versa when talking to my SQL Server-centric co-workers. Can someone tell me the best way to put these SQL Server terms into Oracle terminology?
database
instance
schema
And conversely, how to explain these Oracle concepts in SQL Server terms?
tablespace
database
listener
service name
SID
Oracle/SQLServer:
tablespace = doesn't exist
database = doesn't exist
instance = instance
schema = database
listener = doesn't exist
service name = database name
SID = database name
I don't know anything from sqlserver so what I can do is to try to explain what
* tablespace
* database
* listener
* service name
* SID
are.
A database is the collection of files that all together make the database. This can be datafiles but also parameter and password files.
That database is serviced by one or more instance[s]. An instance is the interface between client processes and the database. In a parallel server configuration - RAC - there can be multiple instances active on the same database.
A service is a connection handle to a database. A service van be serviced by multiple instances and every instance can serve multiple services. Services are used to make the combination of applications in one database possible. Every application connects to it's own service, ending up in an instance of the database.
A listener is the process that listens for clients that want to connect to an instance or service. the listeners hands over the connection request to an instance background process that performs the database interactions for the client.
A SID or ORACLE_SID is just the name of an instance.
The Concepts manual will be of great help.
I hope this helps.
Ronald
Some useful links:
Migrating from Oracle to SQL Server
SQL Server Migration Assistant for Oracle
A tablespace is a unit of database storage that is roughly equivalent to a file group in Microsoft SQL Server. Ref
The following book should answer all your questions:
Oracle Database Administration for Microsoft SQL Server DBAs (Osborne ORACLE Press Series) [Paperback]
Michelle Malcher (Author)