Search Results

Search found 1530 results on 62 pages for 'killer pl'.

Page 3/62 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Write, Read and Update Oracle CLOBs with PL/SQL

    - by robertphyatt
    Fun with CLOBS! If you are using Oracle, if you have to deal with text that is over 4000 bytes, you will probably find yourself dealing with CLOBs, which can go up to 4GB. They are pretty tricky, and it took me a long time to figure out these lessons learned. I hope they will help some down-trodden developer out there somehow. Here is my original code, which worked great on my Oracle Express Edition: (for all examples, the first one writes a new CLOB, the next one Updates an existing CLOB and the final one reads a CLOB back) CREATE OR REPLACE PROCEDURE PRC_WR_CLOB (        p_document      IN VARCHAR2,        p_id            OUT NUMBER) IS      lob_loc CLOB; BEGIN    INSERT INTO TBL_CLOBHOLDERDDOC (CLOBHOLDERDDOC)        VALUES (empty_CLOB())        RETURNING CLOBHOLDERDDOC, CLOBHOLDERDDOCID INTO lob_loc, p_id;    DBMS_LOB.WRITE(lob_loc, LENGTH(UTL_RAW.CAST_TO_RAW(p_document)), 1, UTL_RAW.CAST_TO_RAW(p_document)); END; / CREATE OR REPLACE PROCEDURE PRC_UD_CLOB (        p_document      IN VARCHAR2,        p_id            IN NUMBER) IS      lob_loc CLOB; BEGIN        SELECT CLOBHOLDERDDOC INTO lob_loc FROM TBL_CLOBHOLDERDDOC        WHERE CLOBHOLDERDDOCID = p_id FOR UPDATE;    DBMS_LOB.WRITE(lob_loc, LENGTH(UTL_RAW.CAST_TO_RAW(p_document)), 1, UTL_RAW.CAST_TO_RAW(p_document)); END; / CREATE OR REPLACE PROCEDURE PRC_RD_CLOB (    p_id IN NUMBER,    p_clob OUT VARCHAR2) IS    lob_loc  CLOB; BEGIN    SELECT CLOBHOLDERDDOC INTO lob_loc    FROM   TBL_CLOBHOLDERDDOC    WHERE  CLOBHOLDERDDOCID = p_id;    p_clob := UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(lob_loc, DBMS_LOB.GETLENGTH(lob_loc), 1)); END; / As you can see, I had originally been casting everything back and forth between RAW formats using the UTL_RAW.CAST_TO_VARCHAR2() and UTL_RAW.CAST_TO_RAW() functions all over the place, but it had the nasty side effect of working great on my Oracle express edition on my developer box, but having all the CLOBs above a certain size display garbage when read back on the Oracle test database server . So...I kept working at it and came up with the following, which ALSO worked on my Oracle Express Edition on my developer box:   CREATE OR REPLACE PROCEDURE PRC_WR_CLOB (     p_document      IN VARCHAR2,     p_id        OUT NUMBER) IS       lob_loc CLOB; BEGIN     INSERT INTO TBL_CLOBHOLDERDOC (CLOBHOLDERDOC)         VALUES (empty_CLOB())         RETURNING CLOBHOLDERDOC, CLOBHOLDERDOCID INTO lob_loc, p_id;     DBMS_LOB.WRITE(lob_loc, LENGTH(p_document), 1, p_document);   END; / CREATE OR REPLACE PROCEDURE PRC_UD_CLOB (     p_document      IN VARCHAR2,     p_id        IN NUMBER) IS       lob_loc CLOB; BEGIN     SELECT CLOBHOLDERDOC INTO lob_loc FROM TBL_CLOBHOLDERDOC     WHERE CLOBHOLDERDOCID = p_id FOR UPDATE;     DBMS_LOB.WRITE(lob_loc, LENGTH(p_document), 1, p_document); END; / CREATE OR REPLACE PROCEDURE PRC_RD_CLOB (     p_id IN NUMBER,     p_clob OUT VARCHAR2) IS     lob_loc  CLOB; BEGIN     SELECT CLOBHOLDERDOC INTO lob_loc     FROM   TBL_CLOBHOLDERDOC     WHERE  CLOBHOLDERDOCID = p_id;     p_clob := DBMS_LOB.SUBSTR(lob_loc, DBMS_LOB.GETLENGTH(lob_loc), 1); END; / Unfortunately, by changing my code to what you see above, even though it kept working on my Oracle express edition, everything over a certain size just started truncating after about 7950 characters on the test server! Here is what I came up with in the end, which is actually the simplest solution and this time worked on both my express edition and on the database server (note that only the read function was changed to fix the truncation issue, and that I had Oracle worry about converting the CLOB into a VARCHAR2 internally): CREATE OR REPLACE PROCEDURE PRC_WR_CLOB (        p_document      IN VARCHAR2,        p_id            OUT NUMBER) IS      lob_loc CLOB; BEGIN    INSERT INTO TBL_CLOBHOLDERDDOC (CLOBHOLDERDDOC)        VALUES (empty_CLOB())        RETURNING CLOBHOLDERDDOC, CLOBHOLDERDDOCID INTO lob_loc, p_id;    DBMS_LOB.WRITE(lob_loc, LENGTH(p_document), 1, p_document); END; / CREATE OR REPLACE PROCEDURE PRC_UD_CLOB (        p_document      IN VARCHAR2,        p_id            IN NUMBER) IS      lob_loc CLOB; BEGIN        SELECT CLOBHOLDERDDOC INTO lob_loc FROM TBL_CLOBHOLDERDDOC        WHERE CLOBHOLDERDDOCID = p_id FOR UPDATE;    DBMS_LOB.WRITE(lob_loc, LENGTH(p_document), 1, p_document); END; / CREATE OR REPLACE PROCEDURE PRC_RD_CLOB (    p_id IN NUMBER,    p_clob OUT VARCHAR2) IS BEGIN    SELECT CLOBHOLDERDDOC INTO p_clob    FROM   TBL_CLOBHOLDERDDOC    WHERE  CLOBHOLDERDDOCID = p_id; END; /   I hope that is useful to someone!

    Read the article

  • SQL Developer Debugging, Watches, Smart Data, & Data

    - by thatjeffsmith
    After presenting the SQL Developer PL/SQL debugger for about an hour yesterday at KScope12 in San Antonio, my boss came up and asked, “Now, would you really want to know what the Smart Data panel does?” Apparently I had ‘made up’ my own story about what that panel’s intent is based on my experience with it. Not good Jeff, not good. It was a very small point of my presentation, but I probably should have read the docs. The Smart Data tab displays information about variables, using your Debugger: Smart Data preferences. You can also specify these preferences by right-clicking in the Smart Data window and selecting Preferences. Debugger Smart Data Preferences, control number of variables to display The Smart Data panel auto-inspects the last X accessed variables. So if you have a program with 26 variables, instead of showing you all 26, it will just show you the last two variables that were referenced in your program. If you were to click on the ‘Data’ debug panel, you’ll see EVERYTHING. And if you only want to see a very specific set of values, then you should use Watches. The Smart Data Panel As I step through the code, the variables being tracked change as they are referenced. Only the most recent ones display. This is controlled by the ‘Maximum Locations to Remember’ preference. Step through the code, see the latest variables accessed The Data Panel All variables are displayed. Might be information overload on large PL/SQL programs where you have many dozens or even hundreds of variables to track. Shows everything all the time Watches Watches are added manually and only show what you ask for. Data on Demand – add a watch to track a specific variable Remember, you can interact with your data If you want to do more than just watch, you can mouse-right on a data element, and change the value of the variable as the program is running. This is one of the primary benefits to debugging over using DBMS_OUTPUT to track what’s happening in your program. Change the values while the program is running to test your ‘What if?’ scenarios

    Read the article

  • Microsoft publiera cette après midi une mise à jour urgente pour internet explorer, qui corrigera pl

    Mise à jour du 30/03/10 (Djug) Microsoft publiera cette après midi une mise à jour urgente pour internet explorer, qui corrigera plusieurs failles de sécurité. Microsoft a annoncé hier la mise en ligne cette après midi d'une mise à jour urgente pour les versions 6 et 7 d'internet explorer. [IMG]http://djug.developpez.com/rsc/IE_browser_bandaid.jpg[/IMG] Ce patch proposé hors cycle du patch Tuesday (un ensemble de correctifs diffusés le deuxième mardi de chaque mois), consiste à corriger des failles qui concernent toutes les versions d'internet Explorer y compris IE8, et sur tous les systèmes d'exploitation y compris Windows 7 et Windows server 2008 R2.

    Read the article

  • Question on PL/SQL - Evaluate the PL/SQL block given above and determine the data type and value of each of the following variables [closed]

    - by Annie
    DECLARE v_custid NUMBER(4) := 1600; v_custname VARCHAR2(300) := 'Women Sports Club'; v_ new_custid NUMBER(3) := 500; BEGIN DECLARE v_custid NUMBER(4) := 0; v_custname VARCHAR2(300) := 'Shape up Sports Club'; v_new_custid NUMBER(3) := 300; v_new_custname VARCHAR2(300) := 'Jansports Club'; BEGIN v_custid := v_new_custid; v_custname := v_custname || ' ' || v_new_custname; END; v_custid := (v_custid *12) / 10; END; /

    Read the article

  • how to include .pl (PERL) file in PHP

    - by dexter
    i have two pages one in php(index.php) and another one in Perl(dbcon.pl). basically i want my php file to show only the UI and all the data operations would be done in Perl file. i have tried in index.pl <?php include("dbcon.pl");?> <html> <br/>PHP</br> </html> and dbcon.pl has #!/usr/bin/perl use strict; use warnings; use DBI; use CGI::Simple; my $cgi = CGI::Simple->new; my $dsn = sprintf('DBI:mysql:database=%s;host=%s','dbname','localhost'); my $dbh = DBI->connect($dsn,root =>'',{AutoCommit => 0,RaisError=> 0}); my $sql= "SELECT * FROM products"; my $sth =$dbh->prepare($sql); $sth->execute or die "SQL Error: $DBI::errstr\n"; while (my @row = $sth->fetchrow_array){ print $cgi->header, <<html; <div>&nbsp;@row[0]&nbsp;@row[1]&nbsp;@row[2]&nbsp;@row[3]&nbsp;@row[4]</div> html } but when i run index.php in browser it prints all the code in dbcon.pl file instead of executing it how to overcome this problem? note: i am running this in windows environment is there any other way to do this?

    Read the article

  • PL/SQL exception and Java programs

    - by edwards
    Hi Business logic is coded in pl/sql packages procedures and functions. Java programs call pl/sql packages procedures and functions to do database work. pl/sql programs store exceptions into Oracle tables whenever an exception is raised. How would my java programs get the exceptions since the exception instead of being propagated from pl/sql to java is getting persisted to a oracle table and the procs/functions just return 1 or 0. Sorry folks i should have added this constraint much earlier and avoided this confusion. As with many legacy projects we don't have the freedom to modify the stored procedures.

    Read the article

  • Stripping a spike from rrdtool when removespike.pl doesn't find any

    - by raccettura
    I know when rrdtool graphs (using rrdtool 1.4) network traffic and the host is restarted a spike is a pretty normal thing to see. In the past I've just run that removespike.pl script that is hosted by the author and it strips the spike and I'm good to go. The last few times I've rebooted removespike.pl finds no spikes, but it's obvious that there are spikes. So my question is, how can I easily remove these spikes and get my graphs usable again? Right now it's so skewed it's meaningless.

    Read the article

  • New Exam Prep Seminar for Program With PL/SQL!

    - by Harold Green
    We're happy to announce the availability of a brand new Exam Prep Seminar titled Certification Exam Prep Seminar: Program with PL/SQL. This new Exam Prep Seminar is available as a standalone product. For those of you preparing for the Oracle PL/SQL Developer Certified Associate certification, this seminar is a great value and and an excellent way to gain valuable insight from one of Oracle University's top Database instructors. This Exam Prep Seminar will accelerate your preparation, make your prep time more efficient and give you insight to the breadth and depth of the certification exam. This type of exam preparation has traditionally only been available at the Oracle OpenWorld conference, but is now available to anyone through this new format. Of course with online video, you can now start, stop, rewind, and review as needed! Also note that because this seminar is in the Oracle Training On Demand format, you can also watch it on your your iPad through Oracle University's new free iPad app. QUICK LINKS SEMINAR: Certification Exam Prep Seminar: Program with PL/SQL APPLICABLE EXAMS: 1Z0-147: Program With PL/SQL 1Z0-144:  Oracle Database 11g: Program with PL/SQL CERTIFICATION: Oracle PL/SQL Developer Certified Associate

    Read the article

  • java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

    - by jack
    Hi I got an email from a user when he sees the following error output when he's using our web site. java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "WEB_OWNER.SSFP_GET_WE_OBJ", line 300 ORA-06512: at line 1 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:315) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:281) This is error from oracle webconnect, Oracle Application Server Containers for J2EE 10g (10.1.2.3.0). Any idea?

    Read the article

  • Realtek RTL8201 CL/PL NETWORK DRIVER

    - by Marin
    Can anyone help me please?I had to formate my friends computer & she didn't have the motherboard cd so I have to download the Network Driver from internet! I need Realtek RTL8201 CL/PL NETWORK DRIVER but I can't find the right link to download it!Can you please help me?Thank you;)

    Read the article

  • pl/sql Oracle syntax

    - by Paul
    I have a query in pl/sql that i need to migrate to ms sql. select count(*) from table1 t1 where (conditions1) and (conditions2) and variable = t1.column1(+) Could anyone tell me what the (+) after the column means ? (is it sort of a sum ?)

    Read the article

  • Does ASL License complies with MS-Pl license?

    - by John Simons
    I would like to redistribute a compiled version of Yahoo! UI Library: YUI Compressor for .Net (http://yuicompressor.codeplex.com), that according to the web site is licensed under MS-Pl (http://yuicompressor.codeplex.com/license). The project I work in is release under the terms of Apache Software Foundation License 2.0. According to the MS-Pl license "If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license." , the term complies is not very clear! Does ASL License complies with MS-Pl license?

    Read the article

  • LFD always stops working after ~30 days, until I give /etc/csf/csf.pl -r

    - by gus
    When I give /etc/csf/csf.pl -r , I see lots of lines flushing, then I begin to get the notification emails again, (several emails per day), for example: Time: Wed Sep 12 08:39:47 2012 +0800 IP: 221.13.104.162 (CN/China/-) Failures: 5 (sshd) Interval: 300 seconds Blocked: Permanent Block Log entries: Sep 12 08:39:25 MyHost sshd[9677]: Failed password for root from 221.13.104.162 port 51106 ssh2 Sep 12 08:39:28 MyHost sshd[9712]: Failed password for root from 221.13.104.162 port 51690 ssh2 Sep 12 08:39:32 MyHost sshd[9739]: Failed password for root from 221.13.104.162 port 52128 ssh2 Sep 12 08:39:36 MyHost sshd[9778]: Failed password for root from 221.13.104.162 port 52670 ssh2 Sep 12 08:39:40 MyHost sshd[9821]: Failed password for root from 221.13.104.162 port 53155 ssh2 And then after about 30 days, the emails stop coming, it is as if something has filled up, and requires flushing again. I don't know much about CSF/LFD, but I would have imagined that this would work in a FIFO manner, so it should be able to run indefinitely within finite space. My /etc/csf/version.txt says 4.83 My cat /proc/version says Linux version 2.6.18-028stab066.8 (root@rhel5-64-build) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Fri Nov 27 20:19:25 MSK 2009

    Read the article

  • MooseX::Types declaration issue, tight test case :)

    - by TJ Thompson
    So after an embarrassing amount of time debugging, I've finally stripped this issue ([http://stackoverflow.com/questions/4621589/perl-moose-typedecorator-error-how-do-i-debug][1]) down to a simple test case. I would humbly request some help understanding why it's failing :) Here is the error message I'm getting: plxc16479 $h2/tmp/tmp18.pl This method [new] requires a single argument. at /nfs/pdx/disks/nehalem.pde.077/perl/5.12.2/lib64/site_perl/MooseX/Types/TypeDecorator.pm line 91 MooseX::Types::TypeDecorator::new('MooseX::Types::TypeDecorator=HASH(0x655b90)') called at /nfs/pdx/disks/nehalem.pde.077/projects/lib/Program-Plist-Pl/lib/Program/Plist/Pl.pm line 10 Program::Plist::Pl::BUILD('Program::Plist::Pl=HASH(0x63d478)', 'HASH(0x63d220)') called at generated method (unknown origin) line 29 Program::Plist::Pl::new('Program::Plist::Pl') called at /nfs/pdx/disks/nehalem.pde.077/tmp/tmp18.pl line 10 Wrapper test script: use strict; use warnings; BEGIN {push(@INC, split(':', $ENV{PERL_TEST_LIBS}))}; use Program::Plist::Pl; my $obj = Program::Plist::Pl->new(); Program::Plist::Pl file: package Program::Plist::Pl; use Moose; use namespace::autoclean; use Program::Types qw(Pattern); # <-- Removing this fixes error use Program::Plist::Pl::Pattern; sub BUILD { my $pattern_obj = Program::Plist::Pl::Pattern->new(); } __PACKAGE__->meta->make_immutable; 1; Program::Types file: package Program::Types; use MooseX::Types -declare => [qw(Pattern)]; class_type Pattern, {class => 'Program::Plist::Pl::Pattern'}; 1; And the Program::Plist::Pl::Pattern file: package Program::Plist::Pl::Pattern; use Moose; use namespace::autoclean; __PACKAGE__->meta->make_immutable; 1; Notes: While I don't need the Pattern type from Program::Types in the above code, I do in other code that is stripped out. The PERL_TEST_LIBS env var I'm pulling INC paths from only contains paths to the project modules. There are no other modules loaded from these paths. It appears the MooseX::Types definition for Pattern is causing problems, but I'm not sure why. Documentation shows the syntax I am using, but it's possible I'm misusing class_type as there isn't much said about it. Intent is to be able to use Pattern for type checking via MooseX::Params::Validate to verify the argument is a 'Program::Plist::Pl::Program' object. I've found that removing the intervening class Program::Plist::Pl from the equation by directly calling Pattern-new from the tmp18.pl wrapper results in no error, even when the Program::Types Pattern type is imported.

    Read the article

  • Query performance difference pl/sql forall insert and plain SQL insert

    - by user289429
    We have been using temporary table to store intermediate results in pl/sql Stored procedure. Could anyone tell if there is a performance difference between doing bulk collect insert through pl/sql and a plain SQL insert. Insert into or Cursor for open cursor fetch cursor bulk collect into collection Use FORALL to perform insert Which of the above 2 options is better to insert huge amount of temporary data?

    Read the article

  • is versus as pl/sql

    - by sqlgrasshopper5
    I thought that oracle treats both "is" and "as" same for functions and procedures.I tried googling with "pl/sql is vs as" and got the following link which says both are the same. http://stackoverflow.com/questions/2338408/is-vs-as-keywords-for-pl-sql-oracle-function-or-procedure-creation But I found http://www.adp-gmbh.ch/ora/plsql/coll/declaration.html#index_by which seems to indicate there is a difference. Could somebody (list/point me to a link) the other contexts where using "is/as" makes a difference?. Thanks.

    Read the article

  • Postfix Vacation.pl with local users

    - by Simiyu
    Hi, I am trying to setup the vacation.pl script on a mail servers which has local users only (since they are only 10 users). I have installed the SquirrelMail plugin and the Auto respond option is available for the users, but when an email is sent to the addresses no auto reply email is sent to the sender. There are also no logs on the /var/log/vacation folder which i created as well as the normal log files. Most of the examples online refer to virtual users, can it work with local users? and if so how? regards, Arthur

    Read the article

  • Microsoft Public License Question

    - by ryanzec
    Let preface this by saying that I understand that any advice I may receive is not to be taken as 100% correct, I am just looking for what people's understand of what this license is. I have been looking for a library that allow be to deal with archived compressed files (like zip files) and so far the best one I have found is DotNetZip. The only concern I have is that I am not familiar with the Microsoft Public License. While I plan to release a portion of my project (a web application platform) freely (MIT/BSD style) there are a few things. One is that I don't plan on actually releasing the source code, just the compiled project. Another thing is that I don't plan on releasing everything freely, only a subset of the application. Those are reason why I stay away form (L)GPL code. Is this something allowed while using 3rd party libraries that are licensed under the Microsoft Public License? EDIT The part about the Microsoft license that concerns me is Section 3 (D) which says (full license here): If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. I don't know what is meant by 'software'. My assumption would be that 'software' only refers to the library included under the license (being DotNetZip) and that is doesn't extends over to my code which includes the DotNetZip library. If that is the case then everything is fine as I have no issues keeping the license for DotNetZip when release this project in compiled form while having my code under its own license. If 'software' also include my code that include the DotNetZip library then that would be an issue (as it would basically act like GPL with the copyleft sense).

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >