Wrap off in sql

Hi,
I am running a sql to get the DDL of sequences, spooling it into a file but the lines are wraping, any suggestion how to make it in separate lines ? Also I would like to put a "/" between each DDL statement.
here is how the output looks like
CREATE SEQUENCE "MYUSER"."TS_TIMESHEET_ACCOUNTS_SEQ" MINVALUE 0 MAXVALUE
999999999999999999999999999 INCREMENT BY 1 START WITH 24495 NOCACHE NOORDER NO
CYCLE
CREATE SEQUENCE "MYUSER"."TS_TIMESHEET_ACTIVITY_SEQ" MINVALUE 0 MAXVALUE
999999999999999999999999999 INCREMENT BY 1 START WITH 251413 NOCACHE NOORDER N
OCYCLE
and here is the command
set head off
set pages 0
set long 9999999
set linesize 300
spool create_sequences.sql
SELECT TRIM(DBMS_METADATA.GET_DDL('SEQUENCE',A.OBJECT_NAME, A.OWNER)) "SEQUENCE_DDL" FROM ALL_OBJECTS A WHERE A.OBJECT_TYPE ='SEQUENCE' AND A.OWNER ='MYUSER' ORDER BY A.OBJECT_NAME
spool off
Thanks

>
I would like to put a "/" between each DDL statement.
>
Set the terminator flag on before the call
exec dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);See the DBMS_METADATA package in the PL/SQL Packages and Types doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_metada.htm
And 'SET LINESIZE n' in sql*Plus will set the line size to a large number to prevent wrapping.
http://docs.oracle.com/cd/E14072_01/server.112/e10823.pdf

Similar Messages

  • Set wrap off

    Hi Friends,
    When I run this
    SQL> SET WRAP OFF
    SQL>Select * from <table>;
    rows will be truncated
    rows will be truncated
    rows will be truncated
    then <ROWS>
    I am not able to understand what it is exactly doing here.
    If you have any thoughts regarding it please let me know.
    Thanks,
    Vishal

    Again, I'm not seeing the same behaviour that you are mentioning.
    Please post a cut-n-paste of the SQL*Plus session (like I do below) to show the problem (with complete steps).
    SQL> SET LINESIZE 900
    SQL> set wrap off
    SQL> select * from scott.emp ;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-0087       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-0087       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10
    14 rows selected.
    SQL>

  • Need way to Wrap my PL/SQL code

    Hi
    How can I Wrap my PL/SQL code ?
    The current Wrap.exe can be Hacked easily using this site http://hz.codecheck.ch/UnwrapIt/Unwrap.jsp.
    what is the best way to hide Wrap my PL/SQL code in DB.
    Thanx
    Rafeek Abd Elmonsef

    reemax wrote:
    please where can I download "plsql developer 10g version 2000 release 10.2.0.2"There's no point downloading a GUI to do it for you, all that does is call the Oracle WRAP functionality.
    There's only the one way to wrap PL/SQL code. Just because it can be unwrapped doesn't mean that everybody will have the ability to unwrap it. If you're really that concerned about people getting your source code then you shouldn't release it in any format. At the end of the day, if it's packages that are being supplied to a customer, wrap them and have appropriate copyright and reverse engineering agreements in place, then if your code gets stolen, you can take legal action.
    You can get some tools (I've seen them but never used them) that help to anonymise your code, by renaming all the variables etc. to nonsensical ones such as a,b,c,d etc. (just like some people's coding I've seen LOL!), so if you were to do that and then wrap the code, if anyone does unwrap it, it will be harder for them to understand what the code actually does.

  • SCCM 2012 - Install WSUS Off Box SQL

    Hi all,
    installed SCCM 2012 R2 CAS on a 2012 server. The SQL is off box on a server cluster. I've installed WSUS through the 'Add Roles and Features'. I configured it to have local storage for the content and a remote DB instance
    (called SQL1 on our cluster). All this worked well and the install completed as expected. I checked the SQL cluster and the "SUSDB" database was created ok.
    As a final step, i went to Tools in Server Manager and launched Windows Server Update Services. This brought up the 'Complete WSUS Installation' dialogue box. I entered the exact same DB info as i had done when completing
    the initial install of WSUS:
    Yet when i hit 'run' the following message returns:
    The relevant bit of logging is shown here:
    2015-01-14 16:58:42  Starting service W3SVC
    2015-01-14 16:58:42  Configuring IIS...
    2015-01-14 16:58:42  Start: ConfigureWebsite
    2015-01-14 16:58:42  System.Runtime.InteropServices.COMException (0x80070422): The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
    So i guess i have two question;
    1] is this Post-installation failure something i need to fix? (I presume it is)
    2] If i do need to fix this to get sccm running properly, does anyone have any suggestions as to where i should start?
    Thanks

    (for three forests which have no trust relationships).
    That's not a valid technical reason to have multiple primary sites at all. ConfigMgr does not care about, use, or rely on domain or forest boundaries or client membership in any way for client management. Using multiple primary sites and a CAS will
    significantly increase complexity and latency, will add additional points of failure, and will increase overall operational costs.
    Concur with Jason here. CAS not needed. You can add in untrusted forests to the Configmgr Console so log as you have an account with permissions in the destination forest, extend the schema, create the system management container and open up any firewall
    ports that are need for communication from site server to dc.
    Neil Peterson has a great set of blogs on how to achieve this
    http://blogs.technet.com/b/neilp/archive/2012/08/20/cross-forest-support-in-system-center-2012-configuration-manager-part-1.aspx
    and ports are listed in this TechNet article under site server -- > Domain Controller. Ensure your RPC ports match the OS of the DC.
    http://technet.microsoft.com/en-gb/library/hh427328.aspx
    Final agreement with Jason - push to get that SQL local. 
    Cheers
    Paul | sccmentor.wordpress.com

  • How to make word wrapping off in JTextPane...

    Hi,
    I m creating n RTF TextEditor using JTextPane....
    How can i make the wordwrapping off in JTextPane.
    It doesnt hav the property like
    setLineWrap(true);
    setWrapStyleWord(false); like Textarea...
    So how can i do that?
    Its Urgent..
    Regards,
    Danish

    Its Urgent..I searched the forum using "jtextpane wrapping" to find other postings on this topic. I find some suggestions from the first page of hits. So you could have found an answer 5 hours ago. I guess it isn't that urgent after all.

  • Wrapping the PL/SQL Code

    Can anybody pls advise on how to unwrap a wrapped SQL procedure?
    For example i wrap one procedure, and i get .plb object code for the SQL file. How can i revert back to the code, if i have only the .plb file?
    Thanking in Advance
    Rajeev

    Hi,
    Unwrapping cannot be done.
    Wrapping is like creating a exe file.
    Using the plb file u can not get the original procedure.
    There is no Unwrapping in Oracle.
    I think Oracle never provides Unwrapping procedure even in the future.
    Regards
    Kiran

  • Turn off the SQL DB monitoring entirely in scom 2012 (SP1)

    Is there a way to centrally target and turn down monitoring of all the servers running SQL DB in SCOM 2012. We actually created groups using the OU's to target the SQL servers but some of the servers which have SQL DB are not in that OU and they are still
    triggering DB alerts.
    Some of the alerts also include 
    Management Group: Ancestry Ops. Script: DiscoverSQL2012FileGroups.js : Cannot login to database [XXserver.domain.com][SQLD114B:model]
    and these servers are in the OU but still trigerring this DB alert.
    Any information about this ll be greatly useful.
    Thanks
    Hari V

    Pretty much what Hopeless guy said.  I have scom 2007 in prod, so I use remove-disabledmonitoringobject after I override a discovery.   The issue is that these SQL dbs are still being discovered.  So if you want to disable sql monitoring
    in total for them, override the seed discovery which will have a target of windows server/computer.  Then after the override is in palace execute the remove command from SCOM commandshell.  You then should scope to the class you want to disappear
    (discovered inventory pane), and refresh every 15 min or so to see if they are being removed.  I have had to run the remove command a few times to clean some large discovered inventory up.
    Regards, Blake Email: mengotto<at>hotmail.com Blog: http://discussitnow.wordpress.com/ If my response was helpful, please mark it as so, if it answered your question, then please also mark it accordingly. Thank you.

  • Using SQLCMD need to SET NOCOUNT OFF for Sql Server Parallel Data warehouse (PDW) V2

    Using SQLCMD to copy data to a flat file that is imported into Oracle using SQL Loader.
    At the bottom of the files created by SQLCMD there’s a blank row (ALL NULLs) and then there’s a row that shows the total number of rows, e.g., (12571 rows affected).
    SQL Loader allows us to remove headers (SKIP = 2), but it does not allow us to skip trailing records. Using the WHEN TABLE_ID != BLANKS command I can remove the blank row above the count marker, but SQLLDR still tries to load the count marker into the first
    column, which fails the import.
    When using SET NOCOUNT in the PDW I receive the error ‘NoCount is not a recognized option’.
    Any suggestions on how to get around this and remove the trailing count?

    Hi Waldropj,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

  • Should we be 'Obfuscating'/wrapping our PL/SQL code?

    Versions:10gR2, 11G, 11GR2
    We are a software development firm in Retail Domain. We have around 35 packages, 80 procedures and functions. Currently none of our PL/SQL source codes are hiddent('obfuscated'). Is this a professional approach?
    If the client faces an issue with our code and when they send us the exp dump file to reproduce this issue. We wouldn't even be able see let alone debug the code. Right? Are there any other disadvantages with Obfuscation?

    Jiri in SF wrote:
    I would really appreciate of Oracle would provide code to their own packages. For example UTL_MAIL has issues for some SMTP servers, why I cannot take source code, improve it the way I want and then use it (of course I would not expect oracle to provide support for changed code).UTL_MAIL is perhaps a bad example. The code can be unwrapped - and the resulting source does not look good. The API itself is designed poorly IMO.
    Instead of rewriting UTL_MAIL, I would rather see it redesigned. For example, the existing API for example does not allow you to view the Mime payload to send via the DATA command at all. This is essential for debugging purposes.
    What about wanting to create a valid e-mail (Mime) that you want to deliver via another protocol (e.g. IMAP)? The API should enable you to create that and then select to use the payload without necessarily transmitting it via SMTP.
    Despite my dislike for Microsoft the company, I've always found their API sets logical, sensible and easy to use. Unfortunately the same can often not be said from the supplied PL/SQL package interfaces from Oracle. :-(

  • How to 100% Protect PL/SQL Code By Wrapped in Oracle Database 10g R2

    Hello,
    Is Possible to 100% Protect PL/SQL Code By Wrapped in Oracle 10g R2 ?
    If it is not possible by wrap in oracle 10g R2,
    Please, let me suggest, how i will be able to 100% protect PL/SQL code in Oracle Database 10g R2.
    Because, I have lot of functions, procedures & package's in my project.
    Which is running in field filed.
    So, i have needed to protect 100%.
    Also, will i convert to al functions, procedures & package's to .pll file ?
    And .pll file to .plx file?
    Is it possible to convert .plx file to .pll file ?
    Please, let know any better solutions in this case....
    Regards
    Mehedi

    Hello,
    No, wrapping is not a 100% secure method. It could prevent your code from amateurs, but not from professional hackers. Look at the article http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/wrap.htm#BEHGBJAA
    It says: "•Wrapping is not a secure method for hiding passwords or table names.
    Wrapping a PL/SQL unit prevents most users from examining the source code, but might not stop all of them."
    Edited by: apiminov on 03.12.2012 3:23
    Edited by: apiminov on 03.12.2012 3:24

  • Oneway Wrapping  PL/SQL Programs

    Hello,
    I have wrapped my PL/SQL package successfully through wrap utility, but it can be easily unwrapped by some websites like 'http://www.codecrete.net/UnwrapIt' or unwrap mechanism.
    I need one way encryption for my program. Please suggest if there is any alternative.
    Thanks & Regards
    Pritish
    Edited by: 1004790 on Jun 6, 2013 6:11 AM

    No computer program in any language can be encrypted in a way that prevents someone that owns the server on which the code is running from reversing that encryption. The code, after all, has to be sent to the CPU to be executed. You can find sites that unwrap PL/SQL just like you can find tools that will generate C source code for the Oracle executable or the Java source for whatever JAR file you'd like to consider.
    The best you can do is to buy something like PFCLObfuscate that will obfuscate the code before calling the wrap utility (and calling the older version of the wrap utility which is a touch harder to unwrap and for which there are fewer online unwrapping tools). That requires money to buy the tool, though, and it will add complexity to your code management and deployment process since you have to maintain both a readable and an obfuscated version of the code and ensure that the right thing gets deployed and that no one inadvertently causes there to be differences between the two. And an attacker could still unwrap your code and still see exactly what it is doing, it would just be a bit harder to follow.
    Justin

  • SQL Report help needed

    Hi All,
    I am creating a report which is having 2 sql queries ,1 for the main columns that i need to show and 2 from total sum and count.
    Report is something as given below
    SET TAB OFF;
    set linesize 1500;
    set pagesize 50;
    SET FEEDBACK OFF;
    SET WRAP OFF
    COLUMN today NEW_VALUE VAR1 NOPRINT;
    TTITLE LEFT 'ABC Inc.' SKIP 1 -
    LEFT 'Daily Report' SKIP 1 -
    LEFT 'As Of ' VAR1 SKIP 2
    BTITLE LEFT SKIP 'Page No : ' FORMAT 9999999999 SQL.PNO SKIP 3;
    COL SR_NO HEADING 'Seq'               FORMAT 999999;
    COL REFNO HEADING 'Ref No'                FORMAT A20;
    COL ORIG_NAME HEADING ' Branch Name'      
         FORMAT A50;
    SELECT      ROWNUM                SR_NO,
         REF_NO                REFNO,
         ORIGIN_NAME               BRNAME
    FROM BANK
    WHERE PASS_CD=101
    SELECT      ' Failure Count : '|| NVL(COUNT(DECODE(CODE,1,CODE,NULL)),0) ||
         ' Failure Total Amt : '|| NVL(SUM(DECODE(CODE,799,AMT,NULL)),0)
         || CHR(10) ||     
         ' Successful Count : '|| NVL(COUNT(DECODE(CODE,000,CODE,NULL)),0) ||
    ' Successful Total Amt: '|| NVL(SUM(DECODE(CODE,000,AMT,NULL)),0)
    FROM BANK;
    CLEAR BREAKS;
    CLEAR COLUMN;
    TTITLE OFF;
    When i am running this second query output is going to secong page and title is repeated again and same as 1rst page is showing page no-1
    Kindly help me,i want the output on the same page at bottom.
    Thanks

    i think its only work in ISQL* PLUS enivironment iam
    not sure.It does work in SQL*Plus
    is that i can use in the package??http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12048.htm

  • Using Bind variables in SQL PLUS Report

    using Bind variables in SQL PLUS Report. This report gets the arguments from the application concurrent program. Now my need is to convert the start_date and end_date to bind Variables to improve the performance. I have commented the original code in 'prompt List of Unapproved Adjustments' and used my Bind Variable but it is giving an error
    error: Bind Variable "ENDING_DATE" not declared
    Report Date and Time:
    26-OCT-2010 15:44:13
    List of Unapproved Adjustments
    Bind Variable 'ENDING_DATE" not declared
    Please see below the code for the sql plus report:
    define p_org_id           = '&1'
    define p_fy_begin_date = '&2'
    define p_start_date = '&3'
    define p_end_date = '&4'
    define p_conversion = '&5'
    declare
    variable begin_date date;
    exec :begin_date := p_start_date;
    variable ending_date date;
    exec :ending_date := p_end_date;
    /* Begin
    :begin_date := to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS');
    :ending_date := to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS');
    End; */
    set newpage none
    set termout off
    set pagesize 55
    set linesize 180
    set heading on
    set feedback off
    set wrap off
    set space 1
    set heading on
    begin
    dbms_application_info.set_client_info('&p_org_id');
    end;
    prompt
    prompt Report Date and Time:
    prompt ----------------------
    select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS')
    from dual ;
    prompt
    prompt List of Unapproved Adjustments
    prompt -------------------------------
    select b.trx_number,
    a.adjustment_number,
    f.user_name created_by
    from apps.ar_adjustments a,
    apps.ra_customer_trx b,
    apps.fnd_user f
    where a.customer_trx_id = b.customer_trx_id
    and a.status <> 'A'
    and a.created_by = f.user_id
    and a.creation_date between :begin_date
    and :ending_date
    -- and a.creation_Date between to_date('&p_start_date','YYYY/MM/DD HH24:MI:SS')
    -- and to_date('&p_end_date','YYYY/MM/DD HH24:MI:SS')
    order by
    b.trx_number ;

    Hi
    Please go to customization part of the report and verify..You have set a default value out there ..And also verify your lov and look at the values ..If it is again giving you the problem ..pl delete the report and develop it again from the scratch it will be solved...
    vishnu
    null

  • Spool SQl data into text file using dynamic sql

    Hi,
    I am spooling output data into text file using command
    select 'select t.mxname,bo.lxtype,t.mxrev'||chr(10)||'from mx_1234567'||chr(10)||
    'where <condition>';
    here mxname varchar(128),lxtype(128),mxrev(128) all are of varchar type.I want the output in format
    e.g Part|1211121313|A
    but due to column width the output,I am getting is with spaces.
    "Part then blank spaces |1211121313 then blank spaces |A"
    how can I remove these spaces between columns.I used set space 0 but not working.
    Thanks in advance.
    Your help will be appreciated.

    Hi Frank,
    I have seen your reply for SET LINE SIZE function. But, I could not be able to understand it.
    I am facing similar kind of issue in my present project.
    I am trying spool more than 50 columns from a table into flat file. Because of more column lengths in few columns, i am getting space. There are so many columns with the same issue. I want to remove that space.so that, data can fit perfectly in one line in .txt file without any wrap text.
    Below is my sample query.sql. Please let me know the syntax. My mail id : [email protected]
    --Created : Sep 22,2008, Created By : Srinivasa Bojja
    --Export all Fulfillments
    --Scheduled daily after 1:00am and should complete before 3:30am
    WHENEVER SQLERROR EXIT SQL.SQLCODE
    SET LINESIZE 800
    SET WRAP OFF
    SET PAGESIZE 800
    SET FEEDBACK OFF
    SET HEADING ON
    SET ECHO OFF
    SET CONCAT OFF
    SET COLSEP '|'
    SET UNDERLINE OFF
    SPOOL C:\Fulfillment.txt;
    SELECT SRV.COMM_METHOD_CD AS Method,
    SRV.SR_NUM AS "Fulfillment Row_Id",
    CON.LAST_NAME AS "Filled By"
    SRV.SR_TITLE AS Notes,
    SRVXM.ATTRIB_04 AS "Form Description"
    FROM SIEBEL.S_SRV_REQ SRV,
    SIEBEL.S_SRV_REQ_XM SRVXM,
    SIEBEL.S_USER USR,
    SIEBEL.S_CONTACT CON
    WHERE SRV.ROW_ID = SRVXM.PAR_ROW_ID AND
    SRV.OWNER_EMP_ID = USR.ROW_ID AND
    CON.ROW_ID= SRV.CST_CON_ID;
    SPOOL OFF;
    EXIT;

  • HKONG: SQL*Plus를 이용하여 모든 level의 Profile정의를 찾는 방법

    PURPOSE
    SQL*Plus를 이용하여 모든 level의 Profile정의를 찾는 방법
    Explanation
    모듈에 대한 profile option을 일괄 수집하기 위한 방법으로
    SQL*Plus를 이용한 방법을 제공합니다.
    1. Execute the following script connected to SQl*Plus as APPS schema user.
    2. Enter part of the profile name you see on the applications window.
    Example:
    Profile name: Printer, enter "rint"
    Profile name: Sequential Numbering, enter "umberi".
    set wrap off
    set verify off
    set pagesize 100
    col profile format a30
    col v_profile format a30
    col scope format a11
    col value_scope format a20
    col level_value noprint
    undefine profile
    spool profiles
    select p.user_profile_option_name profile
    , '1 - Site' Scope
    , 'Site' Value_scope
    , v.level_value
    , v.profile_option_value v_profile
    from fnd_profile_option_values v
    , fnd_profile_options_vl p
    where v.profile_option_id = p.profile_option_id
    and (v.level_id = 10001)
    and p.user_profile_option_name like '%&&profile%'
    Union
    select p.user_profile_option_name
    , '2 - Appli.'
    , a.application_short_name
    , v.level_value
    , v.profile_option_value
    from fnd_profile_option_values v
    , fnd_profile_options_vl p
    , fnd_application a
    where v.profile_option_id = p.profile_option_id
    and (v.level_id = 10002 and a.application_id = v.level_value)
    and p.user_profile_option_name like '%&&profile%'
    Union
    select p.user_profile_option_name
    , '3 - Respon.'
    , r.responsibility_name
    , v.level_value
    , v.profile_option_value
    from fnd_profile_option_values v
    , fnd_profile_options_vl p
    , fnd_responsibility_vl r
    where v.profile_option_id = p.profile_option_id
    and (v.level_id = 10003 and r.responsibility_id = v.level_value)
    and p.user_profile_option_name like '%&&profile%'
    Union
    select p.user_profile_option_name
    , '3 - User'
    , u.user_name
    , v.level_value
    , v.profile_option_value
    from fnd_profile_option_values v
    , fnd_profile_options_vl p
    , fnd_user u
    where v.profile_option_id = p.profile_option_id
    and (v.level_id = 10004 and u.user_id = v.level_value)
    and p.user_profile_option_name like '%&&profile%'
    order by 1,2,3
    spool off
    Reference Documents
    -------------------

Maybe you are looking for

  • How to get mackeeper off my mac?

    How to get mackeeper off my mac?

  • Word 2008 crashes when trying to save as PDF

    Ever since upgrading to 10.6, I've been unable to save Word 2008 documents as pdf files from the print dialog. As soon as select "Save as PDF" from the PDF pull down, Word crashes. This doesn't happen in Excel or Powerpoint. What's interesting is tha

  • Auto populate Infopath 2013 fields after selecting a specific dropdown option.

    Auto populate Infopath 2013 fields after selecting a specific dropdown option. Hi. I have a Sharepoint 2013 list with three fields. Code, Section and Sub Section. I would like to be able to have the form autopopulate the Section and Sub Section field

  • How do I start Applet Window Maximized in 6i

    Hi All, I am running forms 6i and am wanting to know how to start the applet with a maximized window. I know you can set the HEIGHT, WIDTH parameters but maximized window is what I am after. Many Thanks

  • Regarding Intracompany STO

    Hi Gurus, Here my question is if we can transfer goods from one plant to another plant with in the same company (intracompany) by using movement types. Then why sometimes we are using STO process for intra company.And could you please explain me the