Regarding execution problem of PL/SQL file

Hi,
I have PL/SQL file. When I try to compile the file in a machine namely machine A it just hangs. Where as when I ftp the code to machine B wd then try to compile, then it compiles successfully. Bot the machines are unix machines. I just wante to know whether its a problem with my code or something wrong with the machine
Thanks in advance

In database A, if session 1 is executing a stored procedure, the stored procedure will be locked. If you come along in session 2 and try to recompile the stored procedure, session 2 will be blocked until session 1 finishes. If there are lots of sessions trying to execute the stored procedure, session 2 could well be blocked for a long time.
Justin

Similar Messages

  • Please help me regarding the running of a sql file

    Hi I downloaded one sql file from
    http://www.cs.uwf.edu/~sbagui/db/practical_oracle.htm
    But i am unable to run it successfully...please help me regarding this... thanking you
    Edited by: SowmyRaj on Dec 24, 2009 5:24 AM

    Hi vali thanks for your reply...
    I am using Windows XP sp2 Os.
    and Oracle database 11g ...
    when executing this file the follwing error is occuring
    Enter value for user_name: system
    old 2: uname VARCHAR(50) := '&user_name';
    new 2: uname VARCHAR(50) := 'system';
    **MOBILE CODE** immediate 'drop user ' ||uname;
    ERROR at line 13:
    ORA-06550: line 13, column 1:
    PLS-00103: Encountered the symbol "*" when expecting one of the following:
    ( begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    continue close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe purge

  • Problem when importing a SQL file into Forms

    Hello friends at www.oracle.com ,
    I have a Forms program which has to open a SQL external file, read each SQL instruction into a variable, execute it and read the next one, as in the example (for illustration purposes) below.
    create table ...
    insert into log_table ...
    delete from table ...
    So, whenever Forms finds the slash, it will execute the instruction via FORMS_DDL built-in.
    The problem is that we have a SQL instruction that can't be executed via Forms. The reasons:
    - It is a SQL that creates a package body
    - The SQL that creates the package code is very big (more than 32 kb), and this leads to the problem below
    - The 32 kb SQL code is sent to a Forms variable, and a FORMS_DDL should execute it, but FORMS_DDL has a limitation: the maximum that FORMS_DDL can read is 32 kb
    - I can't find a way for me to break the package code into two or more codes because I cannot alter a package to add procedures or functions
    Could you please tell me what should I do? If the text above is not clear, please ask me more details.
    Best regards,

    Hello Francois,
    Why don't you run your SQL file with Sql*Plus ?sincere thanks for your answer.
    Your idea would be the ideal solution, but the package needs to be created via Forms only, for maintenance purposes. A Forms program needs to handle everything that comes from this SQL external file.
    Another way could be creating the package inside Forms, but the idea is to send all SQL instructions to an external file, for the same reason as above (that is, maintenance).
    Best regards,

  • Problem in reading Sql server data from text file.

    I am selecting record from sql server 2005 and save the result in text file.
    The text file contains , delimiter.
    I am reading same txt file from java & insert into database.
    But it shows "��S and box like characters along with original text.
    Regards
    Joe

    I also tried a lot for this. And didn't want to do copy paste for all .sql files. Finally the files could be read as is the clue is to read the file using UTF-16 format like
    BufferedReader br=new BufferedReader(new InputStreamReader(fis,Charset.forName("UTF-16")));
    I guess it would help and save work to copy paste text to other files and resaving it!

  • Two problems in using LKM file to sql

    hi all,
    i met two problems during use "LKM file to sql" for loading data from csv file to oracle db. please try to help me, thanks a lot!
    my environment:
    os: win 7
    odi version: 11g
    The 1st condition is: in the 10th step of the execute session, a table called ".SNP_CHECK_TAB" which could not be created in oracle will be created!
    If i modify it to SNP_CHECK_TABLE, the step will pass...
    why naming table like this?
    create table .SNP_CHECK_TAB
         CATALOG_NAME     VARCHAR2(100 CHAR) NULL ,
         SCHEMA_NAME     VARCHAR2(100 CHAR) NULL ,
         RESOURCE_NAME     VARCHAR2(100 CHAR) NULL,
         FULL_RES_NAME     VARCHAR2(100 CHAR) NULL,
         ERR_TYPE          VARCHAR2(1 CHAR) NULL,
         ERR_MESS          VARCHAR2(250 CHAR) NULL ,
         CHECK_DATE     DATE NULL,
         ORIGIN          VARCHAR2(100 CHAR) NULL,
         CONS_NAME     VARCHAR2(35 CHAR) NULL,
         CONS_TYPE          VARCHAR2(2 CHAR) NULL,
         ERR_COUNT          NUMBER(10) NULL
    The 2nd condition is: i want to filter out certain name in the source table and the filter string is "BRE.name!='some_value'".
    When I clicked the "Testing query" button, the following error shows:"Error while executing query Invalid format description".
    It works well when the source db is oracle, why not file? Is there any format for the filter string in file? I don't think so...
    Jun

    Hi Jun,
    Can i contribute a little for ur 2nd problem.
    This error is coz, If u are using a filter against a File "data store" u can't test it, only against RDBMS query will be tested at data store level.
    Well, for using that filter and make sure its working, drag and drop the source file in the interface (u can get the filter) and make it to execute on STAGING.
    Thanks,
    Guru

  • Executing .sql file, path problem,help!

    Hi, could anyone tell me that how to change the default .sql file running path in Oracle 8?
    I am running Oracle 8 resides on IBM AIX server. i found that under SQL prompt, the default .sql file running path is my home directory,e.g./home/user01,so i have to save all .sql files under that directory....could anyone tell me how to modify the default path to other directories.e.g,/home/user01/sql, so i could collect all .sql files under a specified directory?
    Many thanks

    Set the environment variable SQLPATH
    For more information see
    SQLPATH on 9iRel2 on Win XP

  • Problems with PL/SQL packages

    Hello,
    I face the following problem with PL/SQL stored procedures. The Oracle
    version is 8.0.5 on Windows NT 4. The PL/SQL package has a set of procedures and functions.
    The main procedure of the PL/SQL package is triggered from VC++ executable. If for some reason,
    an exception is caught in the stored procedure (like no_data_found
    exception), then the following problem occurs.
    If we try to trigger the stored procedure again through the VC++ executable,
    the variables in the stored procedures have the values as in the previous
    execution. They are not getting initialised. (The same database connection
    is used in VC++ executable).
    Currently, only if a new connection to the database is used , the problem is
    solved.
    Also, change in the input parameters of the procedure is not reflected, once the procedure fails because of any exception. Only the input which was given during the time of execution when the procedure failed,is considered.
    What could be the reason for this problem and how can this be corrected?
    Please send in your suggestions.
    Thanks and Regards,
    Ramya Priya
    null

    Hi Keith,
    I am connecting to the database as the package owner..
    I have noticed earlier that I have problems when capturing triggers also.. The content of one large trigger contains 36371 characters and when capturing it from DB, the content was truncated to 28020 characters in Designer.
    Our ideas with capturing the DB packages/procedures were to use the Designer as version control system.
    We wanted to have all objects used in a project in Designer.. entities, tables, triggers, packages, procedures, Forms files, etc. in order to make a configuration for a project release.
    Thank you,
    Claudia

  • MDM Database command execution error. A SQL statement failed to execute

    Hi,
    When we tried to execute an MDM Java query modify/create, we get the following dump.
    Is this anything to do with the parameters that we pass or is it something to do with the database ?
    We have checked the code and we do not find anything wrong with the code at all.
    We are using Java API 5.5.63.73 and calling MDM API's using WebDynpro for Java.
    I have noticed this issue has been raised here as well :
    Database command execution error. (While mounting a repository)
    com.sap.mdm.commands.CommandException:
    com.sap.mdm.internal.protocol.manual.ServerException: Database command execution error. A SQL
    statement failed to execute. The actual error may have been written to a log file. at
    com.sap.mdm.data.commands.ModifyRecordCommand.execute(ModifyRecordCommand.java:163) at
    Regards,
    Subramanian V.
    Edited by: Subramanian Venkateswaran on Dec 10, 2008 8:11 PM

    Hi Subramanian  ,
    The error looks more like a problem with the data base or MDM system rather than the java code.
    Which is the underlying database you are using with MDM? As some users have faced some difficulties when working with the DB2 Data base,If this is the data base you too are working upon then may be the issue could be similar,if possible try using the Oracle or SQL data base as these databse show more compatibility than a DB2 when working with MDM .
    Also check the MDM users autorization and authentication to modifyor create recordrs in MDM.try given the user the ADMIN rights,and tehn try and see if teh user is able to modify/Create the mdm records.
    Lastly you can check the database instance and listener configuration correctly.try restarting the Database service form the system if possible.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Andrew - one more doubt in the donsample.sql file,it is urgent

    Andrew,
    I believe you can answer this ,i hope i am not trying too much on your patience.Thanks .I am connected to the oracle server.In that i execute a procedure which i believe is executing on the oracle server.i supply arguments to it .The arguement is a file on my local directory .The error code follows:-
    I have problem running a oracle procedure which uses a xml parser built on java libraries.When i executed this procedure the following error came:-
    SQL> execute domsample('\oraclexdk\xdk\demo\plsql\parser','family.xml','error.txt');
    BEGIN domsample('\oraclexdk\xdk\demo\plsql\parser','family.xml','error.txt'); END;
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.SecurityException: relative pathnames are not
    allowed(\oraclexdk\xdk\demo\plsql\parser)
    ORA-06512: at "SYS.XMLPARSERCOVER", line 0
    ORA-06512: at "SYS.XMLPARSER", line 144
    ORA-06512: at "IWADM.DOMSAMPLE", line 77
    ORA-06512: at line 1
    Do you know something about this .ie. classpath variables or something like that.if you want the domsample arguement syntax for further clarifications ,i am enclosing this in the following lines.The setbasedir(p,dir) prompts for a parser object and a complete directory path.what i give here is the path on my local directory and i think this creates the error.
    How do i rectify this error.is it on my(client) side or the server side.If it on the oracle server side or my side can you tell me what went wrong.The parser and the dom package everything else is working fine.It is really urgent ,andrew.This is holding up all the work.The arguement syntax help says on 'dir' that this is a pointer to external file system .I have a confusion that whether this refers to external file system of the server or the client.if so form the server how to route it to the client directory or should i have a space on the server, upload this file and execute the domsample.sql file.Can you clear this concept for me.
    'dir' - must point to a valid directory on the external file system
    and should be specified as a complete path name
    'inpfile' - must point to the file located under 'dir', containing the
    XML document to be parsed
    'errfile' - must point to a file you wish to use to record errors; this
    file will be created under 'dir'
    I know i might be bugging you ,but your answers are really great.Thanks.
    regards
    gopal

    I seem to have this error with both windows and unix directory space.Please help me with debugging this .I am really struck with it.The error occurs at the same line when executed with the file on the unix server.
    SQL> execute domsample('/user/sb8066/','family.xml','error.txt');
    BEGIN domsample('/user/sb8066/','family.xml','error.txt'); END;
    ERROR at line 1:
    ORA-20100: Error occurred while parsing: Permission denied
    ORA-06512: at "SYS.XMLPARSER", line 22
    ORA-06512: at "SYS.XMLPARSER", line 69
    ORA-06512: at "IWADM.DOMSAMPLE", line 63
    ORA-06512: at line 1
    I won't clutter the forum.just to get your attention,i hope you can help me solving this problem,please can you see this thread,because in future i will be using this only to contact you.Thanks for the continued help.The windows space idea was not used.Many configurations had to be changed.Can you note what is peculiar at line 22 ,line 69.line 63 of domsample reads is just an 'end-if';I will expecting your answer as soon as possible.
    regards
    gopal

  • Error while executing Multiple Stored Procedure through .sql file

    Hi Guru's.
    I am new to ORACLE. I am facing problem while creating Stored Procedure through .sql file.
    I have one test.sql file with Stored Procedure is like,
    CREATE OR REPLACE PROCEDURE skeleton1
    AS
    BEGIN
         DBMS_Output.Put_Line('skeleton1');
    END skeleton1;
    CREATE OR REPLACE PROCEDURE skeleton2
    AS
    BEGIN
         DBMS_Output.Put_Line('skeleton2');
    END skeleton2;
    Now when i try to execute this test.sql file through SQL PLUS it gives me Error like this
    I am opening test.sql file from SQL PLUS,
    SQL>
    1 CREATE OR REPLACE PROCEDURE skeleton1
    2 AS
    3 BEGIN
    4 DBMS_Output.Put_Line('skeleton1');
    5 END skeleton1;
    6 /
    7 CREATE OR REPLACE PROCEDURE skeleton2
    8 AS
    9 BEGIN
    10 DBMS_Output.Put_Line('skeleton2');
    11* END skeleton2;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors;
    Errors for PROCEDURE SKELETON1:
    LINE/COL ERROR
    6/1 PLS-00103: Encountered the symbol "/"
    SQL>
    Please suggest how to create multiple CREATE PROCEDURE using single .sql script file....
    Regards,
    Shatrughan

    Hi,
    Try this
    CREATE OR REPLACE PROCEDURE skeleton1
    AS
    BEGIN
    DBMS_Output.Put_Line('skeleton1');
    END ;
    CREATE OR REPLACE PROCEDURE skeleton2
    AS
    BEGIN
    DBMS_Output.Put_Line('skeleton2');
    END;
    /Save the file and call it.
    Regards,
    Bhushan

  • How to get the SQL file name in SQL*plus

    hi all,
         I have created two sql file at C drive as "c:\Createtable.sql" and "c:\Deletetable.sql"
    afterwards i open
    C:\>sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 30 11:37:10 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: scott/tiger
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @C:\Createtable.sql'
    Table created.
    SQL> @'C:\Deletetable.sql'
    Table dropped.
    SQL>My problem is to get the name of the file as "c:\createtable.sql" and "C:\Deletetable.sql" in sql*plus enviornment.
    Thanks & Regards
    Singh

    Dear Damorgan,
         >>your version number to three decimal places
         My Oracle DB Version i have already stated in my previous post is 10.2.0.1.0
    Actually my problem is to get the sql files name we run in sqlplus enviornment with @ symbol. like
    i have created one sql file in c drive as
    "C:\Createtable.sql"
    afterwords i have connected to sqlplus as
    sql> conn scott/tiger
    sql>@c:\createtable.sql
    Now i want some query to get the name of the file which is run.
    In actual my problem is as
    i have suppose 10 or more SQL files in some folder ( sql1.sql, sql2.sql, sql3.sql ....).
    i created one file to call all the 10 sql files (main.sql)
    i have also one track_table which will keep track that which sql file is runned.
    I want some automated script which will insert the record in that track_table....... for that i need the name of sql file which is runned.
    Hope this will help you.
    Thanks & Regards
    Singh

  • How to execute .sql file in Stored Procedure?

    Hi,
    I have an urgent requirement, where i have to execute .sql file form Stored Procedure.
    This .sql file will have set of update statement. I need to pass value to this update statement.
    Kindly please help me.
    Regards,
    Irfan

    This is required as part of Data Migration where  i have to do 100 of table's update. Each time update table will defer, so its better to have in separate script file (.sql). Can u paste some sample/syntax to exceute .sql file from stored procedure. I am new to this PL/SQL.
    How have you determined that it's "better" to have seperate scripts?  I assume you mean the table name will "differ" (and not "defer" - I assume that's just because English isn't your first language? no problem - I think I understand what you're asking).
    So what I think you're asking is that you have dynamic table names but each table needs to be updated in the same way?
    Question: Why do you have tables with different names that all need the same process doing to them?
    Assuming it's a valid requirement (and 99% of the time doing dynamic coding implies it's not).... you could use dynamic code, rather than 'scripts'...
    e.g.
    create procedure update_table(tbl_name varchar2) is
    begin
      execute immediate 'update '||tbl_name||' set lastupdate = null';
    end;
    As you haven't bothered to provide a database version, any example code/data or explanation of what you're actually doing, you're not going to get any detailed answer.  Please do take the time to read the FAQ and post appropriate details so people can help you.

  • Saving the output of a .sql file in .csv format

    Hi,
    I am saving the output of a .sql file in .csv format. But the problem is , the record of few columns have "new line" character in it, so when it is getting saved in .csv format, those records are coming in multiple rows, but they should come in one single row in single block. Please advise how to overcome this problem.
    Regards,
    Niraj

    Hi Guys,
    I guess, there is a misunderstanding.
    He is talking about the issue caused as a result of the data containing a "CRLF" ( Carriage return Line feed ) .
    That is mainly a data issue.
    The query i presume, must be right.
    I guess you should be able to fix it using some string functions.
    Some thing similar to this
    CREATE TABLE ASH (NAME VARCHAR2(10))
    SELECT REPLACE(NAME, CHR(13)||CHR(10), 'ISH') FROM ASH;
    SELECT REPLACE(NAME, CHR(10), 'ISH') FROM ASH;
    SELECT REPLACE(NAME, CHR(13), 'ISH') FROM ASH;
    depending on the type of new line whether it is CR or LF. or CRLF.
    Regards
    Ashish/-

  • EA1 - Syntax highlightling of PL/SQL files

    Syntax highlighting of pl/sql files with the file extensions '.pls', '.plb', '.pks' and '.pkb' file extension does not work. However, syntax highlighting does work with files with '.sql' file extension. Is there anyway to enable it for files containing pl/sql?

    You have to associate the file types, but sadly EA1 has a known problem with these preferences. Wait for EA2...
    Regards,
    K.

  • SQL files open new SSMS instance

    I know there is already a thread on this but it is old. When ever I double click on a .sql file it opens a new instance of SSMS. This is annoying and not the behavior that I'd expect. When the new instance opens the file will be there BUT I get an error
    message, "There was a problem sending the command to the program."
    I'm running SQL Server 2012 SP1 on Windows 7. Does anybody have a modern fix for this issue?

    Hello,
    Please try the below procedure, but first backup the registry.
    Run regedit and go to the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ssms.sql.11.0\Shell\Open\Command
    Edit the default value to add "%1" to the end.
    The value should now look like the following:
    "c:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\ssms.exe" /dde "%1"
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for

  • How can I steam from my early 2011 15-inch Mac Book Pro to my 2007 Samsung TV?

    I have an early 2011, 15-inch Mac Book Pro Software  OS X 10.9.5 (13F34). It does not have an HDMI port. I have a Samsung TV I bought in 2007 (Model LN-4061F). How can I stream from laptop to my TV? My laptop does not have an HDMI port. I've read I c

  • Wont play video

    i have the 30gb ipod and i downloaded videos from itunes they are on my ipod w/the tv symbol when i play them the sound works but no picture and tHe tv setting is on can somebody please help

  • Nokia Lumia 620 incoming call slide up isssue

    Hi All, Many a times Its found that when I receive a call, the "Slide up" option on the screen does not work. There is no scratch guard on the screen and the screen is perfectly clean. Does any one face same kind of issue. Thanks.

  • Display the full file path in title bar

    I apologize for my username. After getting a ton of "username already exists" I went to the keyboard crushing technique to find one that didn't. We currently use Adobe Acrobat 9.5.4 I am assisting a user who would like the full file path of the opene

  • Is there a virus in my cloud backup?

    My iPhone crashed out and wouldnt re start! The apple would glow and white writing would start to appear at the top and some code and text like when booting up up a PC? I sent it off to a reputable iphone repairs company as I live miles away from the