on 05-01-2012 11:39 AM
How can i copy tables from schema A to schemaB both schemas are present in same system.
Also how can i getenaret create table script, i right clicked but under generate scripts i did'nt see create.
In sql server you do have those options to generate scripts.
Is there a mass tables copy to another schema available, i found csv export mass tables option i found.
thanks a lot for the helpful info.
Hi,
To copy single table through SQL, you can use
create column table <Schema Name>.<New Table> as (select * from "Schema Name"."<Old Table>")
To copy set of tables,you have to use Export/Import feature of Quick Launch
To see the definition script of the table,you can right click the table and say "Open Definition" and again right click in the opened definition and say "Export SQL".This will show the table definition.
Hope this helps.
Rgds,
Murali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you export the schema with the content,the schema name would be maintained.So if you try to import the same schema name will be referred and thatsy it says the table already exists.
After export rename the schema to the new schema (where you want to import) and then do the import
Refer this : http://scn.sap.com/thread/3409793
Rgds,
Murali
Hi Murali,
With your tip and my colleague's help, I tried again with the statement below and it works! Thanks!
1. create a temp folder in server, like /tmp/SFLIGHT
2. execute the statements as below:
EXPORT "SFLIGHT"."*" AS BINARY INTO '/tmp/SFLIGHT' WITH REPLACE SCRAMBLE THREADS 10;
IMPORT "SFLIGHT"."*" AS BINARY from '/tmp/SFLIGHT' with RENAME SCHEMA "SFLIGHT" TO "SHANA";
BR.
Bella
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
The IMPORT command allows you to change the target schema name from SP6 , I believe
Br
Prabhith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raj,
You can use Export/Import feature to load the tables from one schema to another schema.
If you do export,you will get ".SQL" and also "Data" to your destined folder from where you can again use "Import" to load the data to specified Schema.
Please see this link on Import/Export feature in HANA:
http://scn.sap.com/docs/DOC-26381
Regards,
Krishna Tangudu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To get the SQL to create the table, right click on the table name in the Navigator window of the Studio and select Open Definition. In the main window showing the table definition, right click and select Export SQL.
The only way I'm aware of to copy tables is to use export/import. Note that export will also generate a file called create.sql which contains the SQL statement to create the table, so this is another way to get this information.
Cheers,
Jody
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another way of copying tables can be done quickly using BODS (aka data services). Personally, I recommend that you start getting used to SQL. In HANA, SQL is quicker to get things done!
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In HANA you have an option to create the table with CREATE TABLE ... AS <subquery> option.
Unfortunately I don't have a ready connection to HANA this moment, but I think in the table definition, there is an option to see the SQL statement, which is similar to SQL Server option of CREATE TABLE script generation.
Personally, I'd prefer to create a "CREATE TABLE ... AS ... <subquery> " script myself from the data from TABLES view and then run the generated script.
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.