Open Session through PL/SQL

On executing the following code i recieve an error,
DECLARE
BEGIN
conn sys/sys@ORCLDB as sysdba ;
END;
conn sys/sys@ORCLDB as sysdba ;
@nbsp; *
ERROR at line 3:
ORA-06550: line 3, column 6:
PLS-00103: Encountered the symbol "SYS" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "SYS" to continue.
ORA-06550: line 3, column 21:
PLS-00103: Encountered the symbol "AS" when expecting one of the following:
. ( * @ & = - + ; < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "AS" to
How do i achieve this with out an error.
Actually i have to simulate 1000 connections to oracle from my application? Help me out.
Thank You in advance.
Bhaskar

Thank you for the reply.
My application is related to database management. I have Client Based Application(CBA) and Server Application (SA). CBA connects to SA, and inturn connects to Oracle. So i have to test the server based application with 1000 or more CA which can be simulated with the above code
Regs

Similar Messages

  • Is it possible to start planning manager programatically from backend through PL/SQL?

    I need to activate and run Planning manager concurrent program from back end through PL/SQL.Actually i am working on MRP Open Forecast Interface and I want to run this program after inserting data in the interface table mrp_forecast_interface.Please guide me.

    Oracle EBS forum is the best place for your question. This place is more towards general SQL, PL/SQL questions.
    https://community.oracle.com/community/oracle-applications/e-business_suite/e-business-suite-technology/general_ebs_discussion

  • Re: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi,
    I'm encountering an issue with "Named Pipes Provider, error: 40 windows" and am having problems determining how to fix it due to the environment I'm using.  I have two SQL Servers installed on two separate Win2K3 Server boxes, one is SQL Server 2000 and the other is SQL Server 2005.  The SQL Server 2000 contains the actual application data.  The 2005 database is used only for Reporting Services.  I've set up the reports on SSRS such that their datasources hit the 2000 server.  This is using SQL Server authentication.
    When testing the reports via SSRS (in Visual Studio 2005), the connection to the data works and the reports are generated fine.  When I deploy them to the reporting server and launch IE to test locally (still on the 2005 box), I get this "Named Pipes Provider, error 40" issue.  I made sure that Named Pipes and TCP were enabled and the port set at 1433 (to match that on the 2000 box). 
    Now I changed the datasource's authentication from SQL Server to Windows authentication.  I tested this in SSRS and this works too.  When I redeployed the reports with this authentication change, testing the reports via IE locally (on the 2005 box) worked.  Great.  Now when I open IE on an external box, i.e. on the 2000 box, and try to test the reports, I get this same error 40 issue.  I've been through a few threads describing the error 40, fiddling around with the SQL Server configuration as well as SSRS, to no avail.  I have a feeling this error 40 issue has to due with permissions/authentication between the SQL Server boxes but I can't really be sure.  Anyone have any ideas on how to troubleshoot my situation.  Thanks.
    larry

    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server :
    I.   Incorrect connection string, such as using SqlExpress.
    Check out: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=558456&SiteID=17
                    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1245564&SiteID=1
    The typical error when dealing with Express includes:
    a.  User is not aware of SqlExpress was installed as a named instance, consequently, in his/her connection string, he/she only specify ".","localhost" etc instead of ".\SqlExpress" or "<machinename>\Sqlexpress".
    b. Np was disabld by default after installing SqlExpress.
    c. If Sqlexpress was installed on the remote box, you need to enable remote connection for Express.
    Please read the following blog for best practice of connecting to SqlExpress.
    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
    II. Named Pipes(NP) was not enabled on the SQL instance.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136253&SiteID=1
    Oppose to SQL 2000 which turn on all protocols, SQL 2005 SKUs turn off NP by default. So, when you see this error, please check:
    1) Go to SQL Server Configuration Manager, See Server has NP enabled.
    2) %windir%\program files\microsoft sql server\mssql.1\mssql\log, notepad ERRORLOG, see whether Server is listening on NP.  You should see "Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ] or [\\.\pipe\mssql$<InstanceName>\sql\query]"
    3) Notice that "sql\query" is the default pipe name, so you need to know server is listening on which pipe name. eg: if you specify server pipe name is "sql\query1", then you would see in the errorlog that server listening on [ \\.\pipe\sql\query1 ], and go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on.
    4) If you are using SQL Native Client ODBC/OLEDB provider({SQL Native Client} or SQLNCLI), go to SQL Configuration Manager, click client protocols, make sure NP and TCP are both enabled. Right click properties of NP, make sure client is using the same pipe name as server for connection.
    5) If you are using MDAC ODBC/OLEDB({SQL Server} or SQLOLEDB) provider, in command line, launch "cliconfg.exe" and make sure NP enabled and right pipe name specified.
    III. Remote connection was not enabled. 
    Check out: when you right click on the Server in SQL Server Management Studio, in Connections, the Remote server connections part, you have enabled the "Allow remote connections to this server" check box
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322792&SiteID=1
    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=763875&SiteID=1
    If you are making a remote connection, namely, your target SQL Server is on the different box as client application, you might need to check whether:
    a. "File and Printer Sharing" was opened in Firewall exception list.
    b. Please see the blog for enabling remote connection for express and troubleshooting tips of remote connection.
    http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    IV. Server not started, or point to not a real server in your connection string.
    Check out: Open SQL Server Surface Area Configuration and ensure all the required services are started, Remote Connections are configured.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=348662&SiteID=1
    a. use "sc query mssqlserver" for default instance or "sc query mssql$<instancename>" to make sure SQL Server was started. Sometimes, reseason behind the broken of your client application w/ this error:40 might be SQL server restarted and failed, so, it'd better for you to double check.
    b. User specified wrong server in their connection string, as described in the forum discussion, "MSSQLSERVER" is an invalid instance name. Remember, when you connect to default instance, <machinename> could be best representitive for the instance, when you connect to a named instance such as sqlexpress, you should specify <machinename>\<instancename> as data source in your connection string.
     V. Other reasons such as incorrect security context.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=192622&SiteID=1
    Such error also occured during user operation such as moving database or db mirroring or cluster, any DB OP that might invovle different sql instances, namely, the destination database is located in another sql instance and user is not aware of the state of the destination. I recommend you first isolate whether this fail is during connection stage or data operation stage.
    a. During data operation, you are normally asked to type in the destination server name whether it is default to "(local)" or another server "<remotemachinename>". So, remember the exact string that represent the target instance, then when the error repros, open command line, use "sqlcmd -S<representitive> -E" ,see what happens, if the connection fail, please follow up above I - IV troubleshooting lists. otherwise continue.
    b. If you can make basic conection, but still face the error, then there must be something that server reject the connection or client close the connection for some reason.
    VI. Please try basic connectivity tests between the two mahcines you are working on. One simple way to verifty connectivity is to use command line tools, such as osql.exe. For example, osql -E -Stcpervername\instancename. If it connects cross-machine successfully, please also verify that your connection string in your scenario is correct.
    Here are some blogs which could be helpful: just follow the basic connectivity troubleshooting guidelines on the SQL Protocols blog, see:
    SQL Server 2005 Connectivity Issue Troubleshoot - Part I
    http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx
    and
    SQL Server 2005 Connectivity Issue Troubleshoot - Part II
    http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx
    Hope this helps.

  • Named Pipes Provider: Could not open a connection to SQL Server [2]

    Hi
    I'm a complete sql/asp.net newbie and want to try this tutorial:
    http://beta.asp.net/GuidedTour/
    First I installed:
    Visual Web Developer 2005 Express Edition Beta 2
    systemsettings\software shows the "sql server 2005 express edition ctp (sqlexpress)" installed
    mmc\service shows me the SQL Server (SQLExpress) is running
    Following the guided tour I use the commandline, type cmd, and type in the commandbox:
    "C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD90" -S "localhost\SqlExpress"
    Instead of localhost I also tried computername.smallbusiness.local (thats my fully domain name).
    However I always receive the error:
    Named Pipes Provider: Could not open a connection to SQL Server [2]
    Thank you very much for all your help

    Typically I have found problems with connection strings as one of a few things:
    1. Your instance is named different than the default.  I labeled mine BrettSQLServer instead of the regular instance.
    2. Your default storage of the your database has a user the system does not like and won't give it access.
    3. You have ports blocked that SQL Server is trying to access.
    1. Your instance should show up under 'SQL Server Configuration Manager'.  Start>MS SQL Server 2008 > Configuration Tools> SQL Server Configuration Manager.  You should see a left view panel where you can click 'SQL Server Services'.  This
    will show on the right all of your SQL services that are running.  The most important one is SQL Server({Your SQL Server Name}).  You will see column headers's displaying: "Name, State, Start Mode, Log on as,  ProcessID" by default.  If
    you don't see a version of this you may have no installed SQL server properly and gotten SQL management studio but not the server.  If you have the server and it's off or not running that is another problem.  If your "LOG On AS" is a service account
    is "NT ...." or something besides "Local System" that may be a problem.  Without getting into the symantecs of protection suffice to say you log in with less than system, yes you are more secure but some built in functions for connections may not work.
    2. Going off of rights of your 'Log On As' I WOULD USE 'System' NOT "NT Authority....".  The reason is that you can access less things with 'NT Authority....' but yes you are more secure for that reason.  If you are just trying to connect at home
    to test non secure things I don't see the harm.  If you are setting up a database for a multinational corporation than, Yes I would use a more secure account.  If you need to change it while still in SQL Server Confi Manager: Right Click> SQL
    Server(Your Version) > On 'Log On' tab > Choose drop down for 'Built-in Account' select 'Local System'.  As extra steps make sure by some strange reason your database locales have this user by default(They should).  MS likes to install database
    as default to: C:\Program Files\Microsoft SQL Server\MSSQL10.{instanceName}\MSSQL.  If you go to this location by going: right click>Properties>Security Tab .. and you fail to see your user that SQL server is defined as you may have lots of
    issues.
    3. Turn off Windows Firewall during SQL installation.  If you are scared of being attacked during this down window, disconnect your NIC and reconnect later.  I have not added a port manually in a while but it is simply easier to just
    turn off your firewall during install.  Having your TCP/IP connection from SQL Server blocked is kind of bad if you need to connect to it that way later.
    Problems most commonly encountered with SQL Server by users I have seen and I myself encountered a lot with full blown SQL Server Enterprise as well as Express versions of SQL:
    Connection string DO not work for BIDS, ADO.net, Linq, etc...
    Once you follow steps above just go {ComputerName}\{SQL Server Instance} as your connection name.   That mostly always works.  As a preliminary test you should install SQL Management Studio first before doing connection strings for a basic test
    that it can access your server.  When you first boot it up and click 'New Database Engine Query' it will display Server Type: "Database Engine" and a blank field or autopopulated field for 'Servername'.  The {ComputerName}\{SQL Server Instance} almost
    always works.  If it works and you can connect, you know that you have access, if you don't start there first before getting into connection strings through .NET languages.   I suggest just adding an easy alias, my local SQL box is simply called
    'Brett'.  Go again back to SQL Server Configuration Manager.  On the left side click 'SQL Native Client ...' > 'Aliases' > New > type in whatever you want.  Go back to the left pane click on 'SQL Server Services' ensure the service
    'SQL Server Browser' is running and set to run automatic.  Have fun accessing SQL Server with your alias.  
    Help I can't get FileStream to work and I ran 'spconfigure' in SQL and it still doesn't work.
    Kind of annoying that more sites don't list that it is entirely in the Configuration manager and has zilch to do with setting the option if the config has it off.  I am not a master of the sp_configure TSQL access method but I know during installs turning
    it on fails to REALLY turn it on.  Once again go to SQL Config Manger > SQL Server Services > Right click your instance > Select FILESTREAM tab > enable both check boxes.  Restart SQL Server.  Install Adventureworks 2008 and whatever
    else failed due to filestream access levels.
    Medium to Advanced on some things, but always wanting to know more

  • Deleteing Session through ABAP Program

    Hi,
    I want to delete a session through a custom Program.
    Can anybody help me on how can I do it through An abap program.
    I want to get the same functionality which we do through
    SM04 and not SM12.
    for. eg. I want  that program should take the userid and
    and find how many sessions are open for him and delete the required session.
    Please help.
    Thanks
    GT

    You can do this like this :
    call function 'TH_DELETE_USER'
            exporting client = client
                      user   = user
                      tid    = tid
                      only_pooled_user = only_pooled_user

  • Update through native sql

    Dear all,
    i have written a select query for Update oracle database through Native SQL.
    Query is
    W_FLG  = 'Y'
    UPDATE LPR_LEAVEPLAN_TRN SET FLOWLEVEL = W_FLG WHERE EMP_ID = '11200010'.
    LPR_LEAVEPLAN_TRN  is my oracle table
    i want to change the field of that table is FLOWLEVEL with W_FLG where employee id is 11200010
    here update is not working.
    can any body tell me how can update work with oracle database.

    i m doing same way........like this
      EXEC SQL.
       OPEN DBCUR FOR
        UPDATE LPR_LEAVEPLAN_TRN SET EMP_ID = '11210010' WHERE FLOWLEVEL = 1.
       if sy-subrc = 0.
         clear: W_FLG.
       endif.
       commit work.
         CATCH cx_sy_dynamic_osql_error.
        MESSAGE `Error in update!` TYPE 'I'.
        ENDEXEC.
    Here,
    LPR_LEAVEPLAN_TRN  is my oracle Table
    EMP_ID is (i want to Change)
    Plz Help

  • Kill Session through Script

    Hi ..
    any one can tell me how to kill session through Script in Oracle Open Script..?

    Do you mean how to stop the current virtual user or stop all the virtual users in the OLT session?
    I previously posted this on how one virtual user can stop itself.
    Re: How to stop single VU, java-code

  • Open Sessions SAP B1.

    Hello Experts,
    I got this problem. Since we upgrade to SAP 8.81 PL05   SQL keeps Open sessions from SAP users,
    then when the user try to log in an error shows that the user is already logged on ...
    then when i kill sessions on SQL the user is capable to log in to B1
    have you ever see this ?
    thanks for the help
    regards ...

    thnx for the answers, i will check this and let you know.
    As far as I know I have seen this with 3 diferents enterprises ... 
    I will update as far as I can ...

  • Calling Report Through PL/SQL

    Hi All,
    Is it possible to call a report through PL/SQL?If yes, please help me in this regard.
    Thanks.
    Vinay Kumar Garg

    Hi,
    There are 4 ways to call a report.
    Check out the following:
    http://oracleapps4u.blogspot.com/2011/03/oracle-report-request-methods.html

  • Report through Pl/Sql

    hi,
    i need to generate a report through pl/sql without using the concept of spool...
    please suggest some ideas
    thanks in advance
    Lovely

    UTL_FILE Demos
    http://psoug.org/reference/utl_file.html
    Etbin's link also have many useful examples

  • Open Session: unexpected error

    Hi everybody,
    I'm using BO XI R3.0 and since couple of last days I'm having problem with opening Universe Designer. The message I'm getting is "Open session: unexpected error". This happens after I provide user name and password for the access to the system.
    Does anyone know the solution to the problem beside uninstalling Client tools etc. (I already did that) because the same happens when I want to open Desktop Intelligence, Translation Manager, etc.
    Ivan

    In addition to my previous question, I have another query. I am trying to create a macro to rename, hide/show and change some more properties of universe objects. Below is the code to log on to designer and open the required universe
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Set DesignerApp = New Designer.Application
        DesignerApp.Visible = True
        Call DesignerApp.LogonDialog
        Set Univ = DesignerApp.Universes.Open
        DesignerApp.Visible = False
        Set Wksht = ThisWorkbook.Worksheets("Objects")
        Wksht.Unprotect
        Range("Objects").ClearContents
        Call GetObjectInfo(Univ.Classes, 1)
        Range("Objects").Resize(Wksht.UsedRange.Rows.Count - 1, 5).Name = "Objects"
        Range("Objects").Columns("H:L").Value = Range("Objects").Columns("B:F").Value
        Wksht.Protect
        DesignerApp.Quit
        Set DesignerApp = Nothing
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    What happenns is that after I log on using my macro, if I try to log on to designer again I get the "Open Session: unexpected error" error. If I delete the LSI folder on my local machine, then I can log on fine. but everytime I use the macro I get the error afterwards. I am logging onto a SAP system.
    Any help on this one?

  • Unable to open page through apache web server

    No one is able to open page through webserver it's giving message You don't have permission to access / on this server. Can any one help.

    Do you have a document called index.html in /Library/WebServer/Documents? The error mesage you mention usually happens when this document doesn't exist and you haven't set the option to list the files in the directory.

  • Xml file not generated through Pl/sql procedure as a concurrent executable

    Hi,
    I getting error while genarating xml file through Pl/sql procedure as a concurrent executable file.
    Error Message:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource

    Hi,
    Make sure the file has the XML header:
    <?xml version="1.0" encoding="UTF-8"?>
    or similar.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Submitting XML Publisher Concurrent Program through PL/SQL

    Hi,
    I am trying to submit a XML Publisher concurrent program through PL/SQL API fnd_request.submit_request.
    The request gets fired and completes successfully but it doesn't pick up the default template attached to it. Its output is plain XML but expected output is PDF report.
    However when I submit this report from SRS, it picks up the default template and gives output in PDF.
    Please let me know what could be going wrong?
    Regards,
    Nitin

    Check out the FND_REQUEST.ADD_LAYOUT API. You need to call it before you submit your report.
    Cheers,
    Dave

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

Maybe you are looking for

  • Shellscript in Applescript

    I made a shell script that works until one point where the Escape key needs to be pressed. Does anybody know how to make applescript make a keystroke while inside of the shell script???

  • Oracle database (10.2.0.4) and HTTP server / HTML DB conflict

    Hi there, I installed a fresh 10.2.0.1 (patched with 10.2.0.4) oracle database on Oracle Entreprise linux 5.7, and HTTP server + HTML DB products from the companion CD. Both are located in different home directory: ODB:  $ORACLE_BASE/product/10.2.0/d

  • Flash file won't open

    I saved and compacted my .fla the other day and the wheel never stopped spinning. I force quit/restarted and still, it loads up and never gives me any kind of window describing any problem -- but I never see an image and the wheel just keeps spinning

  • Is there a good T9 texting app?

    After using a regular phone for so long, i've gotten used to using the t9 word to text. Is there a good app that uses T9?

  • Query for Relationships

    Hi, Are there system tables that store relationship info for tables in a database ? 1) Given a parent table, I need to find all of the child tables. 2) Given a child table, I need to find all of the parent tables. Thanks, Ned