SQL Azure - Copy Table Between Databases

How to copy tables from one db to another? (Sql azure)

I don't think you can do it with query. Check out Import and Export Data program that follows sql management studio. I think it's called DTSWizard.exe. Anyway, it can copy stuff from pretty much any source.

Copy one table data to another database table in same server Azure Services

You can use the bcp utility to export the table to a local drive in your computer.

bcp NLayerApp.dbo.Customer out "C:\MyFolderPath\Customer.txt" -T -c -S WIN7VS2010RC1\SQLEXPRESS

Then you can import it to the other database using the same utility.

bcp TestDB.dbo.Customer in "C:\MyFolderPath\Customer.txt" -c -U mysqlazureuser@mysqlazureservername -S tcp:mysqlazureservername.database.windows.net -P mypassword

You can learn more about bcp here.

How to copy a table from one database to another database in same ADX Cluster

You can use the "database()" function for example:

.set Table <| database("myOtherDatabase").Table

Copy tables from one database to another on Azure

SQL-Azure does not support USE statement and effectively no cross-db queries.

If you want to copy/backup the db to another sql azure db you can use the "Same-server" copying or "Cross-Server" copying in SQL-Azure. Refer this msdn article



Related Topics



Leave a reply



Submit