Export user permissions  - dropping schema

Hey, i created a new database from an export of the old database.
So, for the import I need the user on the new db to import the users schema.
How can I export the user ( with all his roles and permissions) on the old database and import this on the new database before I start the import.
Reason:
I need to drop the users schema from time to time. so the user is dropped with dropping the schema.
Any ideas ?
Chris

If you don't know datapump you will find that a bit difficult but it's definitely a thing to consider.
expdb user/pw consistent=Y
correct syntax ?
No Oracle changed the syntax (they reintroduce the syntax in 11.2 to help people but in 10.2 there is only the datapump syntax)
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#SUTIL200
You have to use flashback_time and flashback_scn to replace consistent=y
Will this export the user the the import will create the user on the new database ?
Yes it can create the user.
Whats the syntax for the import ?
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm
Notice you can do directly the import without the need of an export, directly with a database link !
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm#i1007380
There are restrictions (LONG columns etc.) but it can be interesting.
The schema already exists, is there a need to delete the schema ?
Not necessarily but it can make things easier.
Best regards
Phil

Similar Messages

  • How to export a user and their schema from one 10g database to another?

    Hi,
    I would like to export a user and their entire schema from one 10g database to another one. How do I do this?
    thx
    adam

    If you want to export a user and the schema owned to the user, and import to the same user in a different database, or a different user in the same database, you can use the exp and imp commands as described in the Utilities manual.
    These commands are very versatile and have a lot of options - well worth learning properly. To give you a simplistic shortcut, see below - I create a user 'test_move', create some objects in the schema, export, create a new user in the database 'new_move' and import.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:46:54 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user test_move identified by test_move;
    User created.
    SQL> grant create session, resource to test_move;
    Grant succeeded.
    SQL> connect test_move/test_move
    Connected.
    SQL> create table test (x number);
    Table created.
    SQL> insert into test values (1);
    1 row created.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> exp system/????? file=exp.dmp owner=test_move
    Export: Release 10.2.0.1.0 - Production on Sat Mar 11 21:48:34 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user TEST_MOVE
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user TEST_MOVE
    About to export TEST_MOVE's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export TEST_MOVE's tables via Conventional Path ...
    . . exporting table                           TEST          1 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:49:23 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user new_move identified by new_move;
    User created.
    SQL> grant create session, resource to new_move;
    Grant succeeded.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> imp system/????? file=exp.dmp fromuser=test_move touser=new_move
    Import: Release 10.2.0.1.0 - Production on Sat Mar 11 21:50:12 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    . importing TEST_MOVE's objects into NEW_MOVE
    . . importing table                         "TEST"          1 rows imported
    Import terminated successfully without warnings.
    oracle@fuzzy:~>                                                       If moving between databases, remember to set the SID properly before the import. If keeping the same userid, skip the from/to stuff in the import.
    There are many variations on the theme ...
    You can simplify this. You can select tables individually. You can use a parameter file. You can transport all the constraints and data. You can skip the data and only move the definitions. You can get some help (imp/exp help=yes).
    And, if it's all 10g, there is a new and improved facility called expdp/impdp (dp = data pump) which has a lot more capability as well, including direct transfer (no intermediate file) together with suspend/restart. Also documented in the Utilities manual.

  • How to export user master data in SAP HANA?

    We have a HANA server SP7 and we need to migrate it to a new server which will also be HANA SPS7. However the backup/restore approach is not to be used as confirmed by client. We are going to perform a export/import of all the important schemas. The question here is how to take an export of the users and roles in this scenario

    Hi Meenu,
    As Michael mentioned you can't export roles and users in a general way.
    To add to it, you can always export users and roles if they are created used development workbench. That means if your developer has created any repository roles or users using development workbench or WebIDE you can export them by assigning those roles/privileges to a package/delivery unit. Make use of studio/HALM/CTS for that.
    However to export users and roles created by admin workbench using gui can't be exported.
    Happy HANA
    **Deepak Chodha

  • Export User Attributes in OIM 11g

    Hi,
    Can anyone let me know how to export User defined attributes in OIM 11g (11.1.1.5)? I couldn't find option in export manager for user defined fields (as in 9.x version).

    bbagaria wrote:
    madhatter wrote:
    BTW, the result of exporting the "User UDF" category contains the /file/User.xml too. So, you need not deal with metadata directly to get this file.Interesting, never worked for me.Use the code snippet in the Export section at http://idmclub.wikidot.com/import-export-deployment-artifacts
    Use "User UDF" instead of "Resource". You will get something like the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xl-ddm-data version="2.0.0.0" user="XELSYSADM" database="jdbc:oracle:thin:@localhost:1521/orcl" exported-date="1312490747931" description="">
    <Form repo-type="RDBMS" name="USR" subtype="User UDF">
    <SDK_ORC>0</SDK_ORC>
    <SDK_SCHEMA>DEV_OIM</SDK_SCHEMA>
    <SDK_DATA_LEVEL>2</SDK_DATA_LEVEL>
    <SDK_DESCRIPTION>Users - User Defined Fields</SDK_DESCRIPTION>
    <SDK_UPDATE>1304799781000</SDK_UPDATE>
    <SDK_ACTIVE_VERSION>0</SDK_ACTIVE_VERSION>
    <SDK_LATEST_VERSION>0</SDK_LATEST_VERSION>
    <SDK_TYPE>S</SDK_TYPE>
    <FormField repo-type="RDBMS" name="USR_UDF_LS_CHG_CODE">
    </FormField>
    <FormAdministrator repo-type="RDBMS">
    </FormAdministrator>
    </Form>
    <UserXml repo-type="MDS" name="User" mds-path="/file" mds-file="User.xml">
    <completeXml>
    <UserXml>
    <entity-definition xmlns="http://www.oracle.com/schema/oim/entity">
    </entity-definition>
    </UserXml>
    </completeXml>
    </UserXml>
    <DataObjectDef repo-type="RDBMS" name="com.thortech.xl.dataobj.tcUSR">
    </DataObjectDef>
    </xl-ddm-data>Enjoy the UserXml XML element!
    Disclaimer: I use 11.1.1.3, not 11.1.1.5
    Edited by: madhatter on Aug 5, 2011 1:10 AM

  • Is it possible to export tables from diffrent schema using expdp?

    Hi,
    We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But
    Is it possible in expdp?
    Thanks in advance ..
    Thanks,

    Hi,
    you have to use "schemas=user1,user2 include=table:"in('table1,table2')" use parfileexpdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log{quote}
    I am not able to perform it using parfile also.Using parfile it shows "UDE-00010: multiple job modes requested, schema and tables."
    When trying the below, i get error
    {code}
    bash-3.00$ expdp directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=(\'MM\',\'MMM\') include=TABLE:\"IN\(\'EA_EET_TMP\',\'WS_DT\'\)\"
    Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 October, 2010 18:34:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=('MM','MMM') include=TABLE:"IN('EA_EET_TMP','WS_DT')"
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "MM"."EA_EET_TMP" 0 KB 0 rows
    ORA-39165: Schema MMM was not found.
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /export/home/nucleus/dump/test.dmp
    Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 18:35:19
    {code}
    When checking expdp help=y shows :-
    {code}TABLES Identifies a list of tables to export - one schema only.{code}
    As per few testing,tables from different schemas are not possible to export using expdp in a single command.
    Anand

  • Sun IDM 8.1.1P2: Export user records to xls file Functionality Issue

    Hi All,
    This is my first post in this form, please guide me to right path.
    We implemented custom functionality to search user records from AD and LDAP from IDM User console. After searching the records we provided a export functionality to export resultant user records to xls file.
    The issue is the number of exported user records to xls file is not same as the number of user records while search.
    This functionality is working good in our Development and VALenvironments but not with the Production environment.
    I checked the custom jsp file and the calling Rule from all the three environments and they are same.
    From VAL and PROD server.log I see the following.
    PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response
    But this error message didn't stop VAL to export same number of records to xls file.
    # of records serached from PROD is 16809
    # of records serached from VAL is 10312
    They are constant all the time.
    # of records exported to xls from PROD is 168 or 1274 (It is varying, each time I export it shows different number)
    # of records exported to xls from VAL is 10312 (Always same as search)
    We are on Glassfish V2.1.1P8.
    I checked file sizes from VAL and PROD both are same.
    It would be great if any one can point me to the right direction where else I have to check for possible cause.
    Thanks,
    Ravi Mangalagiri

    Hi Arjun,
    Thanks for responding to my post.
    The search is working as expected in all 3 environments DEV,VAL and PROD.
    The search and alignment performed by the Rule where as DB connection and Saving to XLS performed by the custom JSP file.
    Since search is working fine I don't think any permissions issue with AD or LDAP.
    Couple of things I noticed from server.log from all environments
    SEVERE|sun-appserver2.1.1|javax.enterprise.system.container.web|_
    ThreadID=297;_ThreadName=httpSSLWorkerThread-9084-102;_RequestID=5efa3ecb-0ec9-4695-ab51-8049257b
    9d57;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this resp
    onse
    and
    WARNING|sun-appserver2.1.1|javax.enterprise.system.stream.err|_ThreadID=78;_ThreadName=Provisioner;_RequestID=531d32b0-6d9a-4
    3e-bd74-0bc9478ffdae;|org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    This is logging when the custom jsp is executing.
    getOutputStream() has already been called for this response.
    I am not sure if this is the root cause, since it is logging in DEV and VAL also.
    Other things I noticed are.
    Yester day I conducted 10 tests and all are taking 6 min 18 sec or 6 min 19 sec or 6 min 22 sec.
    Also I noticed that the number of user records exported to xls depends on the transfer rate.
    For example,
    if the file download transfer rate is 1.50 KB then the user records are between 1200 to 1800 where as the search user records are 16590.
    if the file download transfer rate is 800 B then the user records are between 200 to 600 where as the search user records are 16590.
    Not sure where to check this time value(attribute) 6 min 18 sec..
    Please provide me some info where else I need to check.
    Thanks,
    Ravi.

  • Export system or sys schema

    If I am using imp/exp export schema system and sys, is it possible?

    Girish Sharma wrote:
    Sir,
    As per your saying that SYS will not be included in export i tried following command and i got SYS schema exported:
    In windows:
    exp 'sys/pw@orcl as sysdba' owner=sys file=xx.dmp feedback=10 log=xx.dmp
    In Linux:
    expdp \'sys/pw@orcl as sysdba\' schemas=sys dumpfile=xx.dmp logfile=xx.logLike other has suggested, you can run exp/expdp doesn't mean you get it exported. See some example,
    %exp sys  owner=sys file=test.dmp
    Username: sys as sysdba
    Password:
    Connected to: Oracle Database 10g Enterprise Edition
    Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses AL32UTF8 character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user SYS
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user SYS
    About to export SYS's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully with warnings.As you can see no objects are listed as exported.
    This Oracle metalink has this explained
    Schema's CTXSYS, MDSYS and ORDSYS are Not Exported
    Doc ID: Note:228482.1
    Also if you check $ORACLE_HOME/rdbms/admin/catexp.sql
    which is the script to Creates internal views for Export/Import utility
    You will see
    CREATE OR REPLACE VIEW exu81obj AS
            SELECT  o$.*
            FROM    sys.obj$ o$, sys.user$ u$
            WHERE   BITAND(o$.flags, 16) != 16 AND
                    /* Ignore recycle bin objects */
                    BITAND(o$.flags, 128) != 128 AND
                    o$.owner# = u$.user# AND
                    u$.name NOT IN ('ORDSYS',  'MDSYS', 'CTXSYS', 'ORDPLUGINS',
                                    'LBACSYS', 'XDB',   'SI_INFORMTN_SCHEMA',
                                    'DIP',     'DMSYS', 'DBSNMP', 'EXFSYS',
                                    'WMSYS')These database dictionary metadata schemas are deliberately excluded.
    -hint- Maybe be by changing this script, you can get them included ;)
    But don't take my word on that, changing DB dictionary is not supported in anyway.
    >
    Please quote your valuable suggestations because as per your saying i argued in a long debate with my friends that "we can not take export of sys's schema, because Ying sir is saying like that". I shall be highly informative on your feedback please.
    I appreciate you take my word so seariously and I am glad I didn't let you down in this case.

  • User accidentaly drop a table - no downtime is allowed , what will you do..

    hi guys,
    i am on oracle 10g. i do not have flashback recovery area. it is disabled.
    i have a daily full db backup schedule at 3am daily.
    i have a 12am daily logical export as well.
    Now assumming on 21th 2am user accidentally drop a table and purge it and the issue was realise only later at 5am.
    q1) is it possible to
    i) import using the 12am daily export dump file
    ii) and perform recovery on that particular table only ? -- which i think not possible...
    or should i..
    q2) restore the fullbackup on 20th on another server. recover the database until 21th 2am. export the table out.. and import the table in production server (where the table was accidentaly deleted)
    however , i might not have aonther server at my expense
    what should i do ?!
    Rgds,
    Noob

    Hi,
    q1) is it possible to
    i) import using the 12am daily export dump file
    ii) and perform recovery on that particular table only ? -- which i think not possible...Yes, it is possible, just fetch out only that particular table but not the whole DB.
    "i might not have another server at my expense"
    - Pavan Kumar N
    Oracle 9i/10g - OCP
    http://oracleinternals.blogspot.com/

  • Missing Export and Use Drop Down Lists

    I cannot export my .mov files to any format other than .mov as the Export and Use drop down lists are missing. When I go to File > Export the text for Export and Use are there followed by blank gray space as if the drop down lists never existed.
    I just upgraded to Pro today and had infrequently used QuickTime Player previously. I have the most current version 7.6.5. The other functions appear to be working normally, but I am not a "familiar user" so I can't say for sure.
    Any ideas?

    Well I could not copy & paste the text from the Movie Inspector, so I have typed it below (except for the complete source info).
    Source: C:\....Filename.MOV
    Format: 16-bit Integer (Little Endian), Mono, 44.100 KHz
    MPEG-4 Video, 1280 x 720, Millions
    Movie FPS: 30.01
    Playing FPS: 30.01
    Data Size: 8.16 MB
    Data Rate: 6.99 mbits/sec
    Current Time: 00:00:00.00
    Duration: 00:00:09.80
    Normal Size: 1280 x 720 pixels
    Current Size: 1280 x 720 pixels
    I have also downloaded a couple of iPod hip-hop ad movies (.mov) and they have the same problem (no export drop-down lists), so I don't believe it is the movie format.
    I have not tried to uninstall/reinstall QuickTime Pro yet, but wonder if I should....

  • If I drop schemas will stats still be availible in the database

    Hi,
    I'm creating a duplicate of a database and was thinking of doing the following:
    1. exp data to file and move it over the network (there is a lot of long data in different schemas)
    2. imp data new dublicated database
    3. gather stats
    4. drop schemas
    5. recreate schemas
    6. load fresh data from a new export
    My question:
    Do we need to gather statistics again or will statistics stay in the dictionary allthough I drop the schemas?
    Regards
    933746

    sybrand_b wrote:
    If you use impdp network_link=
    you can import in the target database directly instead of this cumbersome procedure.
    And, of course the statistics are gone when you drop a schema.
    Sybrand Bakker
    Senior Oracle DBAHi,
    We use networklink as much as possible but it dosn't support long data.
    So this time we export to files and move it.
    Thanks for your reply

  • WFM export user/schedule data

    Hello, all. Does anyone know how to export WFM (not QM) user/schedule data out? We have WFM 8 and want to export user/schedule data out to integrate with a third party reporting application. I've looked through a few of the WFM tables but couldn't figure out which tables contain those data. is there a DB schema manual? Does anyone know how to export the data out?
    Thanks.

    Hello,
       If Simpliciti is a Calabrio partner, they should have access to their portal.  In their portal they have the QM and WFM schema guides. 
    HTH,
    Chad

  • How to Export and Import the schemas

    How can i export & import the schema's ? pls give me some example on how to do it.
    Could anyone pls show the commands to retrieve the Tablespace information... i mean what its initial size.. and how much of space has been used...
    ur reply is very much appreciated
    regards
    Muraly

    user11136977 wrote:
    Hi all,
    i am trying to export / import, need to know the commands
    =>how to export and import full schemas from 1 user to another
    =>how to export and import database
    =>how to export the tablespaces
    RegardsNo version, must be 10g then.
    All you asked and much more in the Utilities guide.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023560
    HTH
    Aman....

  • Exporting only triggers from schema..

    I only want to export triggers from a schema and no other database objects.
    simillarly i want to only import these triggers into another schema.
    How can i do this.
    please suggest.

    one way to go: install pl/sql developer from Allroun Automations (even trial version) {i believe that outhers tools can do this, but i,ve worked with this one and i like it}.
    Then go: Tools > Export User Objects and you'll find there all the objects in your schema and you can select anything from there using CTRL or CTRL+SHIFT and then you chose and destination file for your export. By doing so, pl/sql developer will generate an sql script containning then selected objects (the definitions of these objects; if you chose a table then in the script you'll find the definition that created the table...and so on....)
    To import in another schema: connect into your outher_schema and just run the generated sql script using sqlplus for exemple.
    by

  • Export Mailbox permissions to CSV

    I am looking for a powershell script to export mailbox permissions. I have a list of accounts that I know are shared to other users but I want to be able to export all their permissions to a CSV so I can then replicate these permissions in Office 365. I
    have a script now that pulls every mailbox and its permissions but it is such a mess i would like to be able to pull a file much cleaner they what i have. 
    The one I have now is 
    Get-Mailbox  | Get-MailboxPermission | Select {$_.AccessRights}, Deny, InheritanceType, User, Identity, IsInherited, IsValid | Export-Csv D:\test_permission.csv
    I want to be able to only pull data from the list of mailboxes that i have, and only see accounts/groups that have full mailbox rights. If I could filter out system accounts that would be great as well. i tried modifying this script but had no such luck.
    Thanks!

    Hi,
    I have a test in my environment using Exchange 2010. You can use the following cmdlet Amit provided to find who has full mailbox access on one or more mailboxes in your environment and export the result to a CSV file.
    Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission | Where {$_.user -notlike "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[String]::join(‘, ‘, $_.AccessRights)}} | Export-Csv C:\MailboxAccess.csv
    -NoTypeInformation
    Please change the "C:\MailboxAccess.csv " to the location that you use to save this .csv file.
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Should i drop schema or truncate tables before importing?

    I have exported a dump of the whole schema form oracle database. I need to import this to another database with a different schema name but same tables. The only thing i am doing is this to bring data consistent with the other database.
    Now Do i need to drop schema or do anything like that to avoid and redundancy or i can just go ahead and do the import? Please let me know how to do it. I would prefer not deleted any tables but truncate all the data if needed from about all 200 tables.
    Thanks

    For the places in your application where a Sequence is used to insert or set values in some tables, note that the sequence's current value may have been incremented if it has been used since the last import. If your truncate and re-import the tables, the tables may have the older (lower) values but the current sequence may be higher.
    You would then have to "reset" the sequence best by dropping and recreating it.

Maybe you are looking for