Setting up connection between 2 oracle instances for replication - oracle

Hi everyone i have problem with setting up connection between two oracle instances for replication. I can connect via sqlplus using string like `
SQL> connect root/12345#orcl1
but I can't create query:
CREATE DATABASE LINK remotedb
CONNECT TO root IDENTIFIED BY 12345
USING 'orcl1';
Also I can't set up it with Oracle database control. The error that I get is username or password of remote master isn't correct.

I don't suppose by any chance that the user "root" is a SYSDBA account on remote DB? If so, you cannot do this. Database links are not allowed to connect to SYSDBA accounts. The link will be created but you will get ORA-01017: invalid username/password.

I resolved the problem by enclosing password in double quotes

Related

Oracle on Docker :: Warning: You are no longer connected to ORACLE. SP2-0640: Not connected

In the screenshot below you can see how I can successfully connect to the database but the command is rejected because... I'm not connected to the database...
I login into SQL*Plus and I receive the confirmation I'm connected: Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
Just to be sure I re-enter the connection: connect SYSTEM/SYSTEM#localhost:1521/ORCLCDB and I receive as a response Connected.
I follow the official instruction of Oracle Database Sample Schemas and I run #/home/oracle/db-sample-schemas-master/mksample.sql systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /var/opt/oracle/log/ localhost:1521/ORCLCDB and here is when things start to get nasty.
First I receive an ERROR: ORA-01017: invalid username/password; logon denied.
Then a Warning: You are no longer connected to ORACLE. SP2-0640: Not connected
How can it be, that is the Administrator password.
Should I grant anything else to this user?
The "no longer connected" warning is simply because the script issued its own connect that failed with ORA-01017. A connect attempt necessarily disconnects the current session first, so when the new connection fails there is no active connection at all. You have to reconnect successfully to be able to do anything useful.
The documentation you linked to says:
Start SQL*Plus and run the top level installation script as discussed in README.txt:
sqlplus system/systempw#connect_string
#mksample systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /your/path/to/log/ connect_string
Note: Use an absolute path and also append a trailing slash to the log directory name.
Use your current SYSTEM and SYS passwords, and also your actual default and temporary tablespace names. The passwords for the new HR, OE, PM, IX, SH and BI users will be set to the values you specify.
You have to supply your actual current password for the SYSTEM and SYS accounts, not the examples in that command; and sensible password for the new sample-schema accounts that will be created. For example, from your successful connect, the first argument to #mksample should be SYSTEM rather than the example systempw.
I was trying to load the sample schemas inside oracle database inside the docker container using the guide. What worked for me was to use localhost:1521/ORCLPDB1 as connection string in place of the SID. After this all of the tables got loaded.

How to connect AWS Oracle to SQL Developer w/out using Master User

I'm able to connect to my AWS RDS Oracle instance in SQL Developer using my Master ID and password.
Is there a setting I can use so we can connect to SQL Dev using a regular user? I'd rather not give out my master user info to other non-DBA users.
Thanks!
Just connect as the master user and create a regular user:
CREATE USER regular IDENTIFIED BY secret;
GRANT CREATE SESSION TO regular;
GRANT -- whatever else you need
Now you can connect as the regular user.

java.sql.SQLException: Cannot create PoolableConnectionFactory

I am getting an issue as poolableconnectionfactory. how to do it and where i did the mistake?can anyone please suggest me.
Your sqldatabase322 user doesn't have permissions to connect to the sqldatabase233 from the 182.72.70.197 IP address.
Connect to your MySQL database server as root user
Execute CREATE USER and GRANT commands like:
CREATE USER 'sqldatabase322'#'182.72.70.197' IDENTIFIED BY 'your_password_here';
GRANT ALL PR on sqldatabase233.* to 'sqldatabase322'#'182.72.70.197' with grant option;
Now you should be able to connect to the database and execute arbitrary queries
Check out MySQL Database and JMeter - How to Test Your Connection article for comprehensive information/troubleshooting options.

Oracle 11g database not connecting

i installed oracle 11g database express edition on my windows 7 (32 bit) pc . It was successfully installed but now when i try to open it , Firefox gives me following error.
"unable to connect."
So please reply to this post as soon as possible to open Oracle as without this , i can't go ahead in learning it. I m just a beginner.
Check if u can open SQLPLUS
if yes, change the port of ORACLE web server by using
connect / as sysdba
DBMS_XDB.sethttpport('9090');
open run SQL command line or in your cmd writes: sqlplus "/ as sysdba"
for both cases:
SQL> conn
Enter user-name:
Enter password:
In SQL DEVELOPER
Default connection for oracle 11g
go to connection>New Connection
Connection Name = HR or Use any name
User name = hr
Password = Your Password (This is the password that you selected during the installation of the of Oracle 11g)
Check the "Save" option
role: default
port 1521
SID : orcl
If you want to create the SYSDBA Account ( Administrator account)
Connection Name = admin ORCL or Use any name
User name = sys
Password = Your Password (This is the password that you selected during the installation of the of Oracle 11g)
role: sysdba( from the drop down)
port 1521
SID : orcl
TEST and Save Connect
Just in case if your HR account is locked because you have connected multiple number of times than you can fix this by logging into your SYS DBA account
In the objects list on your list go to the OTHER USERS and
GO to HR Account > RT Click
EDIT USER
Choose the password youlike
and UN CHECK The account locked and Uncheck the Password Expired options if they are checked in
This happens when the you install as a user and not as admin. Even if u have admin privileges, it won't do.
Also, after this error comes then the issue is that the port 8080 is being used by another application.
1.) First of all, stop that app.
2.) Rest Oracle Port
SQL> begin
2 dbms_xdb.sethttpport('9090');
3 end;
4 /
PS: I read one thread it says that don't use # in the password also.
Hope it helps :)

How can I connect to an Oracle database as SYSDBA using dbExpress?

I have a Delphi application that connects to an oracle database.
When I try to log in as SYSDBA, I get the error:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
When I try to log in with a user of "SYS AS SYSDBA", I get the error:
ORA-01017: invalid username/password; logon denied
How can I log in as sysdba using a dbExpress connection?
See also this related post regarding ADO
I found nothing specific for special dbexpress driver. But try to add a connection parameter DBA privilege with the value SYSDBA.
Connection.Params.Append('DBA Privilege=SYSDBA');
I have no delphi installed to check the concrete syntax of the parameter name. Please try using an underscore instead of the blank.
This page shows several connection strings used in certain tools to connect to oracle database.
Specify the user as "Joseph as SYSDBA" instead of Joseph
I found a checklist but not sure whether it is useful or not. Just have a look.
Checklist
connect SYS as SYSDBA;
or you can use SYSOPER
the password will be what you specified at installation (same as SYSTEM)
refer:
http://docs.oracle.com/cd/E11882_01/server.112/e10897/users_secure.htm#ADMQS12004

Resources