How to import a single table?
Simple question: I have done an export some weeks ago of a table.
exp user/pass@database file=c:\table001.dmp log=table001.log tables=TABLE001 rows=yes indexes=no
Now I want to recover only this table, what is the command to do it?
imp user/pass@database file=c:\table001.dmp??
Will the data contained in table001 be deleted and then oracle will insert the data of my dmp file?
Will it just add it to the content with possible PK violations?
If the table has been droped do I have to recreate it again before doing the import?
Will the data contained in table001 be deleted and
then oracle will insert the data of my dmp file?No, import will not drop table nor delete records. It will fail if table exists, unless import with IGNORE=Y.
Will it just add it to the content with possible PK
violations?Yes, if there's PK constraint voilation you will find error in logfile. import will disregards the record.
If the table has been droped do I have to recreate it
again before doing the import?No, you don't have to recreate it.
Similar Messages
-
How to restore a single table from a DP Export from a different schema?
Environment:
Oracle 11.2.0.3 EE on Solaris
I was looking at the documentation on DP Import trying to find the correct syntax to import a single table from a DP Export of a different schema.
So, I want to load table USER1.TABLE1 into USER2.TABLE1 from a DP Export.
Looking at the REMAP_TABLE options:
REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename
OR
REMAP_TABLE=[schema.]old_tablename[:partition]:new_tablenameI can't see where to specify the target schema name. The examples had the new table name residing in the same schema with just a new name.
I looked at the REMAP_SCHEMA but the docs say that will import the entire schema into the new schema and I only want one (1) table.
Any suggestions are most welcome!
-garyI thought I tried that combination and it seemed to me that the REMAP_SCHEMA somehow over-rode the TABLES= parameter >and started loading all the objects.If it does fail (and it should not) then please post the details here and I will try to see what is happening.
Let me get back into the sandbox and try it again. I admit I was in a bit of a hurry when I did it the first time.We are all in a hurry, no worries. If it fails, please post the details and the log file.
Does it make any sense that one parameter would override another?No, this should never happen. We have tons of checks to make sure the job can't have multiple meanings. For example, you can't say
full=y schemas=foo --- Which do you want, a full export or a list of schema exports, etc.
Your suggestion was the first thing I thought would work.This should work. If not, please post the log file with the command and the results.
Dean
Thanks again for the help and stay tuned for my new attempt.
-gary -
How to import the internal table into subroutine as parameter
how to import the internal table into subroutine as parameter, and its structure can be recognized inside the subroutine
Hi Yong,
try this:
parameters: p_tabnm like dd03l-tabname.
field-symbols: <fs_tabname> type standard table.
data: itab_ref type ref to data.
create data itab_ref type standard table of (p_tabnm)
with default key.
assign itab_ref->* to <fs_tabname>.
select * from (p_tabnm) into table <fs_tabname>.
perform subroutine tables <fs_tabname>
using p_tabnm.
*& Form subroutine
text
-->P_<FS_TABNAME> text
-->P_P_TABNM text
form subroutine tables p_tabname type standard table
using p_tabnm.
Here p_tabname already has the structure of the table you gave as input
parameter
endform. " subroutine -
Imp Command to import a single table
Dear All:
i want to import a single table from my backup and want to preserve all the existing indexes using IMP command.
UserID : NEW_USER
PWD: qwert1imp system/password@tstdhk fromuser=syslog touser=newuser tables=logs200712 rows=y file=/u06/import_exp/syslog_logs200712_080217.dmp commit=Y grants=N statistics=NONE ignore=Y log=/u06/import_exp/logs_part_jan.log
Regards
Asif Kabir -
How to Import customized internal table to smartform from Print Program
Hi Gurus,
I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
With regards,
S.SaravananThere is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
Regards,
Raymond -
How to Import/Export database tables from one server to other in oracle8i
Hello friend,
Please can any one tell me how to import/export groups of database tables from one server with oracle to another using VB.net. It would be nice if some one can provide some code of it.
I am a software developer and I am in middle of a large project development, in which I need to export a large oracle database from one server to another efficiently.
Its very urgent so please someone help me.At command prompt (source db)
set ORACLE_SID=db_name
exp system/password@db_name full=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\exp.log filesize=2000M
Then ftp the export dump files (in binary) to the other server or copy to target server over the network.
At command prompt (target db)
set ORACLE_SID=db_name
imp system/password@db_name full=y ignore=y buffer=104857600 file=(c:\file1.dmp, c:\file2.dmp....) log=c:\imp.log filesize=2000M
If the path names of the datafiles are going to be different in the target server (as compared to the source), then precreate the tablespaces before import. Set buffer value accordingly.
Message was edited by:
FeNiCrC_Neil -
How To Import Into A Table with Multi-Value Fields
Hello:
I have a table with a multi-value field that contains states in which a company does business. It is multi-value because there can be more than one state. I tried to import a text tab-delimited file in which the data was arranged as follows:
Field1 Tab Field 2 Tab OR, WA, CA Tab
The "State field contained the multiple entries separated by a comma (like they appear in a query of the multi-value field), but it won't accept it. Does anyone know how to import into a multi-value field?
Thanks,
Rich Locus, Logicwurks, LLCJoana:
Here's the code I used to populate a multi-value field from a parsed field. The parsing routine could be greatly improved by using the Split function, but at that time, I had not used it yet. FYI... the field name of the multi-value field in
the table was "DBAInStatesMultiValue", which you can see in the example below how it is integrated into the code.
Option Compare Database
Option Explicit
Option Base 1
Dim strInputString As String
Dim intNumberOfArrayEntries As Integer
Dim strStateArray(6) As String
' Loop Through A Table With A Multi-Value Field
' And Insert Values Into the Multi-Value Field From A
' Parsed Regular Text Field
Public Function InsertIntoMultiValueField()
Dim db As DAO.Database
' Main Recordset Contains a Multi-Value Field
Dim rsBusiness As DAO.Recordset2
' Now Define the Multi-Value Fields as a RecordSet
Dim rsDBAInStatesMultiValue As DAO.Recordset2
' The Values of the Field Are Contained in a Field Object
Dim fldDBAInStatesMultiValue As DAO.Field2
Dim i As Integer
' Open the Parent File
Set db = CurrentDb()
Set rsBusiness = db.OpenRecordset("tblBusiness")
' Set The Multi-Value Field
Set fldDBAInStatesMultiValue = rsBusiness("DBAInStatesMultiValue")
' Check to Make Sure it is Multi-Value
If Not (fldDBAInStatesMultiValue.IsComplex) Then
MsgBox ("Not A Multi-Value Field")
rsBusiness.Close
Set rsBusiness = Nothing
Set fldDBAInStatesMultiValue = Nothing
Exit Function
End If
On Error Resume Next
' Loop Through
Do While Not rsBusiness.EOF
' Parse Regular Text Field into Array For Insertion into Multi-Value
strInputString = rsBusiness!DBAInStatesText
Call ParseInputString
' If Entries Are Present, Add Them To The Multi-Value Field
If intNumberOfArrayEntries > 0 Then
Set rsDBAInStatesMultiValue = fldDBAInStatesMultiValue.Value
rsBusiness.Edit
For i = 1 To intNumberOfArrayEntries
rsDBAInStatesMultiValue.AddNew
rsDBAInStatesMultiValue("Value") = strStateArray(i)
rsDBAInStatesMultiValue.Update
Next i
rsDBAInStatesMultiValue.Close
rsBusiness.Update
End If
rsBusiness.MoveNext
Loop
On Error GoTo 0
rsBusiness.Close
Set rsBusiness = Nothing
Set rsDBAInStatesMultiValue = Nothing
End Function
Public Function ParseInputString()
Dim intLength As Integer
Dim intStartSearch As Integer
Dim intNextComma As Integer
Dim intStartOfItem As Integer
Dim intLengthOfItem As Integer
Dim strComma As String
strComma = ","
intNumberOfArrayEntries = 0
strInputString = Trim(strInputString)
intLength = Len(strInputString)
' Skip Zero Length Strings
If intLength = 0 Then
Exit Function
End If
' Strip Any Leading Comma
If Mid(strInputString, 1, 1) = "," Then
Mid(strInputString, 1, 1) = " "
strInputString = Trim(strInputString)
intLength = Len(strInputString)
If intLength = 0 Then
Exit Function
End If
End If
' Strip Any Trailing Comma
If Mid(strInputString, intLength, 1) = "," Then
Mid(strInputString, intLength, 1) = " "
strInputString = Trim(strInputString)
intLength = Len(strInputString)
If intLength = 0 Then
Exit Function
End If
End If
intStartSearch = 1
' Loop Through And Parse All the Items
Do
intNextComma = InStr(intStartSearch, strInputString, strComma)
If intNextComma <> 0 Then
intNumberOfArrayEntries = intNumberOfArrayEntries + 1
intStartOfItem = intStartSearch
intLengthOfItem = intNextComma - intStartOfItem
strStateArray(intNumberOfArrayEntries) = Trim(Mid(strInputString, intStartOfItem, intLengthOfItem))
intStartSearch = intNextComma + 1
Else
intNumberOfArrayEntries = intNumberOfArrayEntries + 1
intStartOfItem = intStartSearch
intLengthOfItem = intLength - intStartSearch + 1
strStateArray(intNumberOfArrayEntries) = Trim(Mid(strInputString, intStartOfItem, intLengthOfItem))
End If
Loop Until intNextComma = 0
End Function
Regards,
Rich Locus, Logicwurks, LLC
http://www.logicwurks.com -
Hi all,
I am trying to import a simple XML file using import manager with the following information:
- NAME: STRING
- LAST NAME: STRING
- CITY: STRING
I have in my repository the next information:
- NAME: TEXT.
- LAST NAME: TEXT.
- CITY: LOOKUP TABLE (CITY TABLE)
CITY TABLE is a lookup table with just a fiel called 'NAME:TEXT'.
With import manager I select the XML field CITY:STRING and I clone it. After that, I select the lookup table called TABLE CITY and I make the following map:
- <b>Remote key</b> (Repository) maps with <b>City clone</b> (XML file)
- <b>name</b> (Repository) maps with <b>city</b> (XML file).
Finally, I select the Products table from the repository and I make a new map between CITY:LOOKUP TABLE (from the repository) and city (from the XML File).
The import status fails. What is wrong?
Thanks in advance,
MartaHi Marta,
you have to import the lookup table before importing the main table data using an extra import map.
But if I understand your description correctly, you only have one field in your city repository, which is the display field. This way, you can also load into the city lookup table using only the main table import.
When you select 'city' in the field mapping (destination table is the main table), you will see the distinct values in the value mapping area below.
In the destination pane of the value mapping, there shouldn't be any values for the initial import. So you have to select all your source values and 'ADD' them to your repository.
If this still doesn't work, try the two maps aproach and import the cities prior to the main table records, then you can automap them later with the main table import.
Please tell me if this still doesn't work.
Regards,
Christiane -
How to block a single table for a single user
Hi all.
I want to block a single Z table for a single user. How to do this? If he/she tries to display data using SE16 or SE11 Tcode he/she should get an error message.
Regards,
Prajwal K.Hi Prajwal,
We can use the function modules ENQUEUE_E_TABLE for locking tables and the function module DEQUEUE_E_TABLE for unlocking tables. With this method, we don't need to lock objects in order to lock the tables. In other words, any table can be locked/unlocked using these function modules.
Check this sample code:
*Locking Table*
data:
varkey like rstable-varkey.
varkey = sy-mandt.
locking the tables............................
call function 'ENQUEUE_E_TABLE'
exporting
MODE_RSTABLE = 'E'
tabname = 'MARA'
varkey = varkey
X_TABNAME = ' '
X_VARKEY = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = 'X'
exceptions
foreign_lock = 1
system_failure = 2
others = 3.
Hope this helps you.
Regards,
Chandra Sekhar -
How to get a single table from a .db file
Hello,
We have taken a backup of our whole schema into a .db file. and by mistake one of our table in that schema got truncated. Is there any way we can restore only that table from the .db file?
Please help.
Thanks
RameshIt's not so easy. You could perform a point-in-time recovery of the whole database, where point-in-time is the moment just before the table was truncated. Big disadvantage is you lose all other changes made after the truncation,too. Or you restore to an auxiliary database, export the table and import it back into the source database.
Werner -
How to import a single schema into multiple target schema?
Hi,
I want to import a schema named sd from my source database to my target database in schema sd1 and sd2.
I have tried using the following impdp parameter which is throwing error :-
impdp system/system schemas=sd remap_schema=sd:sd1,sd:sd2 directory=backup dumpfile=8.12.13.dmp logfile=8.12.13.log
Please help me.If you look up the syntax in the docs, you will see that while you can remap many schemas into one, you cannot remap one schema into many.
-
How to import an excel table into iWEb
I am trying to post results from a race. I have an excel file that lists participants by gender age and distance. I would like to add this list as a link from one of my web pages.
Mark & Drew ~ Welcome to the Support Communities. Let me ...Well, see for yourself by clicking HERE. There's also this tutorial:
ASC — Searching -
How can Import Mysql my database and Table into website -
Hi,
friend i am using CS3 ,i made all need tables in database ,I need to know
how can import that database /table into website.
I know in domin there is admin Mysql inside i have found impotr/export/ but
when I click import i do not know where my database/table been save to import itIf all you are trying to do is change an existing tablepace from a single datafile to multiple datafiles, then a simple import will work fine. Just create the tablespace in the new database with multiple files, then do the import normally.
If you want to move segments into different tablespaces, or change the names of the tablespaces, then you will need to precreate the tables before importing. Then, do the export with indexes=N and constraints=N. Run import with the resulting file, then re-create the constraints and indexes in the new tablespaces.
TTFN
John -
How to import new tables from database
I have relational source in OWB. I had added a new table in teh database, now I donot know how to import this new table in OWB9i?
I will appreciate your help.
Thanks
SyedMark,
I am sorry I did not explain the problem clearly. I created module of the relationa source and then using DB link I had imported all the tables from schema A , but my question is that I had created a new table in the Schema A and I want to just import that table in my relation resource module. Is there a way to do it in OWB? How do we create just on etable in OWB module?
Thanks
Syed -
Can't figure out how to import photos
I've been watching YouTube videos as well as reading tutorials and I can't figure out how to import a single photo.
This is what my screen looks like - http://i.imgur.com/kODcL9t.jpg
Everything I watch or read, it appears I need to click Import > select a folder containing image files > and then I'll see the thumbnails contained in that folder. But no matter what folder I select, whether it contains jpegs, RAW files, anything at all, there are no previews and the import button stays grayed out.Toggling the subfolders box doesn't help. HDD is running.
I'm probably just doing something wrong. :/
Maybe you can tell? Lightroom - YouTube
EDIT: I deleted my Preferences file and that seemed to fix it. No idea what was wrong. If anyone else needs it, it's at: C:\Users\[user name]\AppData\Roaming\Adobe\Lightroom\Preferences\Lightroom 5 Preferences.agprefs
Maybe you are looking for
-
How do you use edge web font in Edge Reflow?
By default, I don't have a lot of fonts. It's just viewing a few of them. How can you get the web font for Edge Reflow? Can you use font from fontbook? Is there a way to download Edge Web Font?
-
IPhone 5S call quality / volume issue. Please help.
Hi, Please can anyone help? I have an iPhone 5S and callers frequently complain (9 out of 10) that the volume fades in and out and my voice sometimes sounds robotic, i.e. digital interference. I always hold the iPhone in the same manner as any other
-
Ipod wont show up on itunes but shows up on my computer
Just got a 2nd gen ipod shuffle and trying to sync it to my itunes library. My library does not detect my shuffle but my computer does. When I run a diagnostic "ipod connection status" is red/failed and once I click help I am sent to downlaod latest
-
Placeholder in Pages template can't be replaced.
Hi there! Me again with another Pages template problem. One of my templates (named "Einladung" - "invitation" in English) has an image which is marked as placeholder when I move the mouse pointer over it. However, when I try to replace the image with
-
I have written a JNI app and it seems to work fine, but processing with very large files I run out of stack space. I have solved this issue for the moment by changing the stack size with the -Xss param to java but this is not the ideal issue because