How to use the default database service name on creating procedure for data

how to use the default database service name on creating procedure for datagaurd client failover ??? all oracle doc says create a new service as below and enable at DB startup. but our client is using/wanted database default service to connect from application on the datagaurd environment (rac to non rac setup).please help.
Db name is = prod.
exec DBMS_SERVICE.CREATE_SERVICE (service_name => 'prod',network_name =>'prod',failover_method => 'BASIC',failover_type => 'SELECT',failover_retries => 180,failover_delay => 1);
says already the service available.
CREATE OR REPLACE TRIGGER manage_dgservice after startup on database DECLARE role
VARCHAR(30);BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
IF role = 'NO' THEN DBMS_SERVICE.START_SERVICE('prod');
END IF;
END;
says trigger created, but during a swithover still the service is listeneing on listener.
tns entry.
prod =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = YES)
(ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = prod2)(PORT = 1521)) ---> primary db entry
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = proddr)(PORT = 1521)) --> DR DB entry
(CONNECT_DATA =
(SERVICE_NAME = prod)
thanks in advance.
Edited by: 854393 on Dec 29, 2012 11:52 AM

Hello;
So in the example below replace "ernie" with the alias you want the client to use.
I can show you how I do it :
First an entry need to be added to the client tnsnames.ora that uses a SERVICE_NAME instead of a SID.
ernie =
(DESCRIPTION =
    (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = Primary.host)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = Standby.host)(PORT = 1521))
       (CONNECT_DATA =
       (SERVICE_NAME = ernie)
)Next the service 'ernie' needs to be created manually on the primary database.
BEGIN
   DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
END;
/After creating the service needs to be manually started.
BEGIN
   DBMS_SERVICE.START_SERVICE('ernie');
END;
/Several of the default parameters can now be set for 'ernie'.
BEGIN
   DBMS_SERVICE.MODIFY_SERVICE
   ('ernie',
   FAILOVER_METHOD => 'BASIC',
   FAILOVER_TYPE => 'SELECT',
   FAILOVER_RETRIES => 200,
   FAILOVER_DELAY => 1);
END;
/Finally a database STARTUP trigger should be created to ensures that this service is only offered if the database is primary.
CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
DECLARE
V_ROLE VARCHAR(30);
BEGIN
SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
IF V_ROLE = 'PRIMARY' THEN
DBMS_SERVICE.START_SERVICE('ernie');
ELSE
DBMS_SERVICE.STOP_SERVICE('ernie');
END IF;
END;
/lsnrctl status - should show the new service.
When I do this the Database will still register with the listener. I don't give that to the clients. That one will still be available but nobody knows about it. Meanwhile "ernie" moves with the database role.
So in my example the default just hangs out in the background.
Best Regards
mseberg
Edited by: mseberg on Dec 29, 2012 3:51 PM

Similar Messages

  • How to use the Default sharepoint credential (DefaultNetworkCredentials )in the C#.

    How to use the Default sharepoint credential (DefaultNetworkCredentials )in the C#.
    I am using the copy.asmx web service to upload and download the files from sharepoint Document library to .Net application,how to get the Default sharepoint credential from the .net application?

    Hello,
    YOu can use below line to pass default credential in code: (You can also pass domain,username, password as string if you want)
    clientService.Credentials = System.Net.CredentialCache.DefaultCredentials;
    http://ktskumar.wordpress.com/2009/03/03/upload-document-from-local-machine-to-sharepoint-library/
    http://sharepoint.infoyen.com/2012/02/23/upload-file-in-document-library-with-metadata-inculding-lookup-field-using-sharepoint-web-service/
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • [HTML DB] How to use the existing database table?

    [HTML DB] How to use the existing database table?
    I installed Oracle 10g database in Computer A(Windows 2000), and I already create all the tables with data and the data size is about 300MB.
    In Computer B(Windows 2000), I installed HTML DB 1.6.
    How can I use /get the existing database table (in computer A) for HTML DB?
    Could anyone help me on this? I am newbie and I need some detail instructions. or Where can I find the examples.....
    Thanks

    Well I guess if you wish to retain that architecture, i.e. HTMLDB on one machine and your data on another, you will have to establish database links to access the data. Oracle documentation will describe how to achieve that.

  • How secure is the default web services?

    Just curious how secure the default web services configuration is.
    Would mod_security need to be installed?
    The server would only host 2 sites but I am concerned about basic security.

    Your question is too vague to be answerable.
    Any web server security depends largely on what you're doing.
    If you're just serving static pages then its pretty secure - there isn't much anyone can do to compromise your server.
    If you're running any kind of dynamic content then your security depends on a) the server-side engine you use (e.g. PHP, Java, Ruby, etc.) and b) the competency of whoever's writing your code.
    If you're using any kind of database-driven content then your security also depends on your database engine, and your ability to secure your database.
    The upshot is that the software as delivered is only as good as how you configure and run it. mod_security (if you take the time to configure it) offers some protection, but it doesn't beat taking the time to code your application correctly.

  • How to use the backup database to create report or update testing

    Hi,
    I have a fully backup of production database in the last month, and I have using Oracle 8.1.7. I want to known how can I use
    this backup to generate a new instance so that I can reproduct some report from the last month data or doing some update testing
    from the backup database with the both production instance and last month instance is opened at the same time. I have tried to
    create a new instance by using the oradim and startup the new sid with mount option and then use the alter database function
    to change the datafile name to the new directory. After this i also create the local service name and change to listerner. I can
    startup the new instance but when i start the production database. I got the error that I can open the database with exclusive.
    I do this in Oracle 7.3.4 and it works. But how can i setting it in Oracle 8.1.7. Anyone can help me and many thanks.

    Hi,
    Create the Second instance thro' Database Configuration Assistant, and Replace with Back up files.Now you can run two instances at parallel.

  • How to use Forms Default Database Connection in java class

    When a form based application is started, a connection is made with underlying database. This is the Default (Primay) Database Connection.
    The problem is I have some of my business logic implemented in a java class. In this class I have to make a another connection with the same database. What I want to do is to use the original Database Connection in the java class. In this I may avoid the overhead of reconnection.
    Could anyone pls guide me in this way...

    you can't share the forms connection. Sorry :(

  • How to change the default database charset to ISO8859-1?

    Hi all,
    I have created a table with a nvarchar field to store string, may i now how to change the default NLS charset to ISO88591 charset?
    Thanks in advance.
    chin.

    Thank you!
    I will try later!
    But,who can tell me more detail !
    thx

  • How to change the default servcie port number to be checked for the IPS sig

    Dear
    i have an AIP-SSM (IPS) installed in a an ASA firewall.
    i have configured an access-list in the firewall to forward the traffic coming from the internet toward the internal server to be checked by the IPS module.
    but the case is that the services have to be checked is not the default services port numbers.
    http port is 8081
    oracle port is 2006
    and many other services.
    the question now, is how to change the default service number in the IPS in order to be checked by the corresponding service signatures?
    Thanks

    You would set those as part of the signature variables.
    http://www.cisco.com/en/US/docs/security/ips/6.1/configuration/guide/cli/cli_signature_definitions.html#wp1040009

  • How to add a new database service name to 9iDS

    Hello,
    I installed 9iDS and 9iDB on my laptop which worked fine for few months. I had trouble with 9iDB I/O system so I reinstalled 9iDB with a new SID name. I updated 9iDS by replacing old SID name with new SID name in tnsnames.ora file but it did not work.
    Please someone suggest where should I update in 9iDS to access my newly installed database service with new SID so that forms appication builder can connect properly.
    Currently it is saying :
    ORA-12514: tns listener could not resolve service name given in connect descriptor.
    Thanks,
    [email protected]

    Shyam,
    could it be that you are still starting the old database tnslistener. Please make sure that you start the listener for your new Db instance.
    Frank

  • How to use the JE database with other data types than byte arrays?

    Hi! I searched the javadoc of Berkley DB JE, for a way to introduce entry (but I need also retrieve) data with other type than byte arrays, e.g. String, or anything else, as int may be, etc.
    Still, I didn't find any such way, because the main (only?!) method to entry data into an open database - according what I found in javadoc - is:
    "public OperationStatus put(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException"
    and both this and the corresponding method for retrieves, are based on the same DatabaseEntry type, which allow only entry data on byte[] support.
    What if I need to use Strings or int, or even char? I must do a special conversion from these types, to byte[], to use the database?
    Thank you!

    On the doc page (this is also in the download package),
    http://download.oracle.com/docs/cd/E17277_02/html/index.html
    see:
    Getting Started Guide
    Java Collections Tutorial
    Direct Persistence Layer (DPL)
    All of these describe how to use data types other than byte arrays.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use the bootp_enabled key with dscl command create

    During Netboot service configuration I wanted to do it right and followed the suggestions in "System Imaging and Software Update Administration" (page 22):
    +"To prevent the NetBoot BootP server from responding to+
    +requests for IP addresses, use the dscl command-line tool to open the local folder on the NetBoot server and add a key named bootp_enabled with no value to the /config/dhcp/ folder."+
    so I first tried to read the local directory:
    xadmin$ *sudo dscl . -read /config/dhcp/*
    AppleMetaNodeLocation: /Local/Default
    RecordName: dhcp
    RecordType: dsRecTypeNative:config
    and then to create the key:
    xadmin$ *sudo dscl . -create /config/dhcp/ bootp_enabled*
    * Uncaught Exception: <NSInvalidArgumentException> ([DSoDataNode initWithDir:value:] value is not a valid NSString nor NSData)
    but did not succeed. Somthing must be wrong with the syntax. Tried several (Config, dhcp noslash, bootp_enabled:) but nothing helped.
    You dscl experts - please enlighten me!
    Btw. Apple why not include to correkt syntax in a manual?

    worked for me, too
    Thanks a lot,
    Willi

  • How to change the default delivery day when i create a shopping cart?

    hi,dear
    i got some trouble when i was creating a shopping cart.
    i want to change the default delivery day when i reference an old template.
    pls see the pictures and take the details.
    it seems that this forum dont support the [img][/img],so pls clike the link to open the picture.
    if you cant see the picture ,pls tell me,thank you
    step1:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119338649_0.jpg
    step2:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119432170_0.jpg
    step3:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119557507_0.jpg
    step4:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111120079773_0.jpg
    Edited by: ming yu on Sep 11, 2009 5:22 AM

    Hello Ming,
    Have a look at following thread concerning BAdI BBP_CHANGE_DEFAULT:
    [Change the delivery date (Required on) of SC|Change the delivery date (Required on) of SC;
    You will have to check in which SC transaction you are in order to distinguish creation from reference to old template.
    Regards.
    Laurent.

  • How to use the Portal Connection Service in a standard J2EE application

    Hi,
    We want to use portal connection service to connection backgend system from a standard j2ee application.
    But the connection need a connectionProperties object which is created in this way:
    ConnectionProperties connectionProperties =
    new ConnectionProperties(
    request.getLocale(),
    request.getUser());
    Because the "request" object is IPortalComponentRequest object, which is a portal object. In our standard application, we can use this way.
    So how?
    Thanks and Best Regards,
    Xiaoming Yang

    Does anybody has any idea? Many thanks and points will definitely be awarded.
    Best Regards,
    Xiaoming

  • Details on how to use the RESTful Web Services SDK

    Hello,
    this sounds really interesting for an important use case we're currently developing. Unfortunately, I am not a skilled developer and would therefore need to know two more things:
    1) in the beginning, it says ''assumes that there are no parameter values that need to be set'. Is this a core restriction or just to keep things simpel for this example? For our specific use case, we would need to at least transmit a report name and an execution date (which is not necessarily always equal to 'today')
    2) can we have the PDF sent to a Netweaver App Server?  Can the target location there be parameterized somehow?
    3) I understzand that there's also the Open Doc interface that could achieve similar features. Could you please elaborate which are the differences in the two approaches, maybe even pros and cons?
    Thanks
    Philipp

    Hi Philipp,
    1) This is just to keep things simple for the example
    2) You would need to first send the PDF to a file system, and then have a separate process to send it to the Netweaver App Server.  There isn't built-in integration to the Netweaver App Server.
    3) Stated simply:
    OpenDocument allows you to reference content via a single URL, best used for embedding content in your web page or application.   Pro:  Simplest Option  Con: Less power than REST API
    The REST API allows you to manipulate report objects in Web Intelligence and do things like set datasource and create report scheduling jobs.  Pro: More Power and Flexibility  Con: Requires knowledge of programming with REST APIs.
    Best Regards,
    Terry

  • How to use the Class.getMethod(String name, Class[] paramArrays)

    Hi,
    I've a problem with the .getMethod method. I've search solutions in the tutorials but I haven't found sorry.
    I'm trying to copy a method from a Class named carre in a reference named m. But I don't understand the second part of the parameters. How can I write parameters in a Class array ?
    Method m = Carre.class.getMethod("getYou", args) ; //It doesn't work, because args is a String array, not a Class array, my parameters would be double.
    Could you help me ? Thanks for answers.

    Class[] classArray = { new Double().getClass(), new String().getClass()};That's not what you want to write. That generates two objects unnecessarily. You should write:new Class[] { Double.class, String.class };

Maybe you are looking for