How to drop Users DBF file in oracle 11g?

Hi All
I dropped the user and want to free the table space(To import another user(Which has more than 10 GB of record).
the below is my query which i used to import the data and schema
impdp system/test DIRECTORY=dump_dir DUMPFILE=exp_test.dmp FULL=Y LOGFILE=import_test.log REMAP_TABLESPACE=TEST_DATA:USERS
After dropping my user i checked into the folder C:\oradata\orcl and i found two files USERS01.DBF(21.1GB,its 21.1 gb because i tried to cretae an another schema nd i got stuc up with low disk space.) and TEMP01.DBF(1.66GB).
I tried to drop USERS tablespace and i could nt able to do it.
Can any one help me to reduce the size of both two files?
Thanks & Regards
Vijay
Edited by: Vijayamurugan on Jun 15, 2011 8:22 AM

bobonacus wrote:
shutdown immediate
startup nomount
alter database mount;
why not just 'startup mount'?? Why the two-step?
alter database rename file
'e:\oracle\oradata\orcl\indx01.dbf',
'e:\oracle\oradata\orcl\rbs01.dbf',
'e:\oracle\oradata\orcl\system01.dbf',
'e:\oracle\oradata\orcl\temp01.dbf',
'e:\oracle\oradata\orcl\tools01.dbf',
'e:\oracle\oradata\orcl\users01.dbf',
'e:\oracle\oradata\orcl\file1.dbf',
'e:\oracle\oradata\orcl\file2.dbf'
to
'd:\oracle\oradata\orcl\indx01.dbf',
'd:\oracle\oradata\orcl\rbs01.dbf',
'd:\oracle\oradata\orcl\system01.dbf',
'd:\oracle\oradata\orcl\temp01.dbf',
'd:\oracle\oradata\orcl\tools01.dbf',
'd:\oracle\oradata\orcl\users01.dbf',
'd:\oracle\oradata\orcl\file1.dbf',
'd:\oracle\oradata\orcl\file2.dbf'
;I'm not sure the RENAME clause allows multiple files to be listed like that. In any event, just reduce the chance of error, I'd do it file by file.
You forgot to mention that you need to actually move the files, at the os level. All the above does is change their entries in the control file. It doesn't do anything at all to the files themselves.
>
shutdown immediate
startup
No need for the shutdown. You could just ALTER DATBASE OPEN.
>
>
you can get a full listing of files by
alter database backup controlfile to trace;
and you can then copy and paste from that ...
Simpler, just select from dba_data_files.
eta. of course assuming you mean move your database files rather than your installation
Edited by: bobonacus on Jun 16, 2011 3:30 PM

Similar Messages

  • How to import a dbf file to oracle

    Hi,
    Please anybody can help me how to imprt an dbf file to oracle.
    Thanks

    Hi,
    I have Created or Added a .DBF file in an Database.
    Not imported a .DBF file, Yes i have exported, imported to and from .dmp file.
    Regards.

  • Add old users.dbf into new oracle 11g express database?

    Hi all, I have users.dbf from old reinstall oracle 11g express database.
    Now I was reinstall oracle 11g express and looking the way how to add old
    users.dbf into new /u01/app/oracle/oradata/XE/ folder where new users.dbf exist.
    Old users.dbf have 3gbytes(dates from old oracle instal)
    regards
    Gordan

    useruseruser wrote:
    Hi all, I have users.dbf from old reinstall oracle 11g express database.
    Now I was reinstall oracle 11g express and looking the way how to add old
    users.dbf into new /u01/app/oracle/oradata/XE/ folder where new users.dbf exist.
    Old users.dbf have 3gbytes(dates from old oracle instal)In Oracle, a database is more than just a single file.
    That single file is like a single piece of the puzzle. It alone cannot be the picture. Nor can you derive what the picture looks like from a single puzzle piece.

  • How to drop user giving error ORA-03113

    hello,
    I am trying to drop user as follows
    SQL> drop user jbponm_trf cascade;
    drop user jbponm_trf cascade
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    SQL>
    pls suggest me how to drop user.

    Hi Dear,
    Please reconnect from SYS and try again ,Looking there is some problem in your oracle connection or network problem.
    Best Regards
    Faheem latif
    Senior Database Architect
    Genie Technologies (Pvt.) Ltd.

  • How to alter user defined  objects in  oracle

    Hi all,
    Can any one tell me how to alter user defined objects in oracle .
    Thanks,
    P Prakash

    prakash wrote:
    Hi all,
    Can any one tell me how to alter user defined objects in oracle .
    DROP
    then
    CREATE
    Handle:      prakash
    Email:      [email protected]
    Status Level:      Newbie (80)
    Registered:      Feb 3, 2011
    Total Posts:      185
    Total Questions:      67 (65 unresolved)
    so many questions & so few answers.
    How SAD!
    Edited by: sb92075 on Sep 22, 2011 9:22 AM

  • How to update a dbf file with gui_upload???

    hi friends,
    i would like to know how to update a dbf file with gui_upload???
    as i hve already know that it's easy to convert dbf to tab formatted text fle and thn upload it.but i want the direct uploading way.i don't let my user's bsy with converting existing dbf to txt.so pls help me asap!!!!!i will be thankful to you!!!!!

    its very easy you can search other forum!!!

  • Generate .dbf file from oracle database using JDBC

    Dear all,
    I need to generate a .dbf file from oracle table. Anyone know how to do this using Java Programming or JDBC? please help!
    thank you

    Hi,
    I assume you already have a JDBC driver for either FoxPro or DBase. If not, use the JDBC-ODBC bridge and the ODBC driver that comes with Window$.
    When you issue a "Create TABLE" command the driver will automatically create a .dbf file and then you can export data to it.
    Imran

  • How to insert an image file in Oracle database

    hi
    can you please tell me how to insert an image file into oracle database????
    suppose there is one image file in c:\pictures\rose.jpg. how to insert that file into database? theoretically i know that will be BFILE type but i dont know how to insert that.
    will be waiting for your reply........
    thanks & regards,
    Priyatosh

    Hello,
    The easiest way to load a blob is to use SQL loader.
    This example comes from the utilities guide:
    LOAD DATA
    INFILE 'sample.dat'
    INTO TABLE person_table
    FIELDS TERMINATED BY ','
    (name CHAR(20),
    1 ext_fname FILLER CHAR(40),
    2 "RESUME" LOBFILE(ext_fname) TERMINATED BY EOF)
    Datafile (sample.dat)
    Johny Quest,jqresume.txt,
    Speed Racer,'/private/sracer/srresume.txt',
    Secondary Datafile (jqresume.txt)
    Johny Quest
    500 Oracle Parkway
    Secondary Datafile (srresume.txt)
    Loading LOBs
    10-18 Oracle Database Utilities
    Speed Racer
    400 Oracle Parkway
    regards,
    Ivo

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • "how to load a text file to oracle table"

    hi to all
    can anybody help me "how to load a text file to oracle table", this is first time i am doing, plz give me steps.
    Regards
    MKhaleel

    Usage: SQLLOAD keyword=value [,keyword=value,...]
    Valid Keywords:
    userid -- ORACLE username/password
    control -- Control file name
    log -- Log file name
    bad -- Bad file name
    data -- Data file name
    discard -- Discard file name
    discardmax -- Number of discards to allow (Default all)
    skip -- Number of logical records to skip (Default 0)
    load -- Number of logical records to load (Default all)
    errors -- Number of errors to allow (Default 50)
    rows -- Number of rows in conventional path bind array or between direct path data saves (Default: Conventional path 64, Direct path all)
    bindsize -- Size of conventional path bind array in bytes (Default 256000)
    silent -- Suppress messages during run (header, feedback, errors, discards, partitions)
    direct -- use direct path (Default FALSE)
    parfile -- parameter file: name of file that contains parameter specifications
    parallel -- do parallel load (Default FALSE)
    file -- File to allocate extents from
    skip_unusable_indexes -- disallow/allow unusable indexes or index partitions (Default FALSE)
    skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable (Default FALSE)
    commit_discontinued -- commit loaded rows when load is discontinued (Default FALSE)
    readsize -- Size of Read buffer (Default 1048576)
    external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE
    (Default NOT_USED)
    columnarrayrows -- Number of rows for direct path column array (Default 5000)
    streamsize -- Size of direct path stream buffer in bytes (Default 256000)
    multithreading -- use multithreading in direct path
    resumable -- enable or disable resumable for current session (Default FALSE)
    resumable_name -- text string to help identify resumable statement
    resumable_timeout -- wait time (in seconds) for RESUMABLE (Default 7200)
    PLEASE NOTE: Command-line parameters may be specified either by position or by keywords. An example of the former case is 'sqlldr scott/tiger foo'; an example of the latter is 'sqlldr control=foo userid=scott/tiger'. One may specify parameters by position before but not after parameters specified by keywords. For example, 'sqlldr scott/tiger control=foo logfile=log' is allowed, but 'sqlldr scott/tiger control=foo log' is not, even though the position of the parameter 'log' is correct.
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\PFS2004.CTL LOG=D:\PFS2004.LOG BAD=D:\PFS2004.BAD DATA=D:\PFS2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\CLAB2004.CTL LOG=D:\CLAB2004.LOG BAD=D:\CLAB2004.BAD DATA=D:\CLAB2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CTL LOG=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.LOG BAD=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.BAD DATA=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CSV

  • How to store the zip file in oracle table?

    hi,
    How to store the zip file in oracle table ?
    is it possible to unzip and read the file ?
    Thanks
    Rangan S

    SQL> DESC BLOB_TABLE;
    Name Type Nullable Default Comments
    A INTEGER Y
    B BLOB Y
    SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
    ORA-00904: "BLOB": invalid identifier
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
    ORA-00907: missing right parenthesis
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
    ORA-01465: invalid hex number
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));

  • Does anybody know how Oracle load large N-Triple file into Oracle 11g R1?

    Does anybody know how Oracle load large N-Triple(NT) file into Oracle 11g R1 by using sql*loader according to their benchmark results?
    Their benchmark results indicate they have over come the large data set problem.
    http://www.oracle.com/technology/tech/semantic_technologies/htdocs/performance.html
    It means they have loaded LUBM 8000(1.068 Billion+ Triples) into Oracle successfully, but there is no detailed steps provided. For instance, 32-bit or 64-bit platform they used, only one NT file being used corresponding to one dataset or several NT files?
    Is there any exception occured during the loading process if the NT file beyond 60GB? When using jena to generate NT file against LUBM(8000), the size of the NT file would definitely beyond 60GB.
    We are dividing such large NT file into several small ones? Is it a good approach? I'm hesitating to do so!

    A Linux 32-bit platform was used for bulk-load of LUBM-8000 1.106 billion (before duplicate elimination) RDF triples into Oracle.
    Multiple gzipped N-Triple files were used to hold the LUBM-8000 data. zcat was used on all these files together to send the complete data into a named pipe. SQL*Loader used this named pipe as the input data file to load the data into a staging table in Oracle. Once the staging table was loaded, the sem_apis.bulk_load_from_staging_table API was used to load the data into Oracle Semantic Store.
    (Additional details in http://www.oracle.com/technology/tech/semantic_technologies/htdocs/performance.html )
    Thanks.

  • How to attach a .pld file in oracle Designer

    When we try to generate a form out of designer we are getting the error ilke
    sample.pld file is required. The Questions on it are,
    1. What is a .pld file in a designer mean.
    2. How to attach a .pld file in oracle designer for the generation of forms.
    Thanks,
    Ramesh.R

    Hi Erik,
    Thanks for the update.
    My problem in designer is in the desginer under the generator preference dialog window the property "Form/Libr" attachment the "module specific library attachment" has the value like "ABC". I am having ABC.pld file in my system. I have included the file path in the pll file path in the Generator options tab.
    While generating the forms from designer i am getting the error "CDG-01373 ERROR: Module ABC: Unable to attach library ABC".
    My Questions are how to attach the ABC.pld file for this error. Thanks in advance
    Thanks,
    Ramesh.R

  • How to install knowledge base file for oracle text

    how to install knowledge base file for oracle text?
    there are couple of files droldUS.dat,.. which are required to generate gists and themes, where can i find them or install them.
    please help!

    I checked the download page and it says:
    "All Release 2 download pages contain Oracle Companion, Client, Clusterware, Gateways, and Application Express standalone downloads"
    so you should already have it. Try searching for the filename that was in your error message.

  • How to insert data from *.dmp file to  oracle 11g using Oracle SQL Develope

    hi
    i backup my database using PL/SQL developer and made *.dmp file
    how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
    and how to make *.dmp file from sql*plus ?
    thanks in advance

    Pl/Sql developer has a config window, there you choose the exec to do the import/export.
    Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
    Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use.

Maybe you are looking for

  • Frequent loss of connection to email server

    Every few days, although not following any obvious useage pattern, one of my email accounts stops being able to connect to the mail server. To fix this, I have to delete the account, and then recreate it. I've tried every other suggestion or fix desc

  • How can I ensure the content in iBooks on my iPad also syncs with my mini iPad?

    How can I ensure my content in iBooks on my iPad 3 syncs with the iBooks in my mini iPad?

  • E71 shows "Installing" when it's turned on

    Hi *, I have a problem, please help me because it's annoying When I turn on the phone, after the main screen appears, it always says "Installing..." and, after some seconds, the screen says "Unable to install because it's not secure blabla"... The pr

  • How to hide empty rows in Excel Template

    Hello, I have an Excel template that I am using to format some data. I created an XDO_GROUP on a particular section that sometimes has no data in it (see below). When the template is executed, the blank sections in the XML are creating blank rows in

  • Unified communication sip trunk problem after modifying topology

    hi all i have UC and its fine and sip trunk is ok the toplogy is as below UC------------------internet now im going to add ASA with UC with new topology UC-------------ASA-------------internet the pbx internally is ok   , but sip trunk is not working