Q
Problem solve Get help with specific problems with your technologies, process and projects.

Creating a backup of a table that contains a LONG type field

I need to take a backup of a selected number of rows from an Oracle table. I thought of doing a create table ... as select from. However, the source table consists of a LONG type field. How can I back this up? Can I use export?

I need to take a backup of a selected number of rows from an Oracle table. I thought of doing a create table ... as select from. However, the source table consists of a LONG type field. How can I back this up?

How can I take an export of the table? Can you provide me with the appropriate script? It will be great if I can create a temporary table.

The CREATE TABLE AS SELECT will not work if the table contains a LONG or LONG RAW column as you have found out. To take an export of just this table, use the Oracle export utility similar to the following:

exp userid=system/manager file=exp.dmp tables=scott.emp

The above example exports just the SCOTT.EMP table. You can export selected rows of data using the QUERY clause. This parameter lets you specify the equivalent of a WHERE clause on your table. An example might look like the following:

exp userid=system/manager file=exp.dmp tables=scott.emp query="empno=1001"

Dig Deeper on Oracle database backup and recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close