Oracle – How to Start Oracle Service

oracle

I have 3 instance of oracle database which myservice, myservice1, myservice2.
1st database service name is MYSERVICE; it's working ok

But I can't start myservice1 and myservice2. How can I start these service?
I am using oracle linux.

 tnsping myservice1

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 05-MAY-2020 08:27:48

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = mydatabase.orcl.net)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = myservice1)))
    OK (0 msec)
    [orcl@mydatabase ~]$
    [orcl@mydatabase ~]$ tnsping myservice2

    TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 05-MAY-2020 08:28:02

    Copyright (c) 1997, 2014, Oracle.  All rights reserved.

    Used parameter files:


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = mydatabase.orcl.net)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = myservice2)))
    OK (0 msec)

When I trying to connect the db with SERVICE NAME: myservice1 using SQL developer it says:

An error was encountered performing the requested operation:

Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor   

Vendor code 12514



select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
myservice          OPEN

Best Answer

Do not use the "-startoption mount". Mount state is only for making some configuration changes, backup/recovery operations, and a handful of other administrative functions. Just use this:

srvctl start database -db myservice1
srvctl start database -db myservice2

Note that "tnsping" won't actually test whether a service is running, only whether the listener is running on the specified hostname and port number from the connection string. You could use any made up service_name and still get an "ok" response as long as the listener is up.