Exit script of CLOB is truncated

Hello

at the end of the day, I want to wrap the content of clob to a table in a file.

Winding itself works but even without queue when I run e. g. my_clob select from table where id = 4711 as a script (F5), I get only 3 lines of output. The same queue on.

Is there any setting that change this behavior? Or any other workaround? The output of a column varchar2 (4000) works fine, but I have more then 4000 great content.

Thanks, Jürgen

Hi Jürgen,

Sorry for the late reply. I just posted this link without checking how it would work. In fact you can find the following acceptable:

--Note this is a FUNCTION now, not a PROCEDURE.
create or replace
function printClob( p_clob in clob ) return varchar2
as
     l_offset number default 1;
begin
   loop
     exit when l_offset > dbms_lob.getlength(p_clob);
     dbms_output.put_line( dbms_lob.substr( p_clob, 255, l_offset ) );
     l_offset := l_offset + 255;
   end loop;
   return null;
end;

Then, in your worksheet, try something like this:

set serveroutput on 100000
spool mycloboutput.log
select filename, printclob(my_clob) from table where id = 1
spool off

Not perfect, but good for the client side.

-Gary

Tags: Database

Similar Questions

  • [3.2.09] output truncated dbms_metadata

    Hello

    Sorry for my bad English.

    Today I tried to use the dbms_metata package extract the list of privileges of the object for a user

    As usual, I run the following command in sql develop:

    long value 1000000000
    exec dbms_metadata.set_transform_param (dbms_metadata. SESSION_TRANSFORM 'SQLTERMINATOR', TRUE);
    Select dbms_metadata.get_granted_ddl ('OBJECT_GRANT', 'USER_TITI') of double;

    but when I click on 'run script', the result is truncated.
    I have the first line 60, with the latter truncated (missing comma)
    (I check with sqlplus, with the same exact command, I have correctly to have 186 lines).

    Another user has the same problem?

    Published by: 955770 on August 29, 2012 07:03

    >
    Today I tried to use the dbms_metata package extract the list of privileges of the object for a user
    >
    The result is of type CLOB data and there is a limit to how many characters that appear. You experience the same problem that others have when returning from CLOB data.

    See this other recent thread for possible solutions
    Re: Output of script CLOB is truncated

  • Scripts for data cleansing Perf

    Hello

    We currently use BB 4.4 with the new features enabled PERF. Someone at - it scripts for cleaning or truncate the Perf Data collected? 4.5 is supposed to have the function programmed in. We run the BB server on unix.

    Perf Data under the $BBHOME / bbvar / perf

    The files are in plain text with lines like this:

    Here is a not so elegant way to truncate your files in perl. You will need to set the time as a unix timestamp.

    #Purge $BBPERF
    @files = "grep - Rl. $BBPERF / *';"

    $file (@files) {} foreach
    chomp ($file);
    Print "$file\n";
    @data ='cat $file | AWK ' {if (\$4 > = $startTime) {print \$0}} ";
    If (!) () open (FILE, "> $file"))) {print "cannot open $file: $!"} \n » ; print LOGFILE "cannot open $file: $! \n » ; next ;}
    foreach $line (@data) {print FILE $line ;}
    Close the FILE;
    }

  • Can someone tell me if the accounts with PHD Mobile finally works?

    I'm still running OS X 10.8.5 with server because this is the last version I know where going Mobile with mobile Directory works (more or less, it's far from perfect). I want to spend all my machines (client now run OS X 10.10), but is not the job of synchronizing portable home for mobile accounts directory is keep me 10.8.5 server.

    Does anyone know if this works with the latest upgrades? I can finally spend?

    They work very well for me with 10.11.1. I control the behavior detailed synchronization with the Profile Manager; the first time you use a client you need to login (to get the profile) then logout and login again (how the doctorate is created). With users to switch between common clients, I felt it necessary to use connection entry/exit scripts to restart the DCs and kill the ridiculous number of user processes that continue to run after the disconnection. They are machines "not work" so I have not tested things like iTunes widely.

    C.

  • GraphSheetShow does not have the page of the report in the foreground

    Hello

    I have a script that works in Diadem 10.1 but not in 10.2.

    The following exits script 5 jpg in 10.1 but resumed the first page to 10.2.

    I can score 5 JPGs properly but it copies just the first page in the 4 other jpg.

    What adjustments are needed between the versions.

    Call GraphSheetInfos() ' puts the number of leaves in GraphSheetCount
    Dim intsheetNo

    IntSheetNo = 1 to GraphSheetCount
    Call GraphSheetNGet (intSheetNo) ' is the name of the worksheet GraphSheetName
    Call GraphSheetShow (GraphSheetName) ' shows the sheet in the DIAdem REPORT
    If intsheetNo = 1 then
    If filex (filepath & T3 & "_" "& GraphSheetName &".) PNG') then

    Call MsgBoxDisp ("Overwrite data existing?", "MB_YESNOCANCEL", "MsgTypeWarning", MsgNotModal)

    If msgstate = "IDNo" then
    Call the PathNameGet ("select a new output directory", filepath)
    FilePath = dlgoutputpath
    on the other
    end if

    If msgstate = "IDCancel" then
    MsgBox "program output".
    Calling Cancel()
    on the other
    end if

    On the other
    End If
    On the other
    End if
    Call PICEXPORT (filepath & T3 & "_" "& GraphSheetName &".) ("BMP", "BMP", 1,768,1024, 'RGB 24', 100, "NoCompression", 0) '...

    Next

    Thank you

    Stagsden

    Fixed with 10.2.1

    Thank you

    Stagsden

  • Tips on improving the performance

    Hello

    I have a table that contains data for the last 5 min, maximum (500 lines), this table is in NOLOGGING mode.

    I have another process that get these data every 5 minutes and then remove each row in this table.

    As my table is in NOLOGGING mode I was questioning myself if this better to TRUNCATE the table or DELETE all ranks.

    I did a trace to see the result, but I'm not sure of the conclusion:

    truncate table

    call the query of disc elapsed to cpu count current lines

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Parse        1      0.00       0.00          0          0          0           0

    Run 1 0.00 1.40 12 3 238 0

    Fetch        0      0.00       0.00          0          0          0           0

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Total 2 0.01 1.40 12 3 238 0

    Chess in the library during parsing cache: 1

    Optimizer mode: ALL_ROWS

    The analysis of the user id: SYS

    Elapsed time are waiting on the following events:

    Event waited on times max wait for the Total WHEREAS

    ----------------------------------------   Waited  ----------  ------------

    DB file sequential read 12 0.00 0.00

    ENQ: RO - fast object reuse 3 0.26 0.42

    local writing wait 7 0.50 0.24

    reliable message 1 0.00 0.00

    Journal of synchronization of file 1 0.04 0.04

    SQL * Net message to client 1 0.00 0.00

    SQL * Net client message 1 0.00 0.00

    delete

    call the query of disc elapsed to cpu count current lines

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Parse        1      0.00       0.00          0          0          0           0

    Run 1 0.00 129 263 566 134 0.12

    Fetch        0      0.00       0.00          0          0          0           0

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Total 2 0.00 0.12 129 263 566 134

    Chess in the library during parsing cache: 1

    Optimizer mode: ALL_ROWS

    The analysis of the user id: SYS

    Caught plan statistics number: 1

    Ranks (1) operation of line Source lines (avg) lines (max)

    ---------- ---------- ----------  ---------------------------------------------------

    0 0 0 ASH_DATA DELETE (cr = 263 pr = 129 pw = time 0 = 125014 en)

    134 134 134 TABLE ACCESS FULL ASH_DATA (cr = 263 pr = 129 pw = time 0 = 2738 US cost = 37243 size = card 6420 = 321)

    Elapsed time are waiting on the following events:

    Event waited on times max wait for the Total WHEREAS

    ----------------------------------------   Waited  ----------  ------------

    db file scattered read 17 0.11 0.11

    SQL * Net message to client 1 0.00 0.00

    SQL * Net client message 1 0.00 0.00

    Thank you

    Cyrille

    @rp0428 I have no control over this, if you have a suggestion, I'm very open minded

    , Thanks for the STORAGEclause of RE-USE, I'll have a look.

    The button Delete and truncate made with about 130 lines each, at the exit, it seems that the truncation is longer but consumes less resources.

    Ask yourself that question 'control transaction' is a more important than potential problem on.

    I followed the basic rule is: if it ain't broke, don't fix it.

    You have not posted ANY reason to believe that you still have a problem.

    Until you really have a problem to choose a solution and move.

    As it has already menntioned AND TRONQUER LOADING/RELOADING operations

    1. is evolutionary movement

    2 are performing travel as the amount of data increases

    3. use fewer resources (undo, redo, memory) as the amount of data increases

    The above is particularly true for the use case that can benefit from the RE-USE of STORAGE clause such as batch jobs which tend to use about the same amount of tablespace.

  • New-VM hangs over the background task

    I am writing a script to automate some vm deployment and am having some problems with a background task.  If I run the code below, the new - vm command hangs and does not always complete the task.  I have to manually kill the jobs to get them to stop.  The next set of code below which is exactly the same thing, but not in a separate post and it works fine.  I am running the script on a windows 7, Powershell 3.0, esx server 5.1, 5.5 powercli. Any ideas? I have attached two scripts below as well. Any help would be appreciated.

    ########################################################

    #********************Add Snapin*************************

    #Import module PowerCLI

    Add-PSSnapin VMware.VimAutomation.Core

    #Update the title bar

    $host.ui.rawui.WindowTitle = "PowerShell [PowerCLI loaded Module] '"

    ########################################################

    #Declare high-level Script Varibles

    $vcserver

    $userName

    $SecurePassword

    $connectionUp = 0

    $Credentials

    While (0, $connectionUp - eq)

    {

    Variable #Set for Vcenter connection

    $vcserver = Read-Host "Vcenter Server you want to connect to?

    $userName = Read-Host "enter user name".

    $SecurePassword = Read-Host-Prompt "enter password" - AsSecureString

    $Credentials = new-Object System.Management.Automation.PSCredential '

    -ArgumentList $UserName, $SecurePassword

    $connectionUp = 0

    try {}

    # Set all errors to be a stop action

    $ErrorActionPreference = "stop".

    #Connect to the vCenterServer

    SE connect-VIServer-Server $vcserver - Credential $Credentials

    $connectionUp ++

    }

    catch {}

    #Connection failed

    "Unable to connect".

    $connectionUp = 0

    }

    #Set that all default return errors

    $ErrorActionPreference = "continue".

    }

    ########################################################

    ########################################################

    #*** Menu variables *.

    #Title and Message

    $title = "deploy the virtual machine.

    $message = "select Action".

    #Creates menu options (new options should be added in the table down below)

    $UsVm = new-Object System.Management.Automation.Host.ChoiceDescription '& US' "

    "Creates US VM."

    $Eu = new - Object System.Management.Automation.Host.ChoiceDescription '& Europe' "

    "Creates the VM Europe."

    "$exit = New-Object System.Management.Automation.Host.ChoiceDescription" & quit ","

    "Exits Script."

    #Creates the table of options

    $options = [System.Management.Automation.Host.ChoiceDescription []] ($UsVm, $Eu, $exit)

    ###########################################################

    Variable Loop #End

    $running = 0

    #Loops the Menu up to what the exit option is chosen

    While ($running - eq 0) {}

    #Creates the Menu object

    $menu = $host.ui.PromptForChoice ($title, $message, $options, 0)

    switch ($menu)

    {

    {0}

    Machine virtual #Deploy U.S.

    # Include variables for the virtual machine.

    $vmName = Read-Host "what is the name of the virtual machine?

    Start-Job - ScriptBlock {}

    SE connect-VIServer-Server $args [2] - Credential $args [1]

    $cluster = get-Cluster-name "VDI Workstations - VCA Sandy Bridge - (HA, DRS)"

    $template = get-Template-name "ViewWin7Template".

    $custSpecifacation = get-OSCustomizationSpec-name 'Standard of Windows 7 desktop.

    $dataStoreCluster = get-DatastoreCluster-name of 'VDI SAN Production'

    $location = get-file-name 'Mobile computers to office (MD).

    $DeployVmName = $args [0]

    $DeployedVmName = $DeployVmName

    New-VM-name $DeployedVmName - location $location - model $template - ResourcePool Datastore - $dataStoreCluster - OSCustomizationSpec $custSpecifacation $cluster - slim DiskStorageFormat

    Start-Sleep - s 60

    Start-VM $DeployedVmName

    } - InitializationScript {Add-PSSnapin VMware.VimAutomation.Core} - ArgumentList $vmName, $Credentials, $vcserver

    }

    1 {"you selected KAY."}

    2 {$running = 1}

    }

    }

    Here's the script according to which works very well

    #Import module PowerCLI

    Add-PSSnapin VMware.VimAutomation.Core

    #Update the title bar

    $host.ui.rawui.WindowTitle = "PowerShell [PowerCLI loaded Module] '"

    #Declare high-level Script Varibles

    $vcserver

    $userName

    $SecurePassword

    $connectionUp = 0

    $Credentials

    While (0, $connectionUp - eq)

    {

    Variable #Set for Vcenter connection

    $vcserver = Read-Host "Vcenter Server you want to connect to?

    $userName = Read-Host "enter user name".

    $SecurePassword = Read-Host-Prompt "enter password" - AsSecureString

    $Credentials = new-Object System.Management.Automation.PSCredential '

    -ArgumentList $UserName, $SecurePassword

    $connectionUp = 0

    try {}

    # Set all errors to be a stop action

    $ErrorActionPreference = "stop".

    #Connect to the vCenterServer

    SE connect-VIServer-Server $vcserver - Credential $Credentials

    $connectionUp ++

    }

    catch {}

    #Connection failed

    "Unable to connect".

    $connectionUp = 0

    }

    #Set that all default return errors

    $ErrorActionPreference = "continue".

    }

    $vmName = Read-Host "what is the name of the virtual machine?

    $cluster = get-Cluster-name "VDI Workstations - VCA Sandy Bridge - (HA, DRS)"

    $template = get-Template-name "ViewWin7Template".

    $custSpecifacation = get-OSCustomizationSpec-name 'Standard of Windows 7 desktop.

    $dataStoreCluster = get-DatastoreCluster-name of 'VDI SAN Production'

    $location = get-file-name 'Mobile computers to office (MD).

    $DeployedVmName = $vmName

    New-VM-name $DeployedVmName - location $location - model $template - ResourcePool Datastore - $dataStoreCluster - OSCustomizationSpec $custSpecifacation $cluster - slim DiskStorageFormat

    Start-Sleep - s 60

    Start-VM $DeployedVmName

    Have you ever tried adding the line Add-PSSnapin the scriptblock in the 2nd script.

    Another problem could be that the script sends messages of 'warning', and these may cause crashes in tasks in the background as well.

    Try to set $WarningPreference = "SilentlyContinue".

  • End of week date calculates dates in table questions

    Hello all,.

    I'm working on a document of LiveCycle Designer ES4 with a week ending the Date MM-DD-YYYY (which must always be a Saturday) selected in a subform.

    I need this end Date to then calculate and display the selected week Saturday and the previous days in a subform with a table. Day wish to view in separate columns in the header.

    sample.png

    That's what I have so far:

      TopmostSubform.Page1.Requestor.WeekEndDate::exit - (FormCalc, client)
     
    var endDate = Date2Num($,"MM-DD-YYYY")
    var dayOfWeek = Num2Date(endDate, "E")
     
    if (dayOfWeek <> 7) then
       xfa.host.messageBox("Ending date must be a Saturday")
       $ = null
       xfa.host.setFocus("$")
    endif
     
    Page1.#subform[1].InputTable.Row1[0].Date7 = Num2Date(endDate - 0, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date6 = Num2Date(endDate - 1, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date5 = Num2Date(endDate - 2, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date4 = Num2Date(endDate - 3, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date3 = Num2Date(endDate - 4, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date2 = Num2Date(endDate - 5, "DD")
    Page1.#subform[1].InputTable.Row1[0].Date1 = Num2Date(endDate - 6, "DD")
    

    However I get an error on the WeekEndDate when selecting a Saturday.

    Someone has an idea what I am doing wrong?

    Thanks for any help!

    -Michelle

    Well, I never got an answer on the forum here, but to help others - here's what I did:

    All this was done FormCalc.

    The Date/time of WeekEndDate field object has a set model date {MM/DD/YYYY} in the field object model in LiveCycle.

    BUT, the script required the pattern to be YYYY-MM-DD

    Why? I have no idea of reversal. Another way will not work for me.

    This article also requires a Date Saturday to choose. Days of the week are identified by numbers (Sunday = 1, Monday = 2, etc.).

    The line <> 7 means that if the day is Saturday (7), then the error message "end date must be a Saturday" is displayed.

    It's the Exit Script event:

    TopmostSubform.Page1.Requestor. WeekEndDate:output- (FormCalc, client)
    var endDate = Date2Num ("$,"YYYY-MM-DD"")
    var dayOfWeek = Num2Date (endDate, "E")

    If (dayOfWeek <> 7) then
    xfa.host.messageBox ("end date must be a Saturday")
    $ = null
    xfa.host.setFocus("$")
    endif

    The different elements of the Date are set to a Date/time field without cause defined in the configuration of the field object in LiveCycle.

    Coding below means the form MM/DD .

    Each field has it's own script, with any less calculation -#

    This is the calculation for the Sunday cell script:

    . TopmostSubform.Page1 #subform [1]. InputTable.Row1 [0]. Date1: calculate - (FormCalc, client)
    dateNum var = date2num(TopmostSubform.Page1.Requestor.WeekEndDate.formattedValue,"MM/DD/YYYY") -6
    $.rawValue = num2date (dateNum,"MM/DD" ")

    And the cell Saturday, needed to display the Date of end of Saturday has the following Script, with NO less number:

    . TopmostSubform.Page1 #subform [1]. InputTable.Row1 [0]. Date7: calculate - (FormCalc, client)

    dateNum var = date2num(TopmostSubform.Page1.Requestor.WeekEndDate.formattedValue,"MM/DD/YYYY")

    $.rawValue = num2date (dateNum,"MM/DD" ")

    Why was it here?

    Because this entire project was gawd-awful, and I hope that these ideas can help another designer of forms of struggle to understand the FormCalc scripting used.

    M

  • dbms_scheduler for regular users?

    I'm just an average user in our Department, I have not rights Admin I have some SQL that executes the first thing Monday morning and I was wondering if I could program that use a *.sql file? who has all the sql I usually run as a script?

    I'm on 11 G R2 and use SQL Developer and noticed that in version 3.2.1 there is a feature of the Assistant Scheduler?

    Basically, I would drop 6 table instructions. and then, I would create my 6 tables in the proper order nailed in the .sql file?

    I read some documents and various howto and the wiki, but that's the part that I'm not sure if I can do it too?

    Once the task is created and demand, which appears at the server end or my developer SQL always does it run?

    Thank you!

    There is haw in at least two ways to do it.
    1 / run your script using SQL sql * more line of command. Use cron under Unix/Linux or task schedule (at) on Windows to schedulre run time.
    Sample:
    a.SQL
    -connect to the instance
    connect user/password@alias
    -work
    Select * from v$ instance;
    -exit script
    output

    Cmdline
    sqlplus/nolog @a.sql

    2 / create a job directly in DB. When you use ORACLE Scheduler you can create executable type jobs. This type of work is able to run a shell script so that you can script sql user of example 1.
    Or create the stored procedure to do the same thing as a sql script and perform this procedure in the job.

  • through the IF statement setAttribute

    Hello

    I'm doing a form, which selects the recipients based on what value a textfield a (dropdown value)-> textfield

    Sounds really simple, hm?

    But I have huge problems. The program is not like me at all the .

    //END OF DROPDOWN
     <event activity="change">
       <script contentType="application/x-javascript">
       if (
        xfa.event.newText == "Service1" || 
                  xfa.event.newText == "Service 2" || 
                 xfa.event.newText == "Service 3" || 
                  xfa.event.newText == "Service 4" || 
    
       {
      responsible.rawValue = "Person1"
       }
       else
       {
       responsible.rawValue = "Person2"
       }
       </script>
       </event>
    

    ---

    <field h="15.0001mm" name="Supervisior" w="97.3mm" x="0.0024mm" y="215.5mm">  
    <event activity="exit">
     <script contentType="application/x-javascript">
    

    Problem solved. I used the event class and resolveNode preSubmit.

    Here is my code, if anyone cares:

    
         
         
          
  • CF extra addition &lt; html &gt;, &lt; head &gt; and the &lt; body &gt; tags pages

    I had problems with my titles not appearing is not on my pages of CF. Finally, I looked at the source of the page in the browser and found that CF is the extra insertion < html >, < head > and < body > tags at the beginning of the pages. (see examples below). I'm sure it's the CF engine that did this because I took a cfm page and just change the extension of html and everything worked fine (except the CF code). There is no additional tag inserted and the titles appear. I also noticed that the CF engine seems to be adding the first line <! DOCTYPE HTML... >

    Does anyone know why this might be happening?

    Thank you

    David

    SEE Page - notice of the additional tags in red

    <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / BY" > ".


    <html >

    <head >

    <title >without title < /title >

    < /head >


    <body >



    < /body >

    < /html >

    <html>

    <head>


    "
    <style type="text/css"> ".

    <!--


    BODY
    {
    make-weight: normal;
    do-size: 10pt;
    do-family: Arial;
    background-color: white;
    text-decoration: none
    }


    Same page with the extension changed to html - code is a little different because the style sheet has not loaded because it uses a cfinclude

    <html>

    <head >


    "
    <cfinclude template="fdp_style_sheet.html"> ".


    "
    <meta http-equiv="Content-Type" content="text/html; charset = iso-8859-1"> " "

    <title >connection < /title >


    "<script type="text/javascript"> ".

    If ($_SERVER ["HTTPS"]! = "on")
    {
    header ("Location: https://".) $_SERVER ['HTTP_HOST']. ($_SERVER ["REQUEST_URI"]);
    Exit();
    }
    < /script >


    "<script language="JavaScript" src="webbug.js">< /script > " "

    < /head>


    "" <body onload= "writeBug();" marginHeight= "0" ' marginWidth do= '0' > ' "

    Take a look at your file Application.cfm or Application.cfc, you have probably the code in there (Application.cfc/cfm works first on each page request)

  • change the current selection to a subset of the current selection

    Hello

    I wonder how can I change/modify a current selection and then have 2 images selected for the new selection. I have the full path of these 2 images (but I do not have their UUID).

    Background:

    From a selection provided images of the film (not a set of collection), a plug-in retrieves full-paths-file names in a list for external treatment (works fine).

    Error handling: by mistake, the user can include images which should NOT be dealt with in the previous step. The first occurrence of differring from image by selected error which should not be treated is captured by a simple comparison with the previous image. The two full path names of files are extracted and displayed in an error message. Then plugin stops further processing of selected images, Lightroom is back to where he started, the choice of the film remains unchanged.

    Objective:

    What I want is that when process prevents the selection changes the 2 images that have been identified as different.

    In fact different occurrences are captured by the labels and ratings only.

    if varFLabel ~= varFLabel_comp then
    

    and

    elseif varFRating ~= varFRating_comp then
    

    Here's the code I'm working on that:

    LrTasks.startAsyncTask( function()
    local photos = catalog:getTargetPhotos()
    ...
    for j, photo in ipairs(photos) do
              varFLabel = photo:getFormattedMetadata('label')                    --word eg. approved
              varFRating = photo:getFormattedMetadata('rating')                    --number
              if lrItem > 1 then                    -- second pass of 'for ... do'
                        --catch missmatching Labels in selection by user
                        if varFLabel ~= varFLabel_comp then
                                  LrDialogs.message(string.format("Labels missmatch!\n %q Not equal to %q", varFileName_comp, varFileName, "DIFF Labels", "info"), "Labels do NOT match!\nDouble-check your selection!\nStopping task and script!")
    --new selection to show the two differing images in: varFileName_comp varFileName
                                  return          --exit script
                        --catch missmatching Ratings in selection by user
                        elseif varFRating ~= varFRating_comp then
                                  LrDialogs.message(string.format("Ratings missmatch!\n %q Not equal to %q", varFRating_comp, varFRating, "DIFF Ratings", "info"), "Ratings do NOT match!\nDouble-check your selection!\nStopping task and script!")
    --new selection to show the two differing images in: varFileName_comp varFileName
                                  return          --exit script
                        end
              end
              --prepare for next comparison in 'for ... do' 
              varFileName_comp = varFileName
              varFLabel_comp = varFLabel
              varFRating_comp = varFRating
    end
    end)
    
    

    Tried to make use of the setSelectedPhotos function but I don't get any internal processing error results only and do not know how to proceed.

    I suppose that this function requires that the LrPhotoID derived from the selected Photos (table) table.

    photos = catalog:setSelectedPhotos( varFileName, varFileName_comp )
    

    Edit: This command selects a different images

    return catalog:setSelectedPhotos( photo, {} ) --exit script
    
    

    I hope someone can help.

    Post edited by: snahphoto

    If you hold a second through the iteration variable, photo_comp, which is the value of 'photo' of the previous iteration in the loop, so you could do:

    back catalogue: setSelectedPhotos (varPhoto, {, photo_comp})

  • Value US7ASCII AL32UTF8 database character change

    Our database is running on the Oracle 10.1.0.4.0 database (AIX) the following are its parameters:


    SQL > select value from NLS_DATABASE_PARAMETERS where parameter = "NLS_CHARACTERSET";

    VALUE
    ----------------------------------------
    US7ASCII


    We would like to change the value AL32UTF8 database character. After completing the Metalink notes: 260192.1 (who helped us solve data "With" and "Truncated", is the final result of the CSSCAN utility):

    [Scanning summary]
    All data type characters in the data dictionary can be convertible to the new character set
    All data of character type is convertible to the new character set

    [Summary of the Data Conversion dictionary]
    The data dictionary can be migrated safely using the CSALTER script

    We have no truncation and with (0) entry on the .txt file. We have Changeless and Convertible. Now accdg to the documentation, we can do a FULL EXP and FULL IMP. But it does not detail how to do the conversion on the same database. The discussion on the document explains how do from one database to another database. But what about on the same database?

    We cannot use CSALTER as indicated on the document.
    (Step 6
    Step 12
    12.c) when you use Csalter/Alter database to AL32UTF8 and there was NO data "Truncation", only "Convertible" and "Changeless" in the csscan in point 4 :)

    After you COMPLETE the database export, how can we change its character set? What must we do the existing database to change its character value AL32UTF8 until we import back our in the same dump file database?

    Help, please.

    You cannot use CSALTER indeed you have given application convertible. Only the application data does not change are supported by the script.

    We do not support the conversion in place of the version of database you have except via Oracle Consulting services. Please upgrade to one of the versions of database supported by the DMU (http://www.oracle.com/technetwork/database/globalization/dmu/overview/index.html) utility and ask the DB fix required for the enhanced version and platform supported by the Oracle. I think there is already a patch for 10.2.0.5 on AIX 64-bit POWER but this is to be confirmed.

    Without the CDS, you can do a selective export of only convertible tables, truncate table, use CSALTER and re - import.

    -Sergiusz

  • Situation OMBIMPORT?

    When you're in the OWB Design Center, you can drill down through your project, in a module and right-click on the view. If you click import..., you are taken to the metadata import wizard. If I select only the viewand then press Next, I show a list of views that I can import. I select one and click Next again, click Finish. The view is now available for use in the Design Center (to build maps, etc.).

    I need to automate this process and have worked with the OMB more as a solution to automate other things within OWB. My first inclination was to try the OMBIMPORT command, but the documentation is frankly a bit cryptic for me on this particular thing. (And I have automated successfully creating Mapping).

    Did anyone done this before? Am I barking the wrong tree with OMB over?

    Thank you
    -Kenneth

    Another chance...

    #FILE: loadviews.tcl
    
    package require java
    
    ##################################################################################
    #
    # Basic Connection Details
    #
    ##################################################################################
    
    # OWB Repository Connection
    set OWB_DEG_USER    username
    set OWB_DEG_PASS    password
    set OWB_DEG_HOST    myserver
    set OWB_DEG_PORT    1555
    set OWB_DEG_SRVC    orcl
    set OWB_DEG_REPOS   owb_mgr
    
    set SPOOLFILE "c:/omb/logfile.txt"
    
    ##################################################################################
    #
    # Procedures from our standard OWB library
    #
    ##################################################################################
    
    ##################################################################################
    # Default logging function.
    #  Accepts inputs: LOGMSG - a text string to output
    #                  FORCELOG - if "1" then output regardless of VERBOSE_LOG setting
    ##################################################################################
    proc log_msg { LOGTYPE LOGMSG } {
       global SPOOLFILE
    
       set fout [open "$SPOOLFILE" a+]
       puts $fout "$LOGTYPE:-> $LOGMSG"
       puts "$LOGTYPE:-> $LOGMSG"
       close $fout
    }
    
    ##################################################################################
    # Default rollbabk and exit with error code function.
    ##################################################################################
    proc exit_failure { msg } {
    
       log_msg ERROR "$msg"
       log_msg ERROR "Rolling Back....."
    
       exec_omb OMBROLLBACK
    
       log_msg ERROR "Exiting....."
    
       # return and also bail from calling function
       return -code 2
    }
    
    ##################################################################################
    # Generic wrapper for OMB+ calls
    ##################################################################################
    proc exec_omb { args } {
    
       # log_msg OMBCMD "$args"
    
       # the point of this is simply to return errorMsg or return string, whichever is applicable,
       # to simplify error checking using omb_error{}
    
       if [catch { set retstr [eval $args] } errmsg] {
          log_msg OMB_ERROR "$errmsg"
          log_msg "" ""
          return $errmsg
       } else {
       #   log_msg OMB_SUCCESS "$retstr"
       #   log_msg "" ""
          return $retstr
       }
    
    }
    
    ##################################################################################
    # Generic test for errors returned from OMB+ calls
    ##################################################################################
    proc omb_error { retstr } {
       # OMB, Oracle, or java errors may have caused a failure.
       if [string match OMB0* $retstr] {
          return 1
       } elseif [string match ORA-* $retstr] {
          return 1
       } elseif [string match java.* $retstr] {
          return 1
       } else {
          return 0
       }
    }
    
    ##################################################################################
    #
    # Procedures from our standard OWB/SQL library
    #
    ##################################################################################
    
    proc oracleConnect { serverName databaseName portNumber username password } {
    
       # import required classes
       java::import java.sql.Connection
       java::import java.sql.DriverManager
       java::import java.sql.ResultSet
       java::import java.sql.SQLWarning
       java::import java.sql.Statement
       java::import java.sql.CallableStatement
       java::import java.sql.ResultSetMetaData
       java::import java.sql.DatabaseMetaData
       java::import java.sql.Types
       java::import oracle.jdbc.OracleDatabaseMetaData
    
       # load database driver .
       java::call Class forName oracle.jdbc.OracleDriver 
    
       # set the connection url.
       append url jdbc:oracle:thin
       append url :
       append url $username
       append url /
       append url $password
       append url "@"
       append url $serverName
       append url :
       append url $portNumber
       append url :
       append url $databaseName
    
       set oraConnection [ java::call DriverManager getConnection $url ]
       set oraDatabaseMetaData [ $oraConnection getMetaData ]
       set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
    
       puts "Connected to: $url"
       puts "$oraDatabaseVersion"
    
       return $oraConnection
    }
    
    proc oracleDisconnect { oraConnect } {
      $oraConnect close
    }
    
    proc oracleQuery { oraConnect oraQuery } {
    
       set oraStatement [ $oraConnect createStatement ]
       set oraResults [ $oraStatement executeQuery $oraQuery ]
    
       return $oraResults
    }
    
    ##################################################################################
    #
    #                MAIN SCRIPT BODY
    #
    ##################################################################################
    
    proc load_view { viewname modulename} {
    
        exec_omb  OMBCREATE TRANSIENT IMPORT_ACTION_PLAN 'IMPORT_VIEW' ADD ACTION 'IMPORT_ACTION' SET REF SOURCE VIEW '$viewname' SET REF TARGET ORACLE_MODULE '$modulename'
        exec_omb  OMBIMPORT FROM METADATA_LOCATION FOR IMPORT_ACTION_PLAN 'IMPORT_VIEW'
        exec_omb  OMBDROP IMPORT_ACTION_PLAN 'IMPORT_VIEW'
    }    
    
    ##################################################################################
    #  Connect to repos
    ##################################################################################
    log_msg LOG "Connecting to Repository"    
    
    set print [exec_omb OMBCONNECT $OWB_DEG_USER/$OWB_DEG_PASS@$OWB_DEG_HOST:$OWB_DEG_PORT:$OWB_DEG_SRVC USE REPOSITORY '$OWB_DEG_REPOS']
    
    if [omb_error $print] {
        if [string match  OMB01041* $print] {
            log_msg LOG "Already connected ....."
        } else {
            log_msg ERROR "Unable to connect to repository."
            log_msg ERROR "Exiting Script.............."
            return
        }
    } else {
        log_msg LOG "Connected to Repository"
    }
    
    ##################################################################################
    # Connect to project
    ##################################################################################
    
    puts -nonewline "Which project do you want to import to? "
    set CHK_PROJECT_NAME [gets stdin]
    
    set print [exec_omb OMBCC '$CHK_PROJECT_NAME']
    
    if [omb_error $print] {
    
       log_msg LOG "Project $CHK_PROJECT_NAME does not exist. No Import Required...."
       exec_omb OMBDISCONNECT
       return
    
    } else {
       log_msg LOG "Verified project $CHK_PROJECT_NAME exists"
    }    
    
    puts -nonewline "Which module do you want to import to? "
    set ORA_MODULE_NAME [gets stdin]
    
    set print [exec_omb OMBCC '$ORA_MODULE_NAME']
    
    if [omb_error $print] {
    
       log_msg LOG "Module $ORA_MODULE_NAME does not exist. No Import Required...."
       exec_omb OMBDISCONNECT
       return
    
    } else {
       log_msg LOG "Verified module $ORA_MODULE_NAME exists"
    }    
    
    exec_omb OMBCC '..'
    
    set CURRENT_DEPLOYED_LOCATION [exec_omb OMBRETRIEVE ORACLE_MODULE '$ORA_MODULE_NAME' GET REFERENCE LOCATION]
    if [omb_error $print] {
       log_msg LOG "Unable to retrieve location to match top . Exiting...."
       exec_omb OMBDISCONNECT
       return
    
    } else {
       log_msg LOG "Retrieved location $CURRENT_DEPLOYED_LOCATION"
    }    
    
     set CHK_SCHEMA   [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (SCHEMA)]
     set CHK_HOST     [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (HOST)]
     set CHK_PORT     [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (PORT)]
     set CHK_SERVICE  [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (SERVICE)]
    
     set CHK_PASSWORD   [OMBRETRIEVE LOCATION '$CURRENT_DEPLOYED_LOCATION' GET PROPERTIES (PASSWORD)]
     if [string match "{}" $CHK_PASSWORD] {
        #Password not stored in repository
        log_msg LOG " "
        puts -nonewline "Require password for schema $CHK_SCHEMA? "
        set CHK_PASSWORD [gets stdin]
     }   
    
    ##################################################################################
    # Validate to Control Center
    ##################################################################################
    log_msg LOG "Connecting to Control Center "
    set print [exec_omb OMBCONNECT CONTROL_CENTER USE '$CHK_PASSWORD' ]
    if [omb_error $print] {
        exec_omb OMBROLLBACK
        log_msg ERROR "Unable to connect to Control Center "
        log_msg ERROR "$print"
        exit_failure "Exiting Script.............."
    }
    exec_omb OMBCOMMIT
    
    log_msg LOG "Checking existing MetaData."
    set print [exec_omb OMBALTER LOCATION '$CURRENT_DEPLOYED_LOCATION' SET PROPERTIES (PASSWORD) VALUES ('$CHK_PASSWORD')]
    exec_omb OMBCOMMIT
    
    exec_omb OMBCC '$ORA_MODULE_NAME'
    
    log_msg LOG "Making SQL*Plus Connection...." 
    
    set oracle_view_lst {}
    
    log_msg LOG "Getting views defined in database...."
    log_msg LOG " " 
    
    set oraConn [oracleConnect $CHK_HOST $CHK_SERVICE $CHK_PORT $CHK_SCHEMA $CHK_PASSWORD ]
    set sqlStr "select object_name from all_objects where owner = '$CHK_SCHEMA' and  object_type = 'VIEW'"
    set oraRs [oracleQuery $oraConn $sqlStr]
    while {[$oraRs next]} {
         set vwName [$oraRs getString object_name]
         lappend oracle_view_lst $vwName
    }
    $oraRs close
    $oraConn close
    
    foreach viewname $oracle_view_lst {
         log_msg LOG "Checking view $viewname ....  "
    
         #see if view already in OWB. An OMBRETRIEVE will error out if it doesn't exist.
         set owb_column_lst [ exec_omb OMBRETRIEVE VIEW '$viewname' GET COLUMNS ]
    
         if [omb_error $owb_column_lst] {
              log_msg LOG "Need to import view $viewname "
              exec_omb OMBCC '..'
              load_view $viewname $ORA_MODULE_NAME
              exec_omb OMBCC '$ORA_MODULE_NAME'
         } else {
              log_msg LOG "View $viewname  already in OWB"
         } 
    
    }
    
    log_msg LOG " "
    log_msg LOG "Done Views. Exiting..."
    log_msg LOG " " 
    
    exec_omb OMBDISCONNECT
    
  • get the table script using dbms_metadata.get_ddl but with clob field

    Thus, Oracle 11g R2...
    I use dbms_metadata.get_ddl for table scripts and it works fine...

    now, I have a table with clob field, and it does not work... I got an error "missing a closing parenthesis (ora-0907) '...
    I could paste a script I had, but I don't think that it makes no sense...

    does anyone have an experience on the use of this package on clob tables?


    TNX

    See this code.

    DECLARE
      myddl clob;
      PROCEDURE print_clob(p_clob in clob) as
        l_offset number default 1;
      BEGIN
        loop
          exit when l_offset > dbms_lob.getlength(p_clob);
          dbms_output.put_line(dbms_lob.substr(p_clob, 255, l_offset));
          l_offset := l_offset + 255;
        end loop;
      END print_clob;
      FUNCTION get_metadata return clob is
        h   number;
        th  number;
        doc clob;
      BEGIN
        h := dbms_metadata.open('TABLE');
        dbms_metadata.set_filter(h, 'SCHEMA', 'HR');
        dbms_metadata.set_filter(h, 'NAME', 'EMPLOYEES');
        th := dbms_metadata.add_transform(h, 'MODIFY');
        th := dbms_metadata.add_transform(h, 'DDL');
        --dbms_metadata.set_transform_param(th,'SEGMENT_ATTRIBUTES',false);
        doc := dbms_metadata.fetch_clob(h);
        dbms_metadata.CLOSE(h);
        return doc;
      END get_metadata;
    BEGIN
      myddl := get_metadata;
      print_clob(myddl);
    END;
    

    This procedure of print_ddl I took of the documentation.
    Use of the long VALUE. See, in the first example out put is truncated.

    SQL> SELECT dbms_metadata.get_ddl('TABLE','EMP','SCOTT') FROM dual;
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
    
    SQL> set long 10000
    SQL> /
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    
    SQL> SET LINESIZE 132
    SQL> SET pagesize 0
    SQL> SET LONG 1000000
    SQL> /
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    
    SQL>
    

Maybe you are looking for

  • How are they managing storage Flash on my Macbook Pro?

    Hello, I have storage problems with my macbook pro, simply because I miss. I went through and eliminated a lot of my videos and photos because that's mainly what I use this for, but my storage is full. How to clear up the flash storage?

  • Satellite A215 - turn trouble

    I have a Satellite A215. I have a hard time to start after hitting the power button. Must be done several times. Someone once told me to take out the battery, wait about 15 seconds, put it in and try it. It works sometimes, but it need a solution to

  • 2D U16 vs 1 d Wfm in Nchnl Nsamp

    Hello I tried to do a multiple channel with PCI 6229 Council 2090 BNC data acquisition work. After you have created the virtual channel and start the DAQ task when I acquire the signal, I get a strange behavior. I give a square input signal of 1 volt

  • Cannot send an email to the address hotmail on windows live using my earthlink account

    Been using windows live for more than a year. Suddenly last week cannot send to hotmail addresses using my earthlink account. It's all along, suddenly fails. Why?

  • 5.1 Windows search fails to find files

    I keep the images in folders by year like 2008.  Looking for a 2008 find nothing.  This folder is located on the backup drives: F: and G:, H:, but Windows Search does not find it.  Nor it is images in the folder.  That is what it is?  How can I force