Call to concurrent program in a pl/sql block does not COMMIT data to table

I have the following PL/SQL block.
                         apps.create_po(x_org_id,x_document_num,x_agent_name,x_vendor_id,x_vendor_site_id,x_ship_to_location,x_bill_to_location,x_creation_date,new_isbn,new_print_key,new_unit_setup_cost,new_unit_run_cost,x_item,x_category_id,x_item_description,x_unit_of_measure,x_quantity,x_unit_price,x_ship_to_org_id,x_promise_date,x_qty_rcv_tolerance, x_deliver_to_location,x_destination_org_id, x_destination_subinventory,x_segment2,x_segment4);
                              COMMIT;
FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id,201);
v_po_req_id := apps.fnd_request.submit_request('PO','POXPOPDOI',NULL,NULL,NULL,
                              NULL,'STANDARD',NULL,'Y',NULL,'APPROVED',NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
                              DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_po_req_id);
                              IF v_po_req_id <> 0 THEN
                                   dbms_lock.sleep(60);
                                   dbms_output.Put_line('Sleep executed');
                                   COMMIT;
                                   select PHASE_CODE,STATUS_CODE INTO v_phase_code,v_status_code
                                   FROM FND_CONCURRENT_REQUESTS
                                   WHERE REQUEST_ID = v_po_req_id;
                                   dbms_output.put_line('After commit Phase and status codes are = '||v_phase_code || v_status_code);
                              ELSE
                                   ROLLBACK;
                              END IF;
                              dbms_output.put_line('New Po is' || x_document_num);
                              dbms_output.put_line('Quantity Is'|| x_quantity);
                              apps.receive_po(x_document_num,x_quantity);
                              v_rcv_req_id := apps.fnd_request.submit_request('PO','RVCTP',NULL,NULL,NULL,
                              'BATCH',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                              NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
                              DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_rcv_req_id);
                              IF v_rcv_req_id <> 0 THEN
                                   COMMIT;
                                   DBMS_OUTPUT.PUT_LINE('COMMITED RECEIVING');
                              ELSE
                                   ROLLBACK;
                              END IF;
Presently when this block runs, i can see the new PO number created. Commit is also successfully executed. The last output for the program is
New Po is 20651
Quantity Is 450
But due to some reason, the receiving program(receive_po) cannot retrieve the same PO from the base table.
But once this pl/sql block is complete, and i call the receving procedure from a different session, the Po is retrieved and receiving against the PO is executed successfully.
Can someone please suggest a work around ? Is the code missing something ? Since POXPOPDOI is a concurrent program which is executed as an asyncronous process, the commit statement after the call to concurent program does not work but the commit is executed only after it exits the pl/sql block.

Thanks for responding.
receive_po() program just inserts the data into RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE tables based on the PO that is created in the previous step. So basically the new PO created has to be received and the receive_po() just inserts data into the interface tables so that RVCTP can be called after that for receiving.
Here is the code for the procedure.
SET SERVEROUTPUT ON;
--FND_GLOBAL.APPS_INITIALIZE(3,20707,201);
--Procedure for receiving interface to load data to RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE
CREATE OR REPLACE PROCEDURE receive_po (x_ponum IN VARCHAR2,x_quantity IN NUMBER) AS
v_vendor_site_id NUMBER;
v_vendor_id NUMBER;
v_agent_id NUMBER;
v_ship_to_organization_id NUMBER;
v_item_id NUMBER;
v_uom_code varchar2(25);
v_subinventory varchar2(25);
v_ship_to_location_id NUMBER;
BEGIN
--header information in variables
dbms_output.put_line('Entering Receiving Insert Procedure');
dbms_output.put_line('Po number ='||x_ponum||'$');
dbms_output.put_line('Quantity is ='||x_quantity||'$');
select pvsa.vendor_site_id into v_vendor_site_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor Site ID is' ||v_vendor_site_id);
select pv.vendor_id into v_vendor_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor ID is' ||v_vendor_id);
select plla.SHIP_TO_ORGANIZATION_ID into v_ship_to_organization_id
from PO_HEADERS_ALL pha, PO_LINE_LOCATIONS_ALL plla
where pha.PO_HEADER_ID = plla.PO_HEADER_ID
and pha.segment1 = x_ponum;
dbms_output.put_line('Ship to org is' ||v_ship_to_organization_id);
select agent_id into v_agent_id
FROM po_headers_all
WHERE segment1 = x_ponum;
dbms_output.put_line('Agent ID is' ||v_agent_id);
--printing header table information
dbms_output.put_line('vendor id is:'||v_vendor_id);
dbms_output.put_line('vendor site id is:'||v_vendor_site_id);
dbms_output.put_line('agent id is:'||v_agent_id);
dbms_output.put_line('ship to organization id is:'||v_ship_to_organization_id);
--line information in variables
--derive item id
select pla.item_id into v_item_id
from po_headers_all pha, po_lines_all pla
where pha.po_header_id = pla.po_header_id
and pha.org_id = pla.org_id
and pha.segment1 = x_ponum;
--derive uom
select pla.unit_meas_lookup_code into v_uom_code
from po_headers_all pha, po_lines_all pla
where pla.po_header_id = pha.po_header_id
and pla.org_id = pha.org_id
and pha.segment1 = x_ponum;
--derive subinventory
select pda.destination_subinventory into v_subinventory
from po_headers_all pha, po_lines_all pla,po_distributions_all pda
where pha.po_header_id = pla.po_header_id
and pla.po_header_id = pda.po_header_id
and pla.po_line_id = pda.po_line_id
and pha.org_id = pla.org_id
and pla.org_id = pda.org_id
and pha.segment1 = x_ponum;
--derive ship to location id
select ship_to_location_id into v_ship_to_location_id
from po_headers_all
where segment1 = x_ponum;
--printing transaction table details
dbms_output.put_line('item id is:'||v_item_id);
dbms_output.put_line('UOM is:'||v_uom_code);
dbms_output.put_line('subinventory is:'||v_subinventory);
dbms_output.put_line('ship to location id is:'||v_ship_to_location_id);
--insert data into the receiving interface header table
INSERT INTO RCV_HEADERS_INTERFACE
HEADER_INTERFACE_ID          ,
GROUP_ID               ,
PROCESSING_STATUS_CODE      ,
RECEIPT_SOURCE_CODE          ,
TRANSACTION_TYPE          ,
LAST_UPDATE_DATE          ,
LAST_UPDATED_BY          ,
LAST_UPDATE_LOGIN,
CREATION_DATE               ,
CREATED_BY               ,
VENDOR_ID               ,
VENDOR_SITE_ID               ,
SHIP_TO_ORGANIZATION_ID ,
EXPECTED_RECEIPT_DATE          ,
EMPLOYEE_ID               ,
VALIDATION_FLAG          
SELECT
RCV_HEADERS_INTERFACE_S.NEXTVAL,
RCV_INTERFACE_GROUPS_S.NEXTVAL,
'PENDING',
'VENDOR',
'NEW', -- 'CANCEL',
sysdate,
3,
3,
sysdate,
3,
v_vendor_id,
v_vendor_site_id,
v_ship_to_organization_id,
sysdate+5,
v_agent_id,
'Y'
FROM DUAL;
commit;
--insert data into the interface transaction table
for i in 1..1 loop
INSERT INTO RCV_TRANSACTIONS_INTERFACE
(INTERFACE_TRANSACTION_ID     ,
HEADER_INTERFACE_ID     ,
GROUP_ID               ,
LAST_UPDATE_DATE          ,
LAST_UPDATED_BY          ,
CREATION_DATE               ,
CREATED_BY               ,
LAST_UPDATE_LOGIN,
TRANSACTION_TYPE          ,
TRANSACTION_DATE          ,
PROCESSING_STATUS_CODE      ,
PROCESSING_MODE_CODE          ,
TRANSACTION_STATUS_CODE     ,
QUANTITY               ,
UNIT_OF_MEASURE          ,
ITEM_ID ,
AUTO_TRANSACT_CODE          ,
RECEIPT_SOURCE_CODE          ,
SOURCE_DOCUMENT_CODE          ,
SUBINVENTORY               ,
DOCUMENT_NUM               ,
SHIP_TO_LOCATION_ID           ,
VALIDATION_FLAG
SELECT
RCV_TRANSACTIONS_INTERFACE_S.NEXTVAL,
RCV_HEADERS_INTERFACE_S.CURRVAL,
RCV_INTERFACE_GROUPS_S.CURRVAL,
SYSDATE,
3,
SYSDATE,
3,
3,
'RECEIVE', --'RECEIVE', -- 'SHIP', --'06-JAN-1998',--question here
sysdate,
'PENDING',
'BATCH',
'PENDING',
x_quantity,
v_uom_code,
v_item_id,
'DELIVER', -- 'RECEIVE', --'DELIVER',
'VENDOR',
'PO',
v_subinventory,
x_ponum,
v_ship_to_location_id,
'Y'
FROM DUAL;
end loop;
commit;
END receive_po;
I am really stuck and looking out for work arond. Please help.
Thanks,
Natasha

Similar Messages

  • Pass input value to a concurrent program of type PL/SQL procedure

    Hi,
    I have created an executable program which is based on "PL/SQL Stored Procedure" method and created a concurrent program which calls this executable. It is available from SRS.
    The relevant stored procedure requires an input variable as parameter.
    How can I pass this parameter when calling the concurrent program from SRS? I tried to follow the same logic as when passing parameters while calling SRS based on "Oracle reports", so create a new parameter, but "token" field is disabled.
    Please help me which is the trick here.
    Thank you.

    Pl see these MOS Docs
    73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
    1016543.102 - Custom Stored Procedure Run as Concurrent Request Fails w/ PLS-306 AND ORA-6550
    HTH
    Srini

  • How to call a concurrent program from a Custom JSP page.

    Hi,
    I have a custom JSP page which i have deployed by creating a form function with the path of the JSP Page
    and added the JSP Page to the OA_HTML top.
    Now, i need to call a concurrent program from the JSP Page, i have all the parameters in my page and i am using the standard class as below:
    ConcurrentRequest cr= new ConcurrentRequest(con);
    int requestId= cr.submitRequest("XXINV",programName,null,null,false,vec);
    I have verified my connection object and it is OK but i am getting the exception that user is not set to run the program.
    I tried the below code in my JSP page and getting -1 for all test variables :-
    int userId = wctx.getUserId();
    int respApplId = wctx.getRespApplId();
    int respId = wctx.getRespId();
    I think i need to set the context in JSP page to run the program..
    Pls help ....
    Regards
    Saurabh Jaiswal

    Hi,
    Thanks for the reply,,,
    This is a possible solution but this will allow to run the program anyhow.
    But the procedure which i call thru callable statement will start with
    fnd_global.apps_initialize (3825, 50603, 704);
    fnd_request.submit_request API call.
    Now, the values of user and Responsibilty is required in the program and it changes.
    With this approach we have to hardcode the user and resp.
    The same JSP page is attached to other responsibilities and there the concurrent program would get fired as if fired from the resp Id hardcoded as above.
    Need to capture user Id and RespId.
    How can i set the apps Context in JSP page???
    Regards
    Saurabh Jaiswal

  • How to call a concurrent program with some parameters in a stored procedure

    Hi All,
    I have made two procedures, xx_nidhi_proc1 and xx_nidhi_proc2.
    xx_nidhi_proc1 takes four parameters from front end and is registered as concurrent program in oracle apps and running fine alone.
    xx_nidhi_proc2 calls the concurrent program of xx_nidhi_proc1 which is XX_NIDS_PROC1_PROG1.
    But the problem in my code is , It runs the second concurrent program for xx_nidhi_proc2 but shows the Inactive- No Manager status for my first concurrent program XX_NIDS_PROC1_PROG1,
    Please find out the error in my code...
    CREATE OR REPLACE PACKAGE BODY NIDHI IS
    procedure xx_nidhi_proc1 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2,
    name_t varchar2,
    empno varchar2,
    doj date,
    desig varchar2) is
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Name:'||name_t);
    fnd_file.PUT_LINE(Fnd_File.output, 'Number:'||empno);
    fnd_file.PUT_LINE(Fnd_File.output, 'DOJ:'|| to_char(doj, 'DD-MON-RRRR'));
    fnd_file.PUT_LINE(Fnd_File.output, 'Designation:'||desig);
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc1;
    --calls the xx_nidhi_proc1 as concurrent program.
    procedure xx_nidhi_proc21 (errbuf OUT VARCHAR2,
    retcode OUT VARCHAR2)
    is
    v_request_id number;
    begin
    fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
    fnd_file.PUT_LINE(Fnd_File.output, 'Deptartment Number:'||'Computer');
    fnd_file.PUT_LINE(Fnd_File.output, 'Location:'||'TCS Towers');
    fnd_file.PUT_LINE(fnd_file.output,'Starting XX_NIDS_PROC1_PROG1');
    fnd_global.apps_initialize(user_id => 1318 ,resp_id => 50578, resp_appl_id => 201);
    v_request_id := FND_REQUEST.SUBMIT_REQUEST('PO',
    'XX_NIDS_PROC1_PROG1',
    null,
    null,
    TRUE,
    'Nidhi gupta',
    138609,
    '12-Dec-2003',
    'ASE');
    commit;
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'Request ID is '||to_char(v_request_id));
    fnd_file.PUT_LINE(fnd_file.OUTPUT,'End XX_NIDS_PROC1_PROG1');
    fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
    errbuf:='SUCCESS';
    retcode:='SUCCESS';
    end xx_nidhi_proc21;
    Thanks
    Nidhi
    END NIDHI;

    Nidhi this might help u
    v_num_request_load_id :=
    fnd_request.submit_request (c_chr_application_short_name,
    c_chr_apl_short_name,
    NULL,
    NULL,
    FALSE,
    p_chr_allocation_view,
    p_chr_flow_type,     
    p_chr_operating_unit,
    p_dte_planned_from,          
    p_dte_planned_to,
    p_num_application_id,
    p_num_loc_seg1_id,
    p_num_loc_seg2_id,
    p_num_organization_id,
    p_num_responsibility_id,
    p_num_session_id,
    p_num_user_id,
    p_chr_arrival_status,
    p_chr_statuses,
    p_chr_locations,
    p_chr_transport_unit
    COMMIT;
    IF v_num_request_load_id = 0
    THEN
              o_num_stat := 2;
         o_chr_err_msg := 'Report could not be submitted';
    END IF;
              o_chr_err_msg := 'Request Id :' || v_num_request_load_id;
              v_boo_wait :=
         fnd_concurrent.wait_for_request (v_num_request_load_id,
    c_num_interval,
    c_num_max_wait,
    v_chr_phase,
    v_chr_status,
    v_chr_dev_phase,
    v_chr_dev_status,
    v_chr_err_buf
    IF v_chr_dev_phase = 'COMPLETE' /* 1.1 */
    THEN
    IF v_chr_dev_status = 'NORMAL' /* 1.2 */
    THEN
    BEGIN
    -- some your own logic
    EXCEPTION
    WHEN OTHERS THEN
         o_chr_err_msg := o_chr_err_msg||' Unable to determine Report File Path.';
                   o_num_stat := 2;
    END;
    ELSIF v_chr_dev_status = 'WARNING'                                             /* 1.2 */
    THEN
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Warning.';
    ELSE                                                                                               /* 1.2 */
    o_chr_err_msg := o_chr_err_msg||' Report program completed with Error.';
    END IF; /* 1.2 */
    ELSE /* 1.1 */
    o_chr_err_msg := 'Report program Timed Out.';
    END IF; /* 1.1 */

  • Is it possible to call a windows batch file from PL/SQL block ??

    Hi gurus,
    Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
    Regards
    Vijay

    You didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
    Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

  • SQL file does not open in Mac with SQL Developer

    Hi,
    I have my .sql extension files in mac associated with SQL Developer, but when I open the file SQL Developer does not start; nothing happens.
    I checked all the associations and it seems correct.
    Any suggestion?
    Thanks,
    A.Tarquino
    Edited by: aftarquino on Oct 5, 2010 3:48 PM
    Anyone???

    Hi Mike,
    I can provide solution if you can tell me the registry value(HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command). I believe there is an extra %1 which is causing this.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Let me see if I can get my IT guys to temporarily grant me registry access.  As I said above, it's locked down, but maybe if I ask
    reeeeally nicely :-)  I will keep you posted.  Thanks!
    EDIT: The IT gods have smiled on me.  The value for the key above is "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde
    Not sure if that helps, but there you go.  Thanks! 
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Replying to myself in case in-place edits don't trigger a "somebody updated this thread" email.  :-)
    Mike Loux
    Certified Practicing Geek
    mike dot loux at gmail dot com
    Hey Mike,
    Actually edit didnot trigger the email :)
    Change that to
    "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" %1 /dde
    (add %1 and that should fix this forever)
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq

  • Connection failed: SQLState:'01000' SQL Server Error:67 [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). Connection failed: SQLState:'08001' SQL Server Error:17 [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist o

    Help,
    setup a new sql server 2012 on a windows 2012r2 server to replace old sql server 2005 on an old windows server 2003 machine.  When i test the ODBC connection locally on the server it works fine, however when i try to connect via windows 7 client machine
    i get the following error:
    Connection failed:
    SQLState:'01000'
    SQL Server Error:67
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
    (Connect()).
    Connection failed:
    SQLState:'08001'
    SQL Server Error:17
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied
    I think it must be a permissions thing, I've turned off the firewall for now and still no difference, 've also made sure remote connection is enabled.  I can connect to the other sql server in studio manager on the new machine however, i can't go do
    the same in the old server, says:
    cannot connect to hbfsqlpro1\hbfsqlpro1
    Additonal information a network related or instance specifc error occured while establising a connection to SQL server.  The server was not found or was not accessible.  Verify that the instance name is correct and that SQL server is configured to
    allow remote connections. (provider:SQL Network Interfaces, error 26 - error locationg server/instance specified) (Microsoft SQL server)
    the instance is def correct, as that is what i use to connect locally on the new machine and what it comes up on the studio manager on the new machine.  STarting to pull my hair out somewhat, i'm sure it's something really simple! 

    Hello,
    You are trying to connect to a named instance. Make sure the SQL Server Browser service is started on the SQL Server computer.
    Make sure TCP/IP is enabled.
    http://msdn.microsoft.com/en-us/library/ms191294(v=sql.110).aspx
    Try to disable Windows Firewall or security software on both, SQL Server instance and client computer.
    Test basic connectivity too. Try to ping from the client computer to the SQL Server computer.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SQL Query - The number of columns specified in "SQL Query" does not match t

    I am creating new UDM for tablespace alert, below is my query,however its failing with error
    SQL Query - The number of columns specified in "SQL Query" does not match the value specified in "SQL Query Output"
    I selected Metric type is number
    SQL Query Format : Two columns
    Query:
    SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2)
    used_pct FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    Any clues why i am getting error.

    SQL> SELECT d.tablespace_name,round(((a.bytes - NVL(f.bytes,0))*100/a.maxbytes),2) used_pct
    2 FROM sys.dba_tablespaces d,(select tablespace_name, sum(bytes) bytes, sum(greatest(maxbytes,bytes)) maxbytes from sys.dba_data_files group by tablespace_name) a,(select tablespace_name, sum(bytes) bytes from sys.dba_free_space group by tablespace_name) f
    3 WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+)
    4 AND NOT (d.extent_management = 'LOCAL' AND d.contents = 'TEMPORARY');
    TABLESPACE_NAME USED_PCT
    MGMT_TABLESPACE .82
    SYSAUX 1.52
    UNDOTBS1 .32
    RMAN .02
    CORRUPT_TS 10.63
    USERS 0
    SYSTEM 2.26
    MGMT_ECM_DEPOT_TS .04
    MGMT_AD4J_TS 0

  • Can't Create a Data Source - Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    Hi there,
    I am having a serious issue with The Power BI Data Management Gateway which I am hoping that someone can help me with.
    Basically I am setting a connection between a Power BI demo site and a SQL 2012 Database based on Azure. The Data Management Gateway and is up and running, and Power BI has managed to connect to it successfuly.
    By following the tutorials at
    here I was able to successful create my Data Connection Gateway with a self-signed certificate.
    However, when trying to create the data source I come into problems. The Data Source Manager manages to successfully resolve the hostname, as per the screenshot below:
    Bear in mind that I exposed the require ports in Azure as endpoints and I managed to modify my hosts file on my local machine so I could access the SQL server hosted in Azure using its internal name -- otherwise I would not be able to get this far.
    However the creation of the data source also fails when trying to created it whilst logged in the SQL server in question:
    The Data Source Manager returns the error when using the Microsoft OLE DB Provider for SQL Server:
    Failed to test connection. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
    I tried using the SQL Server Native Client 11.0 instead but I also get an error. This time the error is:
    Failed to test connection. Login timeout expiredA network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.Named Pipes Provider: Could not open a connection to SQL Server [53]. 
    Some considerations
    If I provide an invalid username/password, the Data Source Manager does say that the username and password is incorrect.
    Firewall is turned off in the SQL Server (either way, this error also happens if I try top use the Data Source Manager whilst logged in the SQL Server itself).
    SQL Profiler does not show any attempt of connection.
    The SQL server instance in question is the default one.
    The error happens regardless if I select the option to encrypt connection or not.
    In SQL Configuration manager I can see that all protocols are enabled (TCP/IP, Named Pipes and Shared Memory.
    The Event Viewer does not provide any further errors than the one I have copied in this post.
    I'm at a loss here. Could someone please advise what might I be doing wrong?
    Regards,
    P.

    Here is what I had to do to solve this issue:
    Basically I had to add the MSSQL TCP/IP port as an end-point in Azure. After I did that, then I was able to create the data-source. However, I was only able to authenticate with a SQL account, as any domain account would return me an error saying that the
    domain isn't trusted.
    What puzzles me here is how come the Data Source Manager would inform me that an account username/password was invalid, but it would fail/timeout if I provided valid credentials (!?!?!!?)

  • TestStand Open SQL Statement does not support SQL's ORDER BY clause???

    TestStand 1.0.3
    Windows 2000 SP1
    SQL Server 2000 Personal
    You've got to be kidding me...
    It appears that the built-in TestStand Open SQL Step does NOT support the
    "ORDER BY" clause in the SELECT statement, even though the documentation
    says it does. Is this true?
    I have an Open SQL Statement query:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234)"
    it works fine, returning a correct record count 120 records. If I change
    the Open SQL Statement query simply by adding an ORDER BY clause, such as:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234) ORDER BY [MyField] ASC"
    it returns a record count of zero. I know that "MyField" exists in the
    MyTable table and contains valid data. The
    second query works fine in SQL
    Server Enterprise Manager.
    Am I missing something? Is it true that the TestStand Open SQL Step does
    NOT support the "ORDER BY" clause? If not, what &#$!ing good is it and why
    does the manual state it is supported? Is there any other way using just
    the TestStand steps to order a database recordset on one or more fields?
    Any help would be appreciated.
    Grrrrr....
    Bob Rafuse
    Etec Inc.

    > Bob -
    > The database step types do not do anything special to the SQL command
    > that you give it. The step just passes the command to the ADO
    > provider. I tried a simple query using the step types with the
    > following command,
    >
    > "SELECT UUT_RESULT.* FROM UUT_RESULT WHERE ([UUT_SERIAL_NUMBER] =
    > 12345) ORDER BY [EXECUTION_TIME] ASC"
    >
    > and this return the expected results and the record count parameter
    > was as expected. I tried this on TS 1.0.2 and TS 2.0 with MS Access
    > 2000 and MS SQL Server 7.0. I do not have MS SQL Server 2000 at this
    > time.
    >
    > It would be surprised if the step types are messing something up.
    I've been doing some experimenting over the past couple of days. Simple,
    one-table queries seem to handle the ORDER BY clause fine. Th
    ings seem to
    get messed up when I try multi-table queries with ORDER BY clause with the
    TestStand database steps. I get no errors but the returned record counts
    are always 0 with the ORDER BY and positive without the ORDER BY. The exact
    same queries work fine in Visual Basic/ADO and the SQL Server Query
    Analyzer.
    > Questions:
    > 1. Have you verified whether the data is actually returned even though
    > the record count is zero?
    Hmmm... yes data IS getting returned (at least on the two instances I just
    checked), but the record count is always zero. I was not proceeding with
    processing if the record count was 0.
    Still... I don't know how to loop through the recordset without knowing how
    many records there are an not eventually generate an error by passing EOF.
    Is there another way using the TestStand database steps to determine a) the
    number of records in the recordset or b) when I'm at EOF?
    > 2. Are you using any advanced options on the Opend SQL Statement step
    > type, specifically
    the cursor type set to forward only? Forward only
    > cursors do not allow for record counts.
    Everything on the Advanced tab of the Open SQL Statement step is set to "Use
    Default".
    Bob.

  • Call Blocking does not. Is this just a scam too?

    Verizon call blocking is a useless 'service', dozens of calls come through with no phone number at all on the caller ID, something Verizon specifically states it will NOT DO.  Any ideas?
    Verizon call blocking does not address scammers and money-seekers who have caller ID of "Not-Available' -- honestly my dog could figure out how to block these but Verizon cannot. Besides paying more money to someone else, is there any hope for the people who expected the Verizon service would work?

    Scam no.  A service that needs to be update to the 21th Century, yes.  Still based on early callerid tecnhnology which is easily bypassed by all those so called "telemarketers" .   You should have now trouble with ligitimate callers, but lots of illegal calls come in.

  • [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

    Hi, I've seen questions about this error posted elsewhere but I'm not sure if the same issues applied.
    I'm trying to connect to SQL Server from a VBA macro in excel. I've managed to do this with the code below where my query is return to cells in my active worksheet but for another query I want to run the data to be return is too large for Excel to handle
    and so I'd like to save it as a .csv file but using the second example of my code I get the message "[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied". Since I have access to this database from the first example
    of the code, I assume my conn.ConnectionString line of code is letting me down.
    Can anyone help me please?
    'Code to return data to worksheet'
    Sub macro2()
    With ActiveSheet.ListObjects.Add(SourceType:=0, Source:=Array(Array( _
            "ODBC;DSN=SQLRA - OPENBET;UID=user1;Trusted_Connection=Yes;APP=Microsoft Office 2013;WSID=pdfdf3001;DATABASE=open;Network=DBMSS" _
            ), Array("OCN;Address=SQLRA_DB,55455;ApplicationIntent=READONLY;")), _
            Destination:=Range("$BG$1")).QueryTable
            .CommandText = Array( _
            "select  A.ev_oc_id, B.ev_mkt_id, A.ev_id, D.start_Time, Upper(Replace(A.[desc],'|','')) , A.result, COALESCE(A.sp_num, A.lp_num) , ", _
            "COALESCE(A.sp_Den, A.lp_Den) from open.reporting.tevoc A, open.reporting.tevmkt B, open.reporting.tevocgrp C, open.reporting.tev D ", _
            "where  A.ev_mkt_id = B.ev_mkt_id and B.ev_oc_grp_id = C.ev_oc_grp_id and D.ev_id = A.ev_id and Upper(Replace(D.[desc],'|','')) = 'home' and upper(B.name) = '|today|' and D.ev_type_id in (264, 289) and D.ev_class_id = 49
    and D.start>= '" & Year & "-" & Month & "-" & Day & "'" _
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = True
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .PreserveColumnInfo = True
            .ListObject.DisplayName = "Table_Query_from_SQLRA___OPEN_1"
            .Refresh BackgroundQuery:=False
        End With
    End Sub
    'Code that produces error'
    Sub macro1()
    Dim conn As ADODB.Connection
    Set conn = New ADODB.Connection
    Dim testSQL As String
    Dim qd As DAO.QueryDef
    Dim openbetdb As Database
        conn.ConnectionString = "driver={SQL Server}; server= sqlra_db;uid=user1;APP=Microsoft Office 2013;WSID=pdfdf3001;database=openbet"
        conn.Open
        testSQL = "SELECT * FROM open.reporting.TevType where ev_class_id = 49 and ev_type_id in(289,330,518,13492);"
        Set qd = Db.CreateQueryDef("tmpExport", testSQL)
        DoCmd.TransferText acExportDelim, , "tmpExport", "C:\\export.csv"
    End Sub

    Hello,
    Are you connect to remote SQL Server? If so,
    please make sure the target SQL Server is running and is listening on appropriate protocols. Please take a look at the following article about general steps to troubleshoot
    SQL connectivity issues:
    http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Oracle SQL Developer does not browse Sybase's objects

    I had installed and configured jtds-1.2.5.jar in Oracle SQL Developer for Sysbase connection. Oracle SQL Developer does not browse any objects. Why? Can you please provide a solution?

    Hi,
    Can you provide some more information into what you are experiencing.
    What version of SQL Developer are you using?
    Did you install the jtds jar under the
    Tools > Preferences > Database > Third Party JDBC Driver
    Is the Sybase tab available in the new connection dialog?
    Did you select the default database in the connection dialog?
    Can you run a query against the Sybase database from the SQL Developer worksheet?
    Note that JTDS 1.2 is the only supported version. There maybe issues with other versions.
    Regards,
    Dermot.
    SQL Developer Team

  • SQL Developer does not support Oracle 8i

    Hi,
    I was waiting a tool from Oracle like SQL Developer for a long time, finally it came, but I am a little disapointed, so Why SQL Developer does not support Oracle 8i? Other free tools like SQUIRREL can do it. I also have worked in previous projects using PL/SQL Developer and it works fine...Why a native Oracle tool can not do it?
    I am in a project where we have to upgrade the Oracle database to a newer version, but I cannot have access to the old one...
    I know there are some threads in this forum, and some people can work with 8i with no issues. Can anyone who works with SQL Developer and Oracle 8i please tell me how to do it?
    Thanks,
    --Javier
    Edited by: javierlarota on Dec 9, 2009 5:40 AM
    Edited by: javierlarota on Dec 9, 2009 5:41 AM

    That's what I thought, the issue is more commercial ($$$) than technical. Anyway...I downloaded the version 1.1 but now I am getting an ORA-02248: invalid option for ALTER SESSION error. 00604. 00000 "error occurred at recursive SQL level %s".
    Thanks,
    --Javier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    I using SQL 2000 on Server 2012 in named instance. when i connect locally, it's ok, but when try to connect from network it generates error [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    Hi Sayed Abdul Latif,
    As other post, SQL Server 2000 was out of support since April,2013. You can try to install SQL Server 2005 or later version. In addition, since the issue regards SQL Server Data Access. I will help you post the question in the related forums. It is appropriate
    and more experts will assist you.
    According to your description, you can only connect to SQL Server locally, I recommend you check if the TCP/IP and Named Pipes are enabled in SQL Server Configuration Manager. And the SQL Server is set to allow remote connection. Then restart the SQL Service
    and check if you can connect to SQL Server remotely.
    Additionally, we also need to verify if the SQL Server named instance is in a cluster, and connect to it by using the "servername\instancename" syntax, then you receive the above error message. If yes, you have to hardcode the TCP port or the Named Pipe
    of the SQL Server named instance. For more information, you can review the following article.http://support.microsoft.com/kb/888228/en-us
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

Maybe you are looking for