can't start oracle service in windows - oracle

I'm taking DB prog. class and we are required to use Oracle+ Oracle sql dev. I so far I got 3 DB in oracle each with a connection from Oracle sql dev.
In windows services I only have one service called OracleDBConsole"MY1stDB name" there's no similiar services for the other DBs I created.
When I try to start this service I receive error as the picture
I can connect through the connections in Oracle sql dev. to the other DB I created except the 1st one
Does anybody have an idea on this issue

As one of affected people, I finally found solution:
If this appears, run lsnrctl start as an administrator to start the listener.
Most probably your listener.ova and tnsnames.ova are improperly set.

OK you installed 3 instances on same machine. There are two possibilities.
They are all set up to use default ports so when one is started no other can start due to port conflict. In that case you need to reconfigure ports following documentation
Second possibility is you already have different ports for your instances. In that case please check your connection definitions if they use proper ports. First will probably need default 1521 but others needs other ports. You may try 1522 as when during instalation 1521 was used it could took next free. But generally you should go to NETWORK/ADMIN/listener.ora edit file and check what port is used. Then properly define connection in client tool.
But as said in comments. Installing 3 instances make no sense unless you're trying to do some study with DBlinks simulations.

Mentioned service relates to oracle enterprise manager service.you have this because it configured for your database. but to troubleshoot it please check its logs in %ORACLE_HOME%**HOSTNAME_DBNAME**\sysman\log*. check there logs and send to investigate.
regards,
Mohsen

There is insufficient detail about the error to know what the problem is, however my guess is that subsequent instances are attempting to use the same resource as the already started instance, most likely the port.
Nevertheless, your problem can be solved by not creating multiple instances of Oracle, but rather creating multiple databases in the one Oracle instance.
It is a virtual certainty that your teacher did not intend you to start multiple instances of Oracle.

Related

Database Link - Test connection does not work

I have two databases that have tables with identical schema. I want to compare the two tables. I learned that cross DB queries need a Database Link.
I use SQL developer and here are the properties of the connection that works
Connection Name: MyConn
UserName:SomeUser
password:SomePassword
Connection Type: Basic
Role: default
Host Name: 12.12.12.12
port:2521
SID: xe
I tired this command to create Database link
CREATE DATABASE LINK MyDBLink
CONNECT TO SomeUser
IDENTIFIED BY "SomePassword"
USING '(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=12.12.12.12)(PORT=2521))
(CONNECT_DATA=(SID=xe)))';
The command creates a link but when I try to test the link, the connection does not work. The connection times out in 60s.
Am I missing something ?
The Database-Link is between the two databases and not "outgoing" from your local sqldeveloper/client.
So even if you can reach the remote database from your local client, the remote database-server where you created the link might (and in this case indeed does) not reach the target of the database link.
The database link itself is created no matter if the remote database is reachable, or the credentials are incorrect, etc.
If you have the possibility you should directly log on the database server of the database where you created the link and check the network connection to the database server you want to reach from there. Using telnet might help you.
The best solution is to look at the network or operating system and open a path between the two servers, and then the database link should work. If that's not possible, you can use your desktop PC as a proxy.
The official way to route around network issues is to use Oracle Connection Manager. But in my experience that program is a bit hard to configure.
Another option is to create a database on your desktop, and create two database links to each server. If this desktop database is only used for linking to others, then the free Express Edition should be good enough. If you go down this route, be careful of performance problems when involving 3 databases. You'll probably want to compare hashes instead of actual data, to avoid network problems.

Connect to Oracle database without using TNS Listener

Just out of curiosity, a few days ago we had a discussion about whether there is a way to connect to the DB without using TNS Listener, the connection must be made by any program SQLPlus. Net, ODBC, and so on.
Basically only local connections can avoid the listener (ie you have to be already logged on to the machine that the database instance is running on).
Rather than relying on a listener to fork out a process to act on behalf of the connection, this is done by the local process. Generally it means that the local user needs to be run as 'oracle' as well. Sort of equivalent to a console logic.
It appears there isn't one magic bullet, but there are several ways.
For ODBC, have a look at this SO question.
There's a lot of good info at Connectionstrings.com/oracle as well.
You connect to Oracle via a client, such as sqplplus, or a java program (or tool) utilizing a protocol such as SQL*NET or JDBC (as examples) through the listener. The listener in turn forks a process on the target database (or assigns the connection to an existing process if you use shared servers).

how to write oracle two instance information in single query?

i using oracle 10g database, i installed two instance in my machine(dev and dev10g), i using query "select instance_name,status from v$instance" this query return one instance information but i need two (dev and dev10g) instance information, how i write a query. it is possible without using dblink. pls help me.
No. Without a dblink, the two database instances do not communicate with each other. Also, not sure if you can dblink v$instance.
If you want to monitor several databases in one place, you will need to look at Oracle's management tools, I think. Or just query both databases separately.
You can see multiple instances if you use RAC but I don't think you are in this case. As mentioned above, each instance is separate - even with the same software. If you just want to know if the instance is alive, you can easily do this from the OS.
For example in linux:
ps -elf |grep pmon
This will check that the pmon process is running on the instance. If its not you're in trouble! The SID will be a part of the name - so if there are two instances running, you will see both.
In Windoz, you can check the services in a similar way.
Have you looked at Oracles Enterprice Manager Console?

How do I browse databases on an Oracle Server?

So I'm coming from a position as a SQL Server developer who has written a little bit of PL/SQL way back in the mists of time but effectively knows nothing.
I've got a laptop, it's running Oracle. There is a database on the laptop which I need to have a look at and neither I, nor anyone else I can speak to, knows what it's called.
I have a couple of logins including one which alleges to be an Admin login.
What's the easiest way to browse the databases on the server and then connect to one?
I suspect that my assumptions about relationships between servers, users and databases from SQL Server are leading me astray but right now I can't get past idea that the client tools Oracle ships are someone's idea of a joke but I'm really not finding it that funny.
I'm pretty sure that it's version 9.2 that's running.
Happy to provide more information but right now I don't know where to start.
If this is windows look in the services. Each database will have a separate service. By default these are named OracleServiceDATABASENAME.
You may be able to connect with just this information on the default port 1521.
If that does not work open the properties of that service you can find the location of the oracle home. The default place to keep your connection information in the ORACLEHOME\network\admin\tnsnames.ora . Using the database name you can find your connect information in this file.
If this is linux/unix look in the /etc/oratab file. This should have the database name and oracle home listed. The default location of the tnsnames.ora file is the same as on windows.
Once you have this information you can use any of the tools mentioned above to connect to the database.
I don't know what qualifies as "easiest" in your book. I'm moderately fond of Aqua Data Studio (www.aquafold.com); it's nice & visual & pretty & all. It's also Not Cheap, but might be worth a 2-week evaluation to see if it does anything helpful for you. I'm not an expert on this, and I joined an Oracle-based group from a SQL Server background; that's the tool they were using at the time, and I've found it extremely usable. But that's just me. Good luck.
Check out Oracle SQL Developer. (It's free)
I'm not a SQL Server expert, but there are differences in terminology.
An Oracle "Instance" is a single entity of the Oracle software. A database is the actual logical data that the instance serves. You may have multiple instances of the Oracle database software running against one database (This is considered a RAC setup); or just one instance running against one database.
I'm assuming what you mean by database here is actually the different schemas/users/tablespaces/procedures etc. that you have within an Oracle database. In that case, Oracle SQL Developer should do the job nicely.
If you are able to utilize Enterprise Manager (this is a licensed option), it provides this functionality as well, though it is more cumbersome than SQL Developer IMHO. EM does provide many other tools for providing a general overview of your Oracle instance health, alerts, and many things used to help tune the performance of your Oracle instance.
In Windows, the following command lists running database services:
net start | findstr -i ora
In Unix/Linux, grepping for the Oracle SMON process will give you the names of running databases:
ps -ef | grep smon

How to troubleshoot Oracle database server errors?

My team inherited an Oracle-based web application and they are fairly inexperienced with Oracle database servers.
The Oracle 10g server is running on a Windows 2003 Server with plenty of disk space and from time to time, all connectivity is lost, the application stops working, not even SQL Plus is able to connect to the database server.
But when we check the Windows Service manager, it says that the service is up and running. A restart usually fixes the problem, but we need to properly troubleshoot it so we know what's causing it and so we can avoid it to happen anymore.
Where should we start looking for clues? What are the criticial log files we should be investigating?
On the server you should have an environment variable called ORACLE_HOME which indicate the root of the Oracle install. Most likely the Oracle trace/dump folders will be under there. Search for a folder called "bdump" (background dump). That's where the main log file, knows as the alert log, will be, as well as trace files generated by background processes. There will be an adjacent file called "udump" which will contain any trace files generated by user processes.
However, my real advice is that you should either hire someone who knows Oracle or get Oracle Support involved.
The alert log would be the first file to check.
It will probably be in $ORACLE_HOME/admin/bdump and (probably) called alert_DATABASE-SID.log
It contains most of the important actions that the database does, as well as any important errors that occur.
I have to agree with cagcowboy. Check your alert logs for errors. If no errors then maintain a sysdba login into the database and when it hangs, attempt to do a hang analysis. See metalink note 215858.1 on hanganalyze.
Have you tried tnsping? We've occasionally run into problems with the listener that requires an assist from our DBA. tnsping is the diagnostic tool we use to do triage.
I would recommend hiring an experienced Oracle DBA if at all possible.
check the alert log to see how the Db is structured. sometimes badly set parameters make hangs or slow performance. or you can shutdown and start in mount mode, then check the v$parameter values for problems. setting total memory is very important.

Resources