How to copy azure tables with entries - sql

I am looking to copy some lookup tables that are currently on windows azure. I do not believe trhere is a way to do this through sql server management studio so I'm wondering the best way to do this other than scripting them out by hand

You would typically use the SQL Database Migration Wizard (SQLAzureMW) for any task involving moving data from and to SQL Azure. This tool knows what is and what isn't supported in SQL Azure and will be more effective than manually creating the scripts.

Select into will create and copy the table but will not create indexes or constraints.
INTO Clause (Transact-SQL)
In SSMS your can right click a table and select generate to create a script. Then you can edit the table and other names and run the script.

Found the answer here, it was easier than I could have hoped!
What is the best way to auto-generate INSERT statements for a SQL Server table?

Related

List All Dropped Databases in SQL Server

I need to confirm if a particular table ever existed on our SQL Server. Is there an existing script or method one can use to list all dropped databases in an SQL server?
There is a built-in report you can access through SSMS called Schema Changes History. You can run this to find what you're looking for.

Oracle 11g Script database with data

Is there a way in Oracle 11g to dump database to sql script, that when run will perform database, users, tables and data creation?
In Microsoft SQL Server there's SSMS Toolpack that is capable of such thing. (Script all data from SQL Server database) I'm interested whether the same is possible in Oracle 11g.
To extract metadata and data you should look at data pump, specifically the export and import tools. This will be the simplest, fastest and most supported way to move everything.
You will need to already have created the database, but I'm not sure if you're confusing that with the Oracle schema. Which you will also have to create in advance by creating the user(s) that will own all the objects. You can extract a script to create the user/schema, e.g. from Toad or SQL Developer, or using the DBMS_METADATA package.
Most client applications also have options to export pretty much everything as scripts. In SQL Developer, for example, go to the Tools menu and there's an 'Export database' option where you can choose what you want to include, which will be pretty much everything in your case. You'll still need to pre-create the new database to run those scripts against.

importing data from one database to other when schemas are different

I have this SQL Server 2005 DB and we are upgrading to a new DB in SQL Server 2008. The schemas would be slightly different between the databases. What would be a best option to copy data from the old DB to the new DB.
Define "slightly different". Integration Service is probably the way to go.
Since the schemas are only slightly different, I would suggest making a full backup of the SQL2005 DB and restoring it on the SQL2008 server. Once you have the direct copy, use a script to migrate the data on the few tables where the schema is different.
It really depends on the definition of slightly.
Use Integration Service to design a whole package, or you can connect to the 2005 instance from within 2008 SSMS and right click on the tables and select "Import Data". This will bring up an Wizard that will do the work for you (through SSIS) and let you copy the data right over.
Another option is to use SQL Server Data Tools, which is a new tool from MS that has a schema compare tool where you can actually generate the scripts to create the tables and related objects.
http://msdn.microsoft.com/en-us/data/gg427686

How can I copy from Oracle to Sybase using SQL*Plus?

I have an application that stores data in an Oracle database. I want to copy selected rows from a table in this database to a table in a Sybase database (archiving records). Can I do this directly (i.e. without storing and loading results from a file)?
I've mostly looked into SQL*Plus
SQL*Plus COPY Command (http://docs.oracle.com/cd/B19306_01/server.102/b14357/apb.htm)
Copying Data from the Oracle Database Server to Sybase (http://docs.oracle.com/cd/A95432_01/a80982/ch5.htm#153526)
Copy Command (http://www.oracleutilities.com/SQLPLus/copy.html)
Oracle® Database Gateway for Sybase User's Guide (http://docs.oracle.com/cd/B28359_01/gateways.111/b31048/toc.htm)
I also understand the following: "However, INSERT is the only option supported when copying to Sybase. The SQL*Plus COPY command does not support copying to tables with lowercase table names." However, I haven't been able to do this in SQL*Plus. I'll keep trying, but if anyone has an example of how to do it here, I'd very much appreciate it.
If this is not possible, is Oracle Data Pump (http://www.oracle.com/technetwork/database/enterprise-edition/index-093639.html) my best alternative?
Thank you!
Sincerely,
Deepyaman
Your best bet may be to use some form of ETL tool to handle this if the size of your data is reasonable, rather than getting into the details of setting up the gateways, etc, between systems.
There are many options - Talend Open Studio (free), Informatica, or Microsoft SSIS all should be able to handle this.
The robust way to do this is create a flat file(txt,csv) or an INSERT sql from your "COPY_FROM_DATABASE". And then load it into corresponding table. You might have to do a bit of formatting in this sql in order to run it on a different server. I personally like INSERT sql better.

Migrate SQL Server to Oracle

I need to migrate data (including tables, procedures, schema) from Sql Server 2005 to Oracle 10g. Can anyone suggest me a way to do it? Thanks.
Take a look at the Oracle Migration Workbench
SwisSQL have a commercial tool that will do that. It can go from and to several different database vendors. I've used it before to go from SQL Server to Oracle and it works well.
The best way to work around is by using ORACLE GATEWAY First create tables, views, stored procedures and triggers in ORACLE and then using ORACLE GATEWAY you can directly insert the data from SQLSERVER to ORACLE.
But you need to be cautious about data types. For migrating data from Image, TEXT you need to use *DBMS_Sql*
One of the possible options is to use SQL Developer. It is an Oracle free tool, which migrates both database objects and data. However, you need to have high level of knowledge in database migration, in particular experience of working with Oracle and SQL Server. Sometimes the results of automatic migration with SQL Developer require significant manual adjustments.