Spooling of a query generates different file lengths on different databases

Please help me regarding a problem with spooling. I spooled a query output to a file from two different database. In both the databases the table structure is the same and the output produced only one row. But the file size is different for the databases. How can this problem occur? Is there any database parameter need to be checked? Both the databases are in same version 10.2.0.1.0.
before running the spool i did a
sql> set head off feedback off echo off verify off linesize 10000 pages 0 trims on colsep ' '
on both the sessions.
In one database the filesize is *1463 bytes* and on the other the filesize is *4205 bytes*.
Please help me to find out these discrepancies.

No the data in the columns are exectly the same. But in the larger file i see more spaces between columns where as in the smaller one the no of spaces are less. Can anyone tell me is there any parameter which defines the character which will be replaced while spoolng when you get a column blank/null. But as i have already declared /t as a colsep i couldnot identify why there is the difference in the no of spaces between columns resulting the difference in filesizes?

Similar Messages

  • Btrfs with different file systems for different mount points?

    Hey,
    I finally bought a SSD, and I want to format it to f2fs (and fat to boot on UEFI) and install Arch on it, and in my old HDD I intend to have /home and /var and  try btrfs on them, but I saw in Arch wiki that btrfs "Cannot use different file systems for different mount points.", it means I cannot have a / in f2fs and a /home in btrfs? What can I do? Better use XFS, ZFS or ext4 (I want the faster one)?
    Thanks in advance and sorry my english.

    pedrofleck wrote:Gosh, what was I thinking, thank you! (I still have a doubt: is btrfs the best option?)
    Just a few weeks ago many of us were worrying about massive data loss due to a bug introduced in kernel 3.17 that caused corruption when using snapshots. Because btrfs is under heavy developement, this sort of thing can be expected. That said, I have my entire system running with btrfs. I have 4 volumes, two raid1, a raid0 and a jbod. I also run rsync to an ext4 partition and ntfs. Furthermore I make offline backups as well.
    If you use btrfs make sure you have backups and make sure you are ready to use them. Also, make sure you check sum your backups. rsync has the option to use checksums in place of access times to determine what to sync.

  • Spooling of a query generates different file sizes for different databases

    Please help me regarding a problem with spooling. I spooled a query output to a file from two different database. In both the databases the table structure is the same and the output produced only one row. But the file size is different for the databases. How can this problem occur? Is there any database parameter need to be checked? Both the databases are in same version 10.2.0.1.0.
    before running the spool i did a
    sql> set head off feedback off echo off verify off linesize 10000 pages 0 trims on colsep ' '
    on both the sessions.
    In one database the filesize is *1463 bytes* and on the other the filesize is *4205 bytes*.
    Please help me to find out these discrepancies.

    hi Mario,
    I think you are not getting my point. Both the files contain the same output but their sizes are different. This is due to the no of blank spaces between columns. I wanted to clarify why there is a difference between two filesize when the query output is the same.

  • Generate XML file from an Oracle Database Table

    Hello All,
    I want to generate a xml file from an Oracle Database table which contains a blob column.
    Can somebody give pointers on this please.
    Thanks in advance
    Sulakshana

    Use the DBMS_XMLGEN package.

  • Two different file icons in different folders for my php files??

    Hi,
    I try to move a copy of my running website to my localhost. (MAMP+MacBook Pro)
    I have problems getting to my local domain. Therefore I tried to install a clean Prestashop installation to see if that worked, which seems to work neatly.
    Comparing the two website files, I noticed something strange (for me, anyway):
    In the working prestashop root folder, my PHP files have a nice, black icon associated with them
    In the non accessible prestashop root folder, my PHP files have a boring white filesheet like icon.
    I re-associated ALL the PHP files with a text editor, but still the difference remains...
    What's the cause of this?? Does this have to do with permissions or so, causing my problems with entering this local shop ??
    Thanks,
    Pascal

    You can use Exportant's "Fast Cache" feature to save time when exporting the same file with different settings (a free plugin I wrote).
    It's an export filter which saves a rendered copy of the file being exported in a cache, if not there already (or develop settings / metadata have changed), and pulls it from the cache when present (so Lr won't have to re-render), so it takes 1/2 the amount of time to export 2 copies, 1/3 the amount of time to export 3 copies etc.
    Unfortunately, it's not compatible with all export/publish services, e.g. Export Manager & Turning Gate Publisher.
    It *is* however compatible with a lot of them, like:
    Adobe's Hard Drive export or publish service.
    My TreeSyncPublisher (export or publish).
    Jeffrey Friedl's Folder or Collection publishing service (publish only).
    If you're interested in saving your time but not your computer's, then just use Export Manager (without export filters), or a publish service (well, one publish service for each format..) - Lr will re-render, but it's one click to go..
    robcole.com - Exportant
    Another option for speedy exporting of jpegs is PreviewExporter, which exports from the Lr lib preview cache - not appropriate for obtaining printable tiffs.
    Rob

  • Different Battery Length in Different Locations?

    I recently got a new battery for my MacBook Pro and it has been lasting around 2:30 hours.  When I went home to my parents house for the holidays, I notced my battery was lasting 3:30 or more instead the entire time I was there!  Is there any explanation for this?  I didn't change any settings and now that I'm back home, my battery ife has returned to 2:30.  Obviously, I'd love that extra hour back if possible!

    ComputerFixer wrote:
    From what i understand,  there is a check period (every hour) that time capsle will search through your HDD for files that are not backed up.   I think it is supposed to stop while the laptop is in battery mode, but there is always the possibility that it is checking anyway, which would contribute to some battery drain.
    Time Machine has an option called "Back up while on battery power." I have that option turned off.
    I don't think Time Capsule is a significant contributor to this. The check is simply a quick poll over the network. The network traffic and energy use for this check is probably a lot less than whatever power the CPU and radio consume checking email and loading up whole web pages.
    The wifi signal strength may be a factor, but on the whole it's hard to say what's really causing the difference without inventorying the specific settings and applications in use and the CPU loads of the applications.

  • How to collect to different files into one message

    Hi,
    I have the following scenario:
    Two (5Mb) Files with different file structures each ->
    XI (transform and generate a single structure record) ->
    Insert a record in a DB for each new record generated
    Let suppose file1 has order headers - one order per line -and file2 has the corresponding order items - one item per line, e.g;
    File 1
    OrderNr  Description
    1        A
    2        B
    3        C
    File 2
    OrderNr   ItemNr   MaterialCode ....
    1         1        111
    1         2        222
    1         3        555
    2         1        888
    2         2        777
    3         1        111
    Imagine I want to insert a record in the database for
    each order/item like this
    OrderNr  ItemNr Description MaterialCode .....
    1        1      A           111
    1        2      A           222
    1        3      A           555
    My real scenario is a little more complicated but never mind for now.
    I need to collect the two different files with two different file structures into the same message. Although I have read about the subject I am not sure about how to do it using BPM because there isn't any field I could use to correlate file1 with file2 - I can only correlate a record of file1 with several records of file2. I simply know that the two files will be available in a specific directory once a day at 06:00AM.
    First question is:
    How can I collect the two messages originating each from a different file into only one message with two different subtypes one for each file structure?
    Because my background is ABAP I could do it with a workaround for temporarily storing the info from each file into database tables in XI and then correlate the info from the two files to generate a single message.
    Like this
    File1 -> XI -> INSERT DATA XI ZDB1 (via ABAP Proxy or RFC)
    File2 -> XI -> INSERT DATA XI ZDB2 (via ABAP Proxy or RFC)
    Them I could use an event to check when the two tables have all the data from both files. I could then combine the data from the two tables and start another integration process like this
    XI SERVER (ABAP Proxy) -> XI Integration Server -> Third-party (JDBC)
    But this way I would have to code the hole data conversion which is not a good idea from the perspective of XI (EAI/Broker).
    Maybe I sould use BPM. But how?
    Futhermore:
    Is BPM performant enough (we are talking about files with thousand of records)?
    Thanks in advance
    Diz

    Hi,
    for N:1 Multimapping you have to use BPM.
    After going through this weblog you will be quite familiar with how to collect 2 messages into one message.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Steps:
    1. Create a abstract/ inbound / outbound interfaces. (in your case 3 /1/2).
    2. Perform 2:1 Multimapping.
    You can specify more than one message in either side.
    Just go to message tab in MM.
    3. Now follow the blog and you will get a output in the form of abstract interface.
    4. Define JDBC reciever Channel as usual.
    Your database will be updated.
    Just try this out.
    Regards
    Piyush

  • How to insert data coming from 2 different file adapters in to one DB adapt

    Hi
    i want insert data in to database containing two diffferent tables, so i imported tables in to DB adapter by creating relation ships.But, data for two tables are in xml format & two are in different locations.So, i used 2 file adapters to get data from 2 different & i used BPEL(Define service later) Service. now in bpel i used receive activity to receive one file adapter data ( i checked create instance in receive) then used transform activiy for tranformation & finally invoke activity to invoke DB adapteer........similarly i repeated sequetially to 2 file adapter, by keeping 2nd receive(no need to check create instance) next to invoke.*Problem is after deployment finished only data coming from 1st receive is inserting to the table...& 2 nd receive not working it showing as Pending & showing as Asynchronus Call back inte console*
    I configured all the adapters perfectly..........Can any one can help me how to Commit 2 nd receive to insert data in the 2nd table
    Regards,
    jay

    Thank u both for ur replay.........
    I am doing this in 11g there is no problem regarding transform activity.
    My requirement is
    two different files from two different folders in a drive & we can't use one file adapter bcoz both have different columns(only few are common columns) so we use two different xsd's .So, i am using two file adapters to insert in database having two different tables with respect to two different files data coming from two file adapters. i am using one DB adapter to insert bcoz both tables are in same database with relationships & i used BPEL(define service later) .
    NOW PLEASE SUGGEST ME THE FLOW IN BPEL TO INSERT BOTH FILES IN THERE RESPECTIVE TABLES IN DATABASE.
    The flow i did 1st file adater--->receive--->transform---->invoke----->DB adapter.....Then again repeating this as keeping 2nd receive below 1st invoke
    2nd file adapter-------->2nd receive---->2nd invoke------>same DB adapter
    MY problem is only data coming from 1st process is inserting & 2nd one is not working as i discussed earlier........I USED READ FILE OPTION, UNCHECKED DELETE FILES OPTION & SET DIFFERENT POLLING FREQUENCY FOR BOTH FILE ADAPTERS.
    I tried to set correlation but it is not working & later tried i kept non-blocking invoke as TRUE in DB adapter also didn't work...........also i tried this transaction property in bpel component _<property name="bpel.config.transaction"_
    many="false" type="xs:string">required / requiresNew</property>...............BUT NO CHANGE...........
    Regards,
    jay
    Edited by: 910162 on Apr 5, 2012 12:38 AM

  • ORA-04030 while generating HTML files

    While generating HTML files out of the database, combining XML type and structured data, and storing these files in XDB filesysteem. I get the following error.
    ORA-04030: out of process memory when trying to allocate 2048 bytes (cursor work he,kghsseg : kokeismo)
    Does anybody have an clue about the cause. We are using a 9i database, with patch 9.2.0.6. not yet installed, running on Solaris. it looks like the generator stops every time after the same content item.

    Hi,
    This is because of fragmentation of shared pool. If this is other than production database, you can flush the shared pool by "alter system flush shared pool;".
    For production database, it is not advisable to flush the shared pool as it contains parsed sql statements. You can increase the shared_pool_reserved_size. Normally it's 10% of shared_pool_size. If you are using Oracle 8i, you can set shared_pool_min_alloc parameter so that for memory higher than this value only, the reserved size will be used. This parameter is deprecated in 9i. For temporary purpose, you can execute dbms_shared_pool.aborted_request_threshold(val_in_bytes) to release space from shared_pool.
    Thanx.

  • Best way to spool DYNAMIC SQL query to file from PL/SQL

    Best way to spool DYNAMIC SQL query to file from PL/SQL [Package], not SqlPlus
    I'm looking for suggestions on how to create an output file (fixed width and comma delimited) from a SELECT that is dynamically built. Basically, I've got some tables that are used to define the SELECT and to describe the output format. For instance, one table has the SELECT while another is used to defined the column "formats" (e.g., Column Order, Justification, FormatMask, Default value, min length, ...). The user has an app that they can use to customize the output...which leaving the gathering of the data untouched. I'm trying to keep this formatting and/or default logic out of the actual query. This lead me into a problem.
    Example query :
    SELECT CONTRACT_ID,PV_ID,START_DATE
    FROM CONTRACT
    WHERE CONTRACT_ID = <<value>>Customization Table:
    CONTRACT_ID : 2,Numeric,Right
    PV_ID : 1,Numeric,Mask(0000)
    START_DATE : 3,Date,Mask(mm/dd/yyyy)The first value is the kicker (ColumnOrder) as well as the fact that the number of columns is dynamic. Technically, if I could use SqlPlus...then I could just use SPOOL. However, I'm not.
    So basically, I'm trying to build a generic routine that can take a SQL string execute the SELECT and map the output using data from another table to a file.
    Any suggestions?
    Thanks,
    Jason

    You could build the select statement within PL/SQL and open it using a cursor variable. You could write it to a file using the package 'UTL_FILE'. If you want to display the output using SQL*Plus, you could have an out parameter as a ref cursor.

  • Where can I find a macro I can use in Project Properties to generate PDB files of different filenames each build?

    Found a better solution. The answer is given at the very bottom of this post.
    I'm looking for $(Random), %(Date), %(Time), or some %(Value) that I can put in the "Generate Program Database File" entry.
    Like "$(TargetDir)_%(CreateTime).pdb".
    But the problem is, %(CreateTime), %(ModifiedTime), and %(AccessTime) has colons in them, making them useless when putting them into the filenames.
    What other ways can I generate PDB files of different file names? Or, how do you modify %(CreateTime) so that I can remove the colons and just obtain the numeric values?

    Hi Tom_mail78101,
    It seems that there is no built-in macro for renaming the PDB files randomly.
    You could submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio
    The Visual Studio product team is listening to user voice there. You can send your ideas/suggestions there and people can vote.
    I agree with Viorel. The possible way to rename the PDB files is that you write your own script to rename the PDB file after building the project and put the script to Post-Build event in Build Event. As for whether this way can accomplish it, you can try
    to consult on: MSBuild
    forum like this thread: https://social.msdn.microsoft.com/Forums/vstudio/en-US/bcf39fd6-0e0c-4486-9438-7a724ded44de/postbuild-event-command?forum=msbuild
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • In RoboHelp 11 Responsive HTML5, is it possible to have 2 different language outputs in one generated output file?

    In RoboHelp 11 Responsive HTML5, is it possible to have 2 different language outputs in one generated output file, similar to WebHelp where the use can select the language from a drop-down list? In Webhelp output you could create multiple Content categories. Is there something similar with the responsive output, or am I forced to have a completely separate set of output files for each language (for example, English, Japanese, Chinese, Korean, and Arabic)?

    As Rick, mentions, there's no default way.
    Having said that, there's nothing stopping you from doing it yourself. You can add a kind of language selector to the layout and set that for every html5 output. With some JavaScript, you can have the user switch between your outputs. It would look like content categories, but you'll have build it yourself.

  • How can we generate PDF file by passing a query from package to RDF?

    Hi Everyone,
    I am beginner as SQL Developer, I am stuck in one issue , that is regarding generating PDF or Excel file according to user parameters passed.
    Detail of Requirement :
    I have created one package it contains 2 functions and 1 Procedure .
    Also created xx_report.rdf for generating in PDF .
    getQuery Function Returns Query as output.
    getExcelFile function gets query as input and generate  and return CLOB file as OUTPUT.
    xx_Report  Procedure will take input CLOB file and export it to EXCEL file and save under a DEFAULT Location.
    When User Pass Excel as parameter we can generate the file , but now if User Passes the Parameter for PDF FILE then  client wants  to invoke RDF  passing same query(getQuery) to xx_Report.RDF and generate PDF from it .
    We have already Created the RDF for xx_Report
    How it is possible? to invoke RDF from PL SQL Package.
    (We are doing like this as in future if there are any changes in query we dont have to change in RDF or in Package )
    If not then please let me know the other way where i can get the PDF or EXCEL file as output according to users choice from RDF.
    ( We are not using XML PUBLISHER nor 3rd party tools)
    Only Oracle Reports Developer 11g 1.2.3.
    Please help me in this ....its urgent.
    Thanks and Regards,
    Harshil .

    Hello Narendra,
    (Specific to SAP POS General Merchandise)
    A  Tlog is binary file created by selling items via SAP POS. The file must be converted into ASCII by the use of a utility called cvtlog.exe or trickled to other systems. Once the tlog is converted to ASCII it contains all the information required to feed downstream systems such as ERP, POS DMu2026.etc.
    Hope that helps
    Angelo
    For detailed information on SAP POS dataflow and TLOG Formats  please see this link
    http://help.sap.com/saphelp_pos21/helpdata/en/be/5234a9eb44494ea0807925211e74c6/frameset.htm
    or navigate to Help.sap.com  and follow the below links
    Documentation -> SAP for Industries -> SAP for Retail

  • File length different for a copied file. Or use checksum

    Hi
    I am making a backup of a file before doing some writes to the original.
    I first check it out of source control, then make a copy using:
    public static void backupFile(File f)
    try{
    File backup = new File(f.getPath()+"_BACKUP");
    if (!backup.exists()) {
    if (!backup.createNewFile()) {
    Logger.getLogger().log("Could not create "+backup.getPath());
    SystemTools.copyFile(f,backup);
    } catch (Exception e)
    Logger.getLogger().log("Error backing up "+f.getPath()+ ": "+e);
    public static synchronized void copyFile(File from, File to) throws Exception
    if (!from.exists() || !from.isFile())
    throw new Exception ("copyFile Error: checking 'from' file!");
    if (!to.exists())
    if(!to.createNewFile())
    throw new Exception ("copyFile Error: creating 'to' file!");
    FileInputStream in=new FileInputStream(from);
    FileOutputStream out=new FileOutputStream(to);
    int length;
    byte[] buffer=new byte[256];
    while((length=in.read(buffer))!=-1) {       
    out.write(buffer, 0, length);
    in.close();
    out.close();
    After writing has finished, I need to see if the file is different to the backup..
    If so, I need to check it into source control.
    I wanted to use a checksum, but couldn't find an example that actually worked!!! Therefore I did a quick tool:
    public static boolean isBackupIdenticalToOrig(File f) throws Exception {
    File bu = new File(f.getPath()+"_BACKUP");
    Logger.getLogger().log("Lengths: New/Backup"+f.length()+"/"+bu.length());
    if (bu.length()!=f.length())
    return false;
    // Have the same lengths, so we can compare!!
    BufferedInputStream f_in = null;
    BufferedInputStream bu_in= null;
    f_in =new BufferedInputStream (new FileInputStream (f));
    bu_in =new BufferedInputStream (new FileInputStream (bu));
    for (int i=0;i<f.length();i++)
    int c = f_in.read();
    int d = bu_in.read();
    if (c!=d)
    Logger.getLogger().log(""+f.getName()+" has been modified");
    return false;
    Logger.getLogger().log(""+f.getName()+" has not been modified");
    return true;
    The problem is in that the File.length() method is returning different values for the backup file, than for the original, even if identical!
    For example:
    10/15/2002 10:22:05: Lengths: New/Backup413/402
    10/15/2002 10:22:06: Lengths: New/Backup397/386
    10/15/2002 10:22:07: Lengths: New/Backup191/185
    All the new files are longer that the backup, but the contents are exactly the same! Is there some WIN32 'extras' in the file that's causing a problem here???
    In each of the cases, if I open the new(Longer) file in a good editor, I can see that the lengths are correct. But no extra characters existed in the new file compared to the backup!!
    Any ideas would be most appreciated
    Cheers
    Chris

    10 and 13 are CR(carriage return) and LF(linefeed) - this is normal for a Windows file. Use this copy routine; it works.
       // copyFile -  input: inFile -  path to source file
       //                    outFile - path to copy file to (including filename)
       //                    bRemoveSource - true removes the source files, false leaves them intact
       //             returns: void
       public static void copyFile(String inFile, String outFile,boolean bRemoveSource) throws IOException
          FileInputStream fin     = null;
          FileOutputStream fout   = null;
          boolean bCanWrite       = false;
          boolean bDeleted        = false;
          // To preserve date/time stamp
          File fTimeIn = new File(inFile);
          File fTimeOut = new File(outFile);
          long lTimeIn = fTimeIn.lastModified();
          try
            fin  = new FileInputStream(inFile);
            fout = new FileOutputStream(outFile);
            copyStream(fin, fout);
          finally
            try
              if (fin != null) fin.close();
            catch (IOException e) {}
            try
              if (fout != null) fout.close();
            catch (IOException e) {}
          fin.close();
          fout.close();
          // Set out time to in time
          fTimeOut.setLastModified(lTimeIn);
          if (bRemoveSource == true)
             bCanWrite = fTimeIn.canWrite();
             if (bCanWrite)  {
                bDeleted = fTimeIn.delete();
       // copyStream (a helper function for copyFile) -  input: in  - file stream of source file
       //                                                       out - file stream of destination file
       //                                                returns: void
       // *** NOTE: This function is thread safe ***
       public static void copyStream(InputStream in, OutputStream out)  throws IOException
          // do not allow other threads to read from the
          // input or write to the output while copying is
          // taking place
          synchronized (in)  {
             synchronized (out)  {
                byte[] buffer = new byte[256];
                while (true)  {
                   int bytesRead = in.read(buffer);
                   if (bytesRead == -1)
                      break;
                   out.write(buffer, 0, bytesRead);
       }

  • Generating "arraytofile" files in different locations

    Hello everyone,
    I am confronting a real problem here. I am using ArrayToFile to generate certain files. What I want to do is to every time I run the system to get these files in different locations, say in different folders. Another option I have is to get different version of this files, for example, filename: light.dat, light_2.dat, light_3.dat... etc. Any help will be appreciated.
    Best,
    LM

    Oh, instead of using the file name in the first argument (File Name), use the absolute path.  This argument takes relative or absolute paths.
    if you give it output.dat, then in the current working directory, it saves it.  If you pass it "C:\output.dat" it saves it there.
    With string manipulation, you combine paths and filenames.  
    FYI:
    GetDir() and SetDir() are functions that get and set the current working directory. (In Utility Library > Directory utilities)  But I don't recommend changing teh working directory without setting it back to it when done.

Maybe you are looking for

  • Saving in Acrobat 9 and Opening file in Acrobat 8... text wrap does not work

    I work with a client who has Acrobat 8, I use Acrobat 9. I am saving a pdf that has form fields that need to wrap text and scroll. They have the properties of "multi-line" and "scroll text" already checked, and when I test it on my computer, the text

  • Resizing photos for drop zones

    When I drop a photo into a drop zone in iDVD '08 it stays huge and only a small part of the photo can be seen. I have resized to 768x576 as the HELP suggested but it made no difference. No matter how small I made the photo, it got blown up to a large

  • CLAD Exam

    In about 24 hours I'm going to take the CLAD exam for NI certification. I had talked casually to our NI rep about this on the phone last week and was told I'd breeze through it with my experience. I guess, with that in mind I did not put any prep tim

  • How to hide the mail message size

    Suddenly, when writing a new email message I have a new field that appeared - Message Size. I have not found a way to hide this. Can it be hidden? Can the signature field be hidden too? Thanks

  • I screwed something up. what package is mount in?

    I have lost the mount and umount binaries, so archlinux is fuked coz it cant mount on startup or umount on shutdown... I can chroot in and use pacman I guess, but what package contians mount and umount? I guess I lost them after doing a pacman -Syu t