Determine Service Name in SQL+
I am trying to connect to a different database, on a different server. From what I understand, I need to know the service name. And the service name is made up of databasename.domain.
I can log into both databases in SQL+...but all I have to enter is the ID, Password, and Database. How can I figure out the domain/service name of the database using SQL+?
google tom kyte for this and he might have a solution for your need.
ben
Similar Messages
-
Determining service name and operation name in handler
Hello.
Is there a way to determine the name of the web service and the name of operation being invoked from inside the JAX-RPC handler class?
By the name of the web service I mean the name that was used in its deployment descriptor file.
With axis, I was able to determine service name using 'MessageContext.getTargetService()' and 'MessageContext.getOperation()' .
are there similar ones in weblogic?Using Weblogic v8.1 I was also able to get the port and operation via DefaultMessageContext. However, this no longer works on WebLogic v9.0.
Any idea how to do this in v9? I think I have the Operation Name by using another undocumented API:
weblogic.wsee.ws.server.OperationName (it's a property in the MessageContext). There's also an EndpointReference class that has 'portName' and 'serviceName' but for my server these are always null??
Any ideas? -
Resolve database service name using in SQL
Hi all!
My question is:
Is it possible to resolve database service name (e.g. TNS) from SQL only (without logging into the server with oracle user and execute tnsping)?
I'll give you a bit background about my question:
In DataGuard, if you query v$archive_dest, you can see the SERVICE NAME of the standby database in the STANDBY records. I would like to know what is the real server name and database instance of the standby database.
I don't want to login to the primary server with oracle user (let's say that I can not - it's a program really, not me...).
Let's also say that the only user I have is a read-only user to the database (with grants to all tables and views, but cannot execute privileged DBMS sys packages).
Running "SQL> host tnsping NAME" doesn't do the job, since this is only for SQL plus.
Doe's anyone have any idea? maybe v$ view that contains the TNS resolution (tried to find, no success)? maybe a tnsping alike command/function?
Thanks a lot!
MaayanMaayanB wrote:
I'll explain the reason.
I'm working on an agentless product that connects to databases, storage and hosts, and models them into a small CMDB.
Since my product needs to model the "STANDBY" relationship between primary and standby DataGuard databases - I need to be able to resolve the value of the "DESTINATION" field from "V$ARCHIVE_DEST", where TARGET IN ('STANDBY','REMOTE').
I could login to the server and execute "tnsping DBNAME", but the problem is that when a server has more than one ORACLE_HOME (hence, more than one tnsname.ora file), I need to make sure that the user I'm using to login to the server has all environment variables conigured properly for each database installed on the server (BTW, the unix user is also a "naked" user with no privileges except the sudo's defined for it).
So I assume that the best way to be sure that the environment variables are correctly defined is when I login to the database.
This is the reason I need to resolve service names using SQL.
BTW, the database process somehow uses the Oracle Net Services to resolve the same value when it sends the redo log files to the standby server - and I'd like to resolve it the same way (or other, if not possible). If it uses the sys privileges, and it executes the package that lets you execute something on the server ("tnsping", in this case), and this is the only way it can be done - I need to start thinking on a different way to resolve the problem.What you are missing is that when "the database process somehow uses the Oracle Net Services to resolve the same value when it sends the redo . . ." is that Net services is NOT just resolving the name for the database. It is also handling the actual transport of the files. That name resolution is not passed back to the database.
>
Anyway, I'm not a hacker or something alike, It's just that my product doesn't know how to pick up the phone and dial :) -
Service name from user level through any query
Hi
One of my user want to find the oracle service name through SQL query from user level. This user is not a DBA.
With DBA privs this querry
SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'service_names';
brings the correct result. But user he will not have the access to read the V$PARAMETER table which is part of sys object.
select sys_context('USERENV','SERVICE_NAME') from dual;
SYS_CONTEXT('USERENV','SERVICE_NAME')
SYS$USERS
this query is not giving my the correct result. Is there any way we can grab the service name from user level.
Your cooperation is highly appreciated.
Raoselect sys_context('USERENV','SERVICE_NAME') from dual;You need to note that the result of the above depends on how you connect to the database. If you connect using NET Service, it should give you the SERVICE_NAME.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> show parameters service_name
NAME TYPE VALUE
service_names string testdb
SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
SYS_CONTEXT('USERENV','SERVICE_NAME')
SYS$USERS
SQL> conn sys@testdb as sysdba
Enter password:
Connected.
SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
SYS_CONTEXT('USERENV','SERVICE_NAME')
testdb
SQL> conn scott@testdb
Enter password:
Connected.
SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
SYS_CONTEXT('USERENV','SERVICE_NAME')
testdb
SQL> conn scott
Enter password:
Connected.
SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
SYS_CONTEXT('USERENV','SERVICE_NAME')
SYS$USERS
SQL>
So you need to understand the use of sys_context -
Urgent: Calling web service from PL/SQl fails with XML parsing
Hi,
I am trying to call a web service from PL/SQL (using SOAP protocol and UTL_HTTP built in Package).I am using Oracle 9i .I am calling from pl/sql block invoking web service method created in java.
I am getting the below response object as a SOAP protocol, but i couldn't able to parse the SOAP.
Could you please provide the values of FirstName, LastName and ErrorDescription
declare
request_env varchar2(32767);
v_xml XMLTYPE;
l_user_first_name varchar2(100);
l_user_last_name varchar2(100);
l_error_value varchar2(100);
begin
response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
<axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
<axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
<axis2ns1:ErrorDescription />
</UserInfoObjResponse>
</soapenv:Body>
</soapenv:Envelope>';
dbms_output.put_line('Length of Request:' || length(response_env));
dbms_output.put_line ('Request: ' || response_env);
v_xml := XMLTYPE(response_env);
-- SELECT EXTRACTVALUE(v_xml, '//UserInfoObjResponse/FirstName') INTO l_user_fast_name varchar2(100); FROM DUAL;
dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
dbms_output.put_line ('l_error_value: ' || l_error_value);
end;In Oracle 9i:
SQL> declare
2 response_env varchar2(32767);
3 v_xml XMLTYPE;
4 l_user_first_name varchar2(100);
5 l_user_last_name varchar2(100);
6 l_error_value varchar2(100);
7 begin
8 response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
9 <soapenv:Body>
10 <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
11 <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
12 <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
13 <axis2ns1:ErrorDescription />
14 </UserInfoObjResponse>
15 </soapenv:Body>
16 </soapenv:Envelope>';
17
18 dbms_output.put_line('Length of Request:' || length(response_env));
19 -- dbms_output.put_line ('Request: ' || response_env);
20
21 v_xml := XMLTYPE(response_env);
22
23 select EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()') first_name,
24 EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()') last_name,
25 EXTRACTVALUE(v_xml,'/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescription/text()') error_description
26 into l_user_first_name, l_user_last_name, l_error_value
27 from dual;
28
29 dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
30 dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
31 dbms_output.put_line ('l_error_value: ' || l_error_value);
32 end;
33 /
Length of Request:530
l_user_first_name: First Name Output
l_user_last_name : Last Name Output
l_error_value:
PL/SQL procedure successfully completed.In Oracle 10g:
SQL> declare
2 response_env varchar2(32767);
3 v_xml XMLTYPE;
4 l_user_first_name varchar2(100);
5 l_user_last_name varchar2(100);
6 l_error_value varchar2(100);
7 begin
8 response_env:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
9 <soapenv:Body>
10 <UserInfoObjResponse xmlns:axis2ns1="http://www.test.com/services">
11 <axis2ns1:FirstName >First Name Output</axis2ns1:FirstName>
12 <axis2ns1:LastName>Last Name Output</axis2ns1:LastName>
13 <axis2ns1:ErrorDescription />
14 </UserInfoObjResponse>
15 </soapenv:Body>
16 </soapenv:Envelope>';
17
18 dbms_output.put_line('Length of Request:' || length(response_env));
19 -- dbms_output.put_line ('Request: ' || response_env);
20
21 v_xml := XMLTYPE(response_env);
22
23 select r.*
24 into l_user_first_name, l_user_last_name, l_error_value
25 from XMLTABLE('/' PASSING v_xml
26 COLUMNS
27 first_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:FirstName/text()',
28 last_name varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:LastName/text()',
29 error_description varchar2(30) PATH '/*:Envelope/*:Body/*:UserInfoObjResponse/*:ErrorDescrition/text()'
30 ) r;
31
32 dbms_output.put_line ('l_user_first_name: ' || l_user_first_name);
33 dbms_output.put_line ('l_user_last_name : ' || l_user_last_name);
34 dbms_output.put_line ('l_error_value: ' || l_error_value);
35 end;
36 /
Length of Request:530
l_user_first_name: First Name Output
l_user_last_name : Last Name Output
l_error_value:
PL/SQL procedure successfully completed.Max
http://oracleitalia.wordpress.com
Edited by: Massimo Ruocchio on Feb 14, 2010 11:55 PM
Added the first one. -
How to invoke a Web Service from PL/SQL with Complex Type as input.
Hello,
I am trying to invoke a web service from PL/SQL using the UTL_DBWS package.
The web service expects a complex type as input (defined below):
<xs:complexType name="MsgType">
<xs:sequence>
<xs:element name="sender" type="xs:string"/>
<xs:element name="messageId" type="xs:string"/>
<xs:element name="messageType" type="xs:string"/>
<xs:element name="dateSent" type="xs:date"/>
</xs:sequence>
</xs:complexType>
How to construct input to this in PL/SQL Procedure?
Has any body tried this before?
An exmaple will be helpful.
ThanksDear,
I have read your article, it is useful for me. But I cannot Apply to my case. Please kindly help me. Thank you.
When running, the error occurs:
1:39:31 Execution failed: ORA-20000: soapenv:Server.userException - org.xml.sax.SAXParseException: Attribute name "password" associated with an element type "user" must be followed by the ' = ' character.
My webservice Url: http://abc.com.vn:81/axis/ABC_WS_TEST.jws?wsdl
I make PL/SQL (similiar as your example)
FUNCTION INVOKESENDMT
RETURN VARCHAR2
AS
l_request soap_api.t_request;
l_response soap_api.t_response;
l_return VARCHAR2(32767);
l_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_method VARCHAR2(32767);
l_soap_action VARCHAR2(32767);
l_result_name VARCHAR2(32767);
p_zipcode VARCHAR2(160);
BEGIN
--p_zipcode:='''TEST'' ; ''TEST'';''84912187098'';''84912187098'';''0'';''8118'';''1'';''000001'';''ThuNghiem'';''''';
p_zipcode:='TEST';
-- Set proxy details if no direct net connection.
--UTL_HTTP.set_proxy('myproxy:4480', NULL);
--UTL_HTTP.set_persistent_conn_support(TRUE);
-- Set proxy authentication if necessary.
--soap_api.set_proxy_authentication(p_username => 'TEST',
-- p_password => 'TEST');
l_url := 'http://abc.com.vn:81/axis/ABC_WS_TEST.jws';
l_namespace := 'xmlns="' || l_url || '"';
l_method := 'sendMT';
l_soap_action := l_url || '#sendMT';
l_result_name := 'sendMTResponse';
l_request := soap_api.new_request(p_method => l_method,
p_namespace => l_namespace);
soap_api.add_parameter(p_request => l_request,
p_name => 'user password sender receiver chargedflag servicenumber messagetype messageid textcontent binarycontent',
p_type => 'xsd:string',
p_value => p_zipcode);
l_response := soap_api.invoke(p_request => l_request,
p_url => l_url,
p_action => l_soap_action);
l_return := soap_api.get_return_value(p_response => l_response,
p_name => l_result_name,
p_namespace => l_namespace);
RETURN l_return;
END; -
Creating web service from pl/sql procedure
Hello.
I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
But I have several troubles:
1. All element names have lower case letters.
2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
3. And operation name has tail like "Element".
I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
But for point 3 i have no ideas.
This task is very important for me. Can somebody help me?
JDeveloper 10.1.3.3
Regards,
Alekseyhttp://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
Frank -
Access a web service from pl/sql
I am trying to access a web service from pl/sql. I have downloaded the code from
http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
But when I try to execute the sql, I am getting the following error:
SQL> @local.sql
Package created.
Package body created.
No errors.
BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at "WEB.DEMO_SOAP", line 71
ORA-06512: at "WEB.TIME_SERVICE", line 15
ORA-06512: at line 1
It is failing at:
resp := demo_soap.invoke(req,
'http://www.ripedev.com/webservices/LocalTime.asmx',
'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
But in the examples that I got from downloading source code, site used was:
'http://www.alethea.net/webservices/LocalTime.asmx',
'http://www.alethea.net/webservices/LocalTimeByZipCode');
This site was not accessible. So I changed to the working site as follows, but still I
am getting the above error.
But I can access this site, if I type in the above address in the address bar of IE.
Can any body help?
I have oracle9i client installed on my machine and able to connect to server thru toad and sql plus.
or IF any body refers me to a good website for the topic of "using webservies from pl/sql" that would be great too!Here is the complete code:
time_service:
CREATE OR REPLACE PACKAGE time_service AS
FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2;
END;
CREATE OR REPLACE PACKAGE BODY time_service AS
-- Location of Web service definition
-- http://www.alethea.net/webservices/LocalTime.asmx?WSDL
-- http://www.ripedev.com/webservices/LocalTime.asmx?WSDL
-- http://www.xmethods.com/sd/2001/CurrencyExchangeService.wsdl
--'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode style=document');
FUNCTION get_local_time(zipcode IN VARCHAR2) RETURN VARCHAR2 IS
req demo_soap.request;
resp demo_soap.response;
BEGIN
dbms_output.put_line('before new request..');
req := demo_soap.new_request('LocalTimeByZipCode',
'xmlns="http://ripedev.com/xsd/ZipCodeResults.xsd"');
dbms_output.put_line('before add param..');
demo_soap.add_parameter(req, 'ZipCode', 'xsd:string', zipcode);
dbms_output.put_line('before invoke..');
resp := demo_soap.invoke(req,
'http://www.ripedev.com/webservices/LocalTime.asmx',
'http://ripedev.com/xsd/ZipCodeResults.xsd/LocalTimeByZipCode');
dbms_output.put_line('before return..');
RETURN demo_soap.get_return_value(resp, 'LocalTimeByZipCodeResult',
'xmlns="http://www.ripedev.com/webservices/"');
END;
BEGIN
dbms_output.put_line('inside main time_service..');
END;
show errors
SET serveroutput ON
exec dbms_output.put_line(time_service.get_local_time('94065'));
Here is demo_soap.sql:
Rem
Rem $Header: soapdemo.sql 21-may-2002.13:48:17 rpang Exp $
Rem
Rem soapdemo.sql
Rem
Rem Copyright (c) 2002, Oracle Corporation. All rights reserved.
Rem
Rem NAME
Rem soapdemo.sql - <one-line expansion of the name>
Rem
Rem DESCRIPTION
Rem A PL/SQL demo package for making SOAP RPC calls.
Rem
Rem NOTES
Rem This demo package can only be used in oracle 9ir2. It utilizes 9iR2's
Rem XDB (XMLType and HttpUriType) and 9iR1's enhancements to UTL_HTTP to
Rem make SOAP RPC calls.
Rem
Rem MODIFIED (MM/DD/YY)
Rem rpang 05/21/02 - created
Rem
Rem A PL/SQL demo package that makes a SOAP RPC calls.
Rem
CREATE OR REPLACE PACKAGE demo_soap AS
/* A type to represent a SOAP RPC request */
TYPE request IS RECORD (
method VARCHAR2(256),
namespace VARCHAR2(256),
body VARCHAR2(32767));
/* A type to represent a SOAP RPC response */
TYPE response IS RECORD (
doc xmltype);
* Create a new SOAP RPC request.
FUNCTION new_request(method IN VARCHAR2,
namespace IN VARCHAR2)
RETURN request;
* Add a simple parameter to the SOAP RPC request.
PROCEDURE add_parameter(req IN OUT NOCOPY request,
name IN VARCHAR2,
type IN VARCHAR2,
value IN VARCHAR2);
* Make the SOAP RPC call.
FUNCTION invoke(req IN OUT NOCOPY request,
url IN VARCHAR2,
action IN VARCHAR2) RETURN response;
* Retrieve the sipmle return value of the SOAP RPC call.
FUNCTION get_return_value(resp IN OUT NOCOPY response,
name IN VARCHAR2,
namespace IN VARCHAR2) RETURN VARCHAR2;
END;
show errors
CREATE OR REPLACE PACKAGE BODY demo_soap AS
FUNCTION new_request(method IN VARCHAR2,
namespace IN VARCHAR2)
RETURN request AS
req request;
BEGIN
req.method := method;
req.namespace := namespace;
RETURN req;
END;
PROCEDURE add_parameter(req IN OUT NOCOPY request,
name IN VARCHAR2,
type IN VARCHAR2,
value IN VARCHAR2) AS
BEGIN
req.body := req.body ||
'<'||name||' xsi:type="'||type||'">'||value||'</'||name||'>';
END;
PROCEDURE generate_envelope(req IN OUT NOCOPY request,
env IN OUT NOCOPY VARCHAR2) AS
BEGIN
env := '<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body><'||req.method||' '||req.namespace||'
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'||
req.body||'</'||req.method||'></SOAP-ENV:Body></SOAP-ENV:Envelope>';
END;
PROCEDURE show_envelope(env IN VARCHAR2) AS
i pls_integer;
len pls_integer;
BEGIN
i := 1; len := length(env);
WHILE (i <= len) LOOP
dbms_output.put_line(substr(env, i, 60));
i := i + 60;
END LOOP;
END;
PROCEDURE check_fault(resp IN OUT NOCOPY response) AS
fault_node xmltype;
fault_code VARCHAR2(256);
fault_string VARCHAR2(32767);
BEGIN
fault_node := resp.doc.extract('/soap:Fault',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/');
IF (fault_node IS NOT NULL) THEN
fault_code := fault_node.extract('/soap:Fault/faultcode/child::text()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
fault_string := fault_node.extract('/soap:Fault/faultstring/child::text()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
raise_application_error(-20000, fault_code || ' - ' || fault_string);
END IF;
END;
FUNCTION invoke(req IN OUT NOCOPY request,
url IN VARCHAR2,
action IN VARCHAR2) RETURN response AS
env VARCHAR2(32767);
http_req utl_http.req;
http_resp utl_http.resp;
resp response;
BEGIN
generate_envelope(req, env);
-- show_envelope(env);
http_req := utl_http.begin_request(url, 'POST','HTTP/1.0');
utl_http.set_header(http_req, 'Content-Type', 'text/xml');
utl_http.set_header(http_req, 'Content-Length', length(env));
utl_http.set_header(http_req, 'SOAPAction', action);
utl_http.write_text(http_req, env);
http_resp := utl_http.get_response(http_req);
utl_http.read_text(http_resp, env);
utl_http.end_response(http_resp);
resp.doc := xmltype.createxml(env);
resp.doc := resp.doc.extract('/soap:Envelope/soap:Body/child::node()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
-- show_envelope(resp.doc.getstringval());
check_fault(resp);
RETURN resp;
END;
FUNCTION get_return_value(resp IN OUT NOCOPY response,
name IN VARCHAR2,
namespace IN VARCHAR2) RETURN VARCHAR2 AS
BEGIN
RETURN resp.doc.extract('//'||name||'/child::text()',
namespace).getstringval();
END;
END;
show errors -
Calling BI Publisher Web Service from pl/sql
I am trying to call the BI publisher web service from pl/sql.
I get the following response back
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
<detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">my-obiee</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The bit that concerns me is
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
<faultstring>no SOAPAction header!</faultstring>
The code that I used to call this is
DECLARE
req utl_http.req;
resp utl_http.resp;
value VARCHAR2(1024);
p_data_type varchar2(4000):= 'application/soap+xml;';
p_data_in VARCHAR2(3000) :=
'<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soapenv:Body>
<pub:scheduleReport xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<scheduleRequest>
<deliveryRequest>
<ftpOption>
<ftpServerName>ino-ed-oel2.inoapps.com</ftpServerName>
<ftpUserName>*******</ftpUserName>
<ftpUserPassword>*****</ftpUserPassword>
<remoteFile>/opt/UAT/db/tech_st/11.1.0/employees.pdf</remoteFile>
</ftpOption>
</deliveryRequest>
<reportRequest>
<attributeFormat>pdf</attributeFormat>
<reportAbsolutePath>http://10.100.100.44:9704/xmlpserver/~administrator/XXXXXXX.xdo</reportAbsolutePath>
<parameterNameValues>
<item>
<name>dname</name>
<multiValuesAllowed>false</multiValuesAllowed>
<values>
<item>153002</item>
</values>
</item>
</parameterNameValues>
</reportRequest>
<userJobName>BILL</userJobName>
</scheduleRequest>
<userID>******</userID>
<password>******</password>
</pub:scheduleReport>
</soapenv:Body>
</soapenv:Envelope>';
BEGIN
--utl_http.set_proxy('proxy.my-company.com', 'corp.my-company.com');
req := utl_http.begin_request('http://10.100.100.44:9704/xmlpserver/services/PublicReportService?wsdl', 'POST');
utl_http.set_header(req, 'content-type', p_data_type);
utl_http.set_header(req, 'content-length', length(p_data_in));
utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
utl_http.write_text(req, p_data_in);
resp := utl_http.get_response(req);
dbms_output.put_line ('status code: ' || resp .status_code);
dbms_output.put_line ('reason phrase: ' || resp .reason_phrase);
LOOP
utl_http.read_line(resp, value, TRUE);
dbms_output.put_line(value);
END LOOP;
utl_http.end_response(resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(resp);
END;
Any help would be greatly receivedI had the same problem this morning. You need to add a line to the HTTP header to declare a value for SOAPAction.
You can set this as an empty string, but for some reason it is required.
Try adding this among your header declarations:
utl_http.set_header(req, 'SOAPAction', ''); -
Calling Web Service from PL/SQL (ORA-31011: XML parsing failed)
hi all,
i want to invoke a web service from PL/SQL.
i found a soap_api package from "Tim Hall".
but it gives error in "ealtas.soap_api.invoke function"
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00007: unexpected end-of-file encountered
ORA-06512: at "SYS.XMLTYPE", line 48
ORA-06512: at "EALTAS.SOAP_API", line 135
ORA-06512: at line 44
set scan off;
declare
P_ADRES_WS VARCHAR2(100) := 'http://<host>:<port>/dswsbobje/qaawsservices/biws?wsdl=1&cuid=AVhBxL14I2dDjz8yFoznRLY';
P_ENVELOPE VARCHAR2(32767);
P_FNC VARCHAR2(256) := 'runQueryAsAService';
ol_req ealtas.soap_api.t_request;
ol_resp ealtas.soap_api.t_response;
message varchar2(500);
BEGIN
p_envelope := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:db="DB_SUBS_BUDGET">
<soapenv:Body>
<db:runQueryAsAService>
<db:login>DWH_BO</db:login>
<db:password>Pass1234</db:password>
</db:runQueryAsAService>
</soapenv:Body>
</soapenv:Envelope>
ol_req := ealtas.soap_api.new_request(P_FNC, 'xmlns="'||P_ADRES_WS||'"');
ol_resp := ealtas.soap_api.invoke(ol_req, P_ADRES_WS, p_fnc,P_ENVELOPE);
ealtas.soap_api.show_envelope(p_envelope);
message := ealtas.soap_api.get_return_value(ol_resp, 'Db_Timeid', 'xmlns:m="'||P_ADRES_WS||'"');
DBMS_OUTPUT.PUT_LINE('AAAA -'||message);
end;
thanks.
ealtas.AlexAnd thanks for your help.
ACL is ok.
can you help me about how can i edit this function. i tried many times but i could not do it :( .
web service url : <host>:<port>/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AVhBxL14I2dDjz8yFoznRLY
what must be these variables values ?
l_url :=
l_namespace :=
l_method :=
l_soap_action :=
l_result_name :=
this is the xml;
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="DB_SUBS_BUDGET" xmlns:tns1="dsws.businessobjects.com" targetNamespace="DB_SUBS_BUDGET" xmlns="http://schemas.xmlsoap.org/wsdl/" name="queryasaservice">
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="DB_SUBS_BUDGET">
- <s:element name="runQueryAsAService">
- <s:complexType>
- <s:sequence>
<s:element name="login" type="s:string" />
<s:element name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:complexType name="Row">
- <s:sequence>
<s:element name="Db_Timeid" type="s:string" nillable="true" />
<s:element name="Db_Tariff" type="s:string" nillable="true" />
<s:element name="Grossadds" type="s:double" nillable="true" />
<s:element name="Cancellations" type="s:double" nillable="true" />
<s:element name="Netadds" type="s:double" nillable="true" />
<s:element name="Subs" type="s:double" nillable="true" />
<s:element name="Churn_P" type="s:double" nillable="true" />
</s:sequence>
</s:complexType>
- <s:complexType name="Table">
- <s:sequence>
<s:element name="row" maxOccurs="unbounded" type="s0:Row" />
</s:sequence>
</s:complexType>
- <s:element name="runQueryAsAServiceResponse">
- <s:complexType>
- <s:sequence>
<s:element name="table" type="s0:Table" />
<s:element name="message" type="s:string" />
<s:element name="creatorname" type="s:string" />
<s:element name="creationdate" type="s:dateTime" />
<s:element name="creationdateformated" type="s:string" />
<s:element name="description" type="s:string" />
<s:element name="universe" type="s:string" />
<s:element name="queryruntime" type="s:int" />
<s:element name="fetchedrows" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="QaaWSHeader">
- <s:complexType>
- <s:sequence>
<s:element name="sessionID" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
<s:element name="serializedSession" type="s:string" minOccurs="0" maxOccurs="1" nillable="true" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
- <message name="runQueryAsAServiceSoapIn">
<part name="parameters" element="s0:runQueryAsAService" />
<part name="request_header" element="s0:QaaWSHeader" />
</message>
- <message name="runQueryAsAServiceSoapOut">
<part name="parameters" element="s0:runQueryAsAServiceResponse" />
</message>
- <portType name="QueryAsAServiceSoap">
- <operation name="runQueryAsAService">
<documentation>Get Web Service Provider server info</documentation>
<input message="s0:runQueryAsAServiceSoapIn" />
<output message="s0:runQueryAsAServiceSoapOut" />
</operation>
</portType>
- <binding name="QueryAsAServiceSoap" type="s0:QueryAsAServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <operation name="runQueryAsAService">
<soap:operation soapAction="DB_SUBS_BUDGET/runQueryAsAService" style="document" />
- <input>
- <soap:header message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal">
<soap:headerfault message="s0:runQueryAsAServiceSoapIn" part="request_header" use="literal" />
</soap:header>
<soap:body use="literal" parts="parameters" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="DB_SUBS_BUDGET">
<documentation />
- <port name="QueryAsAServiceSoap" binding="s0:QueryAsAServiceSoap">
<soap:address location="http://<host>:<port>/dswsbobje/qaawsservices/queryasaservice?&cuid=AVhBxL14I2dDjz8yFoznRLY&authType=secEnterprise&locale=en_US&timeout=60&ConvertAnyType=false" />
</port>
</service>
</definitions> -
Errors calling oracle web service from pl/sql
Oracle application server version 10.1.2.2.0
Jdeveloper version 10.1.2.1.0
I have published a function of an oracle database package as a web service using jdeveloper by creating a connection to my database and right clicking on the package and selecting publish as a web service. I accepted all the defaults and deployed the web service to my application server also using jdeveloper. I have been able to invoke the web service from the url which was generated.
I now want to invoke this web service from another pl/sql procedure in the same database as the function I've published as a web service using the utl_dbws facility but get the following error
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: No Deserializer found to deserialize a 'http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS/:p_group_id' using encoding style 'null'. [java.lang.IllegalArgumentException]
I have amended the wsdl to look like this
<?xml version = '1.0' encoding = 'UTF-8'?>
<!--Generated by the Oracle JDeveloper 10g Web Services WSDL Generator-->
<!--Date Created: Tue Sep 29 12:32:20 BST 2009-->
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS/">
<s:element name="totalliveusers">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="p_group_id" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="totalliveusersResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="totalliveusersResult" type="s:int"/>
<s:element minOccurs="0" maxOccurs="1" name="p_group_desc" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="totalliveusersSoapIn">
<wsdl:part name="parameters" element="tns:totalliveusers"/>
</wsdl:message>
<wsdl:message name="totalliveusersSoapOut">
<wsdl:part name="parameters" element="tns:totalliveusersResponse"/>
</wsdl:message>
<wsdl:portType name="totalliveusersSoap">
<wsdl:operation name="totalliveusers">
<wsdl:input message="tns:totalliveusersSoapIn"/>
<wsdl:output message="tns:totalliveusersSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="totalliveusersSoap" type="tns:totalliveusersSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="totalliveusers">
<soap:operation
soapAction="http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS/totalliveusers"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="totalliveusers">
<wsdl:port name="totalliveusersSoap" binding="tns:totalliveusersSoap">
<soap:address location="http://fujibox09/FinalTestWS-Project-context-root/FinalTestWS"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The function has an in varchar2 parameter and an out varchar2 parameter and returns a number
Can anyone help?Hi,
On way we can call a web service is to pass the Web Service URL to UTL_HTTP package:
Sample Web Service URL
===================
lv_url :=
'http://67.97.189.151:8888/plsqlsample/dbfunc?invoke=placeOrder'
|| '&'
|| 'param0=1'
|| '&'
|| 'param1=1'
|| '&'
|| 'param2=1';
Sample Call using UTL_HTTP
=====================
SELECT UTL_HTTP.request (lv_url)
INTO lv_result
FROM DUAL;
Thank you.
Regards,
Balu -
while installing oracle data warehouse builder 10g
i am getting prob such tat
INS0009:Unable to connect to the database with user SYS
java.sql.SQLException:Io exception : could not resolve the connect identifier
OraHome_1\network\ADMIN\SAMPLE\TNSNAMES.ORAhi my problem is in repository assistant IN 2ND STEP
After i enter the
Repository User name sindhu
Repository User Password tiger (As i kept the password of Oracle 10g)
SYSDBA User name SYS
SYSDBA Password tiger (As i kept the password of Oracle 10g)
Host name Local Host
Port number 1521 (default)
Oracle Service name OracleServiceXE
and i am not clicking the SQL* Plus
and clicking on " Next "
then my prob is
INS0009:Unable to connect to the database with the user SYS
java.sql.SQLException : Listener refused the connection with the following error
ORA-12514, TNS: listener dosenot currently know of service requested in connect descriptor
The Connection Descriptor used by the client was
(DESCRIPTION=(ADDRESS=(HOST=LOCALHOST)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=
(SERVICE_NAME=ORACLESERVICEXE)))
hope some one will give me a gud solution
Waiting for ur reply
Sindhu -
Error invoking SSL web service using pl sql UTL_HTTP
Web Services Gurus,
I am invoking a secure web service based on the following WSDL file from a pl/sql program using UTL_HTTP package.
The web service is secure and prompts for authentication.
The web services certificate is imported in Oracle Wallet on Database Server.
I am listing the WSDL file, the pl/sql code and error message as follows -
1. The WSDL file -
<definitions
name="Webservice"
targetNamespace="http://webservice.airclic.com/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://webservice.airclic.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<types>
<xs:schema targetNamespace="http://webservice.airclic.com/" version="1.0" xmlns:tns="http://webservice.airclic.com/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Exception" type="tns:Exception"/>
<xs:element name="sendAuthenticationResponse" type="tns:sendAuthenticationResponse"/>
<xs:element name="sendAuthenticationResponseResponse" type="tns:sendAuthenticationResponseResponse"/>
<xs:complexType name="AuthenticationResponse">
<xs:complexContent>
<xs:extension base="tns:Response">
<xs:sequence>
<xs:element name="success" type="xs:boolean"/>
<xs:element name="username" type="xs:string"/>
<xs:element minOccurs="0" name="password" type="xs:string"/>
<xs:element minOccurs="0" name="firstName" type="xs:string"/>
<xs:element minOccurs="0" name="lastName" type="xs:string"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element minOccurs="0" name="active" type="xs:boolean"/>
<xs:element minOccurs="0" name="timeZone" type="xs:string"/>
<xs:element minOccurs="0" name="group" type="xs:string"/>
<xs:element minOccurs="0" name="role" type="xs:string"/>
<xs:element minOccurs="0" name="errorCode" type="xs:string"/>
<xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DispatchEvent"></xs:complexType>
<xs:complexType name="sendAuthenticationResponse">
<xs:sequence>
<xs:element minOccurs="0" name="authenticationResponse" type="tns:AuthenticationResponse"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendAuthenticationResponseResponse">
<xs:sequence/>
</xs:complexType>
<xs:simpleType name="status"></xs:simpleType>
<xs:simpleType name="source"></xs:simpleType>
<xs:simpleType name="eventType"></xs:simpleType>
</xs:schema>
</types>
<message name="Webservice_sendAuthenticationResponse">
<part name="sendAuthenticationResponse" element="tns:sendAuthenticationResponse"/>
</message>
<message name="Webservice_sendAuthenticationResponseResponse">
<part name="sendAuthenticationResponseResponse" element="tns:sendAuthenticationResponseResponse"/>
</message>
<portType name="Webservice">
<operation name="sendAuthenticationResponse" parameterOrder="sendAuthenticationResponse">
<input message="tns:Webservice_sendAuthenticationResponse"/>
<output message="tns:Webservice_sendAuthenticationResponseResponse"/>
<fault name="Exception" message="tns:Exception"/>
</operation>
</portType>
<binding name="WebserviceBinding" type="tns:Webservice">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sendAuthenticationResponse">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
</binding>
<service name="Webservice">
<port name="WebservicePort" binding="tns:WebserviceBinding">
<soap:address location="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice"/>
</port>
</service>
</definitions>
2. The pl/sql code that calls the web service operation sendAuthenticationResponse
procedure send_auth_response
as
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
i integer;
begin
-- initiate wallet for AirClic certificate
dbms_output.put_line ('1');
utl_http.set_wallet('file:/etc/oracle/wallet','<wallet password>');
-- create soap request
dbms_output.put_line ('2');
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:sendAuthenticationResponse xmlns="https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<success xsi:type="xsd:boolean">true</success>
<username xsi:type="xsd:string">changlanih</username>
<password xsi:type="xsd:string">abcd1234</password>
<firstName xsi:type="xsd:string">hero</firstName>
<lastName xsi:type="xsd:string">changlani</lastName>
<email xsi:type="xsd:string">[email protected]</email>
<active xsi:type="xsd:boolean">true</active>
<timeZone xsi:type="xsd:string">eastern</timeZone>
<group xsi:type="xsd:string">Northeast</group>
<role xsi:type="xsd:string">Service Manager</role>
<errorCode xsi:type="xsd:string"></errorCode>
<errorMessage xsi:type="xsd:string"></errorMessage>
</ns1:sendAuthenticationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
-- request that exceptions are raised for error Status Codes
dbms_output.put_line ('3');
utl_http.set_response_error_check (true);
-- allow testing for exceptions like UTL_HTTP.http_server_error
dbms_output.put_line ('4');
utl_http.set_detailed_excp_support (true);
--utl_http.set_transfer_timeout (ln_time_out);
dbms_output.put_line ('5');
utl_http.set_body_charset ('UTF-8');
-- begin request
dbms_output.put_line ('5.5');
http_req:= utl_http.begin_request
('https://host.airclic.com:443/webservice/product/fieldservice/v1/Webservice/sendAuthenticationResponse', ------ is the url correct here ?
'POST',
'HTTP/1.1'
dbms_output.put_line ('6');
utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>');
dbms_output.put_line ('7');
utl_http.set_persistent_conn_support (http_req, false);
dbms_output.put_line ('8');
utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
dbms_output.put_line ('9');
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
dbms_output.put_line ('10');
utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
dbms_output.put_line ('11');
utl_http.write_text(http_req, soap_request);
dbms_output.put_line ('12');
http_resp := utl_http.get_response(http_req);
-- debug messages
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
utl_http.read_text(http_resp, soap_respond);
dbms_output.put_line ('13');
utl_http.end_response(http_resp);
dbms_output.put_line ('14');
resp := XMLType.createXML(soap_respond);
dbms_output.put_line ('15');
resp := resp.extract('/soap:Envelop/soap:Body/child::node()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"');
i:=0;
dbms_output.put_line ('16');
loop
dbms_output.put_line(substr(soap_respond, 1 + i * 255, 250));
i := i + 1;
if (i * 250) > length(soap_respond) then
exit;
end if;
end loop;
exception
when utl_http.request_failed then
dbms_output.put_line('request failed: ' || utl_http.get_detailed_sqlerrm);
when utl_http.http_server_error then
dbms_output.put_line('server error: ' || utl_http.get_detailed_sqlerrm);
when utl_http.http_client_error then
dbms_output.put_line('client error: ' || utl_http.get_detailed_sqlerrm);
when others then
dbms_output.put_line(sqlerrm);
end send_auth_response;
3. Output when I run the send_auth_response procedure
Connecting to the database cpdev.
1
2
3
4
5
5.5
ORA-12560: TNS:protocol adapter error
Process exited.
Disconnecting from the database cpdev.
Comments -
The web service operation only has input message. The input message consists of a complex type as seen in WSDL.
Questions -
1. This is my first attempt in invoking a web service from pl/sql program. Is the code in SOAP body correct as mapped to the complex type in WSDL ?
2. As seen from the dbms_out - the last message before ORA-12560 is 5.5, that means the call is erroring at following code line -
http_req:= utl_http.begin_request ------ what am I doing wrong here ?
3. The web service is SSL as seen from WSDLand needs a username/password for access - which is being performed by following code line -
utl_http.set_authentication(http_req, '<username for webservice>', '<password for webservice user>'); ------- is that correct ?
4. I am not using any proxy server - should I be using it ? When is it necessary to use proxy ?
Appreciate any help.
Thanx.Oracle is hosted by HOST A - this is where the pl/sql program resides.
The Web Service being accessed by pl/sql program is hosted by HOST B and there are 4 firewalls in between.
Oracle was not even able to establish connection to web services host.
Escalated the issue with networking folks and they resolved the connectivity problem.
Hope that helps. -
Hello,
I am trying to install Microsoft SQL Server 2008 R2. I get the error bellow (Database Services Engine Failed, SQL Server Replication Failed, Full Text Search Failed, Reporting Services Failed). I already have a copy of SQL Server 2008 R2 on the machine.
I want to create a new named instance of SQL Server for some software I'm installing.
The error is below.
Any help would be much appreciated, thanks!
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Exit code (Decimal): -595541211
Exit facility code: 1152
Exit error code: 49957
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Start time: 2014-02-06 09:14:09
End time: 2014-02-06 11:18:16
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Exception help link: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.2500.0%26EvtType%3d0x44D4F75E%400xDC80C325
Machine Properties:
Machine name: BAHPBZ52TY
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Database Engine Services
1033 Express Edition 10.50.1600.1 No
Sql Server 2008 R2
Management Tools - Basic 1033 Express Edition
10.50.1600.1 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
Installation location: c:\c7ced2c86d6b9813b28186cc831c2054\x64\setup\
Installation edition: EXPRESS_ADVANCED
Slipstream: True
SP Level 1
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: True
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE:
CUSOURCE:
ENABLERANU: True
ENU: True
ERRORREPORTING: False
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: SQLENGINE,REPLICATION,FULLTEXT,RS,SSMS,SNAC_SDK,OCS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: NT AUTHORITY\LOCAL SERVICE
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: c:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: c:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: aedt2bSQL
INSTANCENAME: AEDT2BSQL
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE: c:\c7ced2c86d6b9813b28186cc831c2054\PCUSOURCE
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: DefaultNativeMode
RSSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: BAH\568385
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: False
TCPENABLED: 0
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: SQL Client Connectivity SDK
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Full-Text Search
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Reporting Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Management Tools - Basic
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: Microsoft Sync Framework
Status: Passed
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\SystemConfigurationCheck_Report.htmHello,
If you see error descriptioon it gives access denied so basically it is because of some access issue.I guess You must be using some domin account for installation make sure it is added as local administrator also instead of using NT Authority network
service as SQL server service account use local system account .
Below link would help
http://serverfault.com/questions/212135/access-is-denied-error-installing-sql-server-2008-on-windows-7
You can also browse to setup.exe file and RK on it and select run as administrator
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
How to connect to Oracle 11g using thin driver with service name & SID
Hi Experts,
Wish to know whether there is a common way to connect to Oracle 11g server using SID or service name.
Earlier I used jdbc:oracle:thin:@<<server>:<<port>>:<<SID>> for connecting to individual Oracle server instances.
Now I need to connect to Oracle RAC which provides service names. So I need to use jdbc:oracle:thin:@<<server>:<<port>>/<<service name>>.
This connection string is internally constructed by a program and user inputs <<server>>, <<port>> and <<SID>> or <<Service Name>>. Now this requires two different connection strings based on the input whether its SID or service name.
Is there a common connection string for these two? Based on some articles like this, I understood that we can generically use jdbc:oracle:thin:@<<server>:<<port>>/<<service>>, whether for SID and service.
When I tried this format with SID, I am getting the below error. What I tried is jdbc:oracle:thin:@myoracleserver:1521/ORCL, where ORCL is the SID
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
Request your help in solving this. What I want is a single connection string whether its SID or service. Any help is of great value.
Regards
SunilWish to know whether there is a common way to connect to Oracle 11g server using SID or service name.
Earlier I used jdbc:oracle:thin:@<<server>:<<port>>:<<SID>> for connecting to individual Oracle server instances.
Now I need to connect to Oracle RAC which provides service names. So I need to use jdbc:oracle:thin:@<<server>:<<port>>/<<service name>>.
This connection string is internally constructed by a program and user inputs <<server>>, <<port>> and <<SID>> or <<Service Name>>. Now this requires two different connection strings based on the input whether its SID or service name.
Is there a common connection string for these two? Based on some articles like this, I understood that we can generically use jdbc:oracle:thin:@<<server>:<<port>>/<<service>>, whether for SID and service.
When I tried this format with SID, I am getting the below error. What I tried is jdbc:oracle:thin:@myoracleserver:1521/ORCL, where ORCL is the SID
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
Request your help in solving this. What I want is a single connection string whether its SID or service. Any help is of great value.
Oracle has an entire book for JDBC: The JDBC Developer Guide.
There are chapters that provide ALL of the connection properties and the rules for creating connection urls.
http://docs.oracle.com/cd/E11882_01/java.112/e16548/urls.htm#BEIDBFDF
See table 8-3 in that doc
Maybe you are looking for
-
How do I best share all photos on one iMac with two user accounts?
I recently bought an iMac and Aperture. I am converting from a windows-based platform. My immediate pain point is the ability to share one library in Aperture under both my account and my wife's user account(like we do our iTunes, for example). We wo
-
Hi All, I have created a module pool pgm and in that i have created a selection screen 200. With in the pgm am calling a standard transaction by skipping the first screen and passing all the selection inputs through my selection i.e it will display d
-
Since I upgraded to Leopard on my Mini I no longer can get an X11 terminal to surface. As a consequence I can't run Open Office either. ps -A | grep X11 results in an indication that there is a terminal but it isn't visible. What's not happening? I d
-
How many of you guys make use of pre-fader metering? Is it recommended? I noticed that as soon as I turned it on a lot of my channels clipped and that I actually had to sort that out internally with a lot of the AU instruments, like RMX. Let me hear
-
My current Canon Pixma MX850 printer just died. I'm looking for an All-in-One, preferably Canon, printer that is compatible with Yosemite version 10.10 and Windows 7. I have spent this weekend researching with no matches. They all cover v.10.9 but n