I am using sqlplus to connect to a pluggable database that is running on my localhost. However, when I connect I cannot see any of the tables from the major schemas.
Does anyone know how to trouble shoot this type of problem? When I connect using PL/SQL Developer however I am able to see the tables. I am connecting to the pluggable database using sql*plus like so:
sqlplus localhost:1521/services.domain as sysdba
When I try to select a table I see an error that the table or view does not exist. When I connect with PL/SQL developer like so, shown below in Figure 1, I do not have the problem of not being able to select any tables.
Figure 1: Logging into PL/SQL Developer
Related
A user has been configured on Oracle. Via this user, I can create an ODBC connection and an OCI connection, and these both test fine in Win10. Using Alteryx with the ODBC and OCI connection, we try to write data to a new table.
The table is created and appears in PL/SQL with the expected column names. However, the rows are never written and the connection just hangs at this point.
What could be wrong? I am not an Oracle Admin
Based on comments you were expecting oracle to commit without executing "commit" command explicitly. It's not enabled by default in oracle so you have to turn it on.
It's not possible to turn this on for the database, but on client apps only.
E.g. "set autocommit on" command in SQL Plus.
So you need to check docs for the client application you're connected with (presumably Alteryx is the one). It might have such a feature.
I just finished installing oracle 18c express edition on windows 8 laptop. During the installations, I did not enter any user name. I entered my password though.
At the end of the installation, I get this screen:
I connected Oracle database using sql plus as follows:
SQL> / as sysdba
I also entered the following commands in sql plus and all have worked. I was just following youtube tutorial without understanding everything.
SQL>alter pluggable database all open;
SQL>alter pluggable database all save state ;
SQL>select name from v$pdbs;
SQL> connect sys/oracle#localhost:1521/XEPDB1 as sysdba;
SQL> alter user hr identified by hr;
SQL> alter user hr account unlock;
SQL>connect hr/hr#localhost:1521/XEPDB1;
SQL> select * from employees;
SQL> CREATE TABLE TEST1 (CUSID NUMBER(10) NOT NULL);
This is the first time I am doing it. I tried to connect to a database using SYS as the user name and the password but did not connect.
SQL> Enter user name: SYS;
Enter password: Welcome1
SYS - During the installation, it said sys, system, and pdbadmin accounts. So I assume sys could be one of the user names.
Password - I entered the same password I used at the time of installation. I can connect to the database using / as sysdba. But I am not sure what this code meaning and what the user name and password and what database it is trying to connect. What would be the database name, user name and password?
Update 1
I created a connection in sql developer. Below shows the connection properties.
I created a table(sqldev2) in sql developer, inserted rows, and selected the data just fine.
Next, I went to sql plus and tried to select the same data from sqldev2 table but it shows no rows selected. I am assuming sql plus and sql developer may be pointing to two different databases?
How can I tell which database I am connected using the sql developer?
How can I connect to the same database using the sql plus?
This way I can work on the same database using the sql plus and sql developer.
Update 2
In Eclipse IDE, I had this code to connect to database. After that, I created a table (testtble) in Eclipse.
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("Driver Loaded");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:#localhost:1521/xe", "sys as sysdba","pw");
In SQL Plus, I connected to the db using "/ as sysdba". After that, I also tried to select * from testtble but it shows no table. I am assuming sql plus might be pointing to something different than what I used in eclipse. How should I connect to the database from SQL plus so I could see the table "testtble" in sql plus?
To check in which pluggable database you are currently connected in SQL*Plus use:
show con_name
If you connect to Oracle using a connect string that is using a database service mapped to a pluggable database (PDB), you will be connected directly to the related PDB.
Try different connections strings and check with show con_name.
I can connect to my 12c Oracle database using Oracle's Sql Developer and see my schema, but when I connect via SSMA I can't. I see a bunch of other schemas in SSMA, which I assume came with Oracle because I've only created two users on the box and I don't see either of them in SSMA. I'm connecting using the System account, so I don't think it would be a permissions issue. As you might be able to tell I don't know much about Oracle. Where could my schema be hiding?
I've just installed oracle database 18c on my windows 10 machine. Then I used Oracle SQL Developer to login to the database that I've created during the installation with connection information below:
The connection was successful and when I tried to open the Tables, it showed an error OCA-01219:
I've found this solution:
ORA-01219: database not open: queries allowed on fixed tables/views only
that trying to make the database open. I have tried this but still no success, my database status:
Can anyone please help to to solve this problem? Thank you very much in advanced.
I run into the same problem after having to restart the Oracle Service. The problem was the state of the pluggable database not that of the instance itself, which was "open" like in your case.
The following command worked for me (please replace "orclpdb" with your pluggable DB name):
alter pluggable database orclpdb open;
If output of 'select status from v$instance' is open, can you please execute below query and let me know the out put:
select name, open_mode from v$database;
Also, please let me know if you are trying to connect pluggable database. In case you are connecting to pluggable db, then run below query:
alter session set container='';
Then after apply above approach. please let me know if any query further
I created a tablespace on Oracle SQL Developer and trying to access tables data with SQL PLUS console. But when I insert a row with SQL Developer and want to see if the result is display on the SQL PLUS console, SQL PLUS doesn't show me any results. Seems like there's no connection between SQL PLUS and SQL Developer.
Is anyone has an idea ?
of course you are committing the transactions, then querying them from SQL*Plus; otherwise there is no way to see the data from another session.
commit;
SQLDeveloper and SQL*Plus are just two front end tools that allow to access the database. Let's start by making sure, that:
* You connected with the same database
* You are connected as the same user
* You did commit
You need to commit from JDeveloper and not be in a transaction in sqlplus.