how to reset password in oracle xe 12 - sql

I recently installed oracle xe version 12 for study purposes and created a login id and password at the setup. But while logging in I found that TNS host was unreachable apparently as I used "#" in my password phrase can someone help me how to reset password!!??

You don't need to reset your password.
Simply put your password in "quotes" when you define your connection in SQL Developer.
Or if you do want to reset your password, simply right-click on your connection and do a 'reset password'
Be sure to quote it again when supplying the old/existing password.
Once you hit OK, we'll also update your connection properties to use the new password, so you don't have to re-key it.

An alternate method (emphasize "alternate", not necessarily better or worse, is to connect as SYS and then change the password you are interested in:
C:> set ORACLE_SID=XE
c:> sqlplus / as sysdba
SQL> alter user scott identified by tiger;

Related

regarding oracle database "sysdba" user and creating a new user

I am very much new to oracle database, please forgive me for any technical errors in my question. I am using oracle 19c and I think my password for "system" user is different than the password for "sysdba". At the time of installation I used the same password every time but now while connecting to system or "\ as sysdba" , there is no problem connecting but when I type the password for "orcl_listener" or "orcl" or "sysdba" , the password is wrong . for example:
conn sysdba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
when I create a new connection in SQL Developer, I use a username as a system, and the password is correct.
success
when I create a new connection in SQL Developer, I use username as \ as sysdba and password is correct .success
when I create a new connection in SQL Developer, I use username as sysdba and password is correct .not success and error says Status: Failure -Test failed: ORA-01017: invalid username/password; logon denied
.I am such a new user, if possible please provide me basic details of oracle databases in the simplest ways.
Now the second problem is that after creating a new connection in SQL developer using system username as its password is working, I expanded connection and at the bottom, I right-clicked on other users and created a new user with username "hr" and here it says "ORA-65096: invalid common user or role name".when I used c## as prefix no error occurs but I don't want any c##, it means it has to be a local user but where is option to create a local user?
please help me.
To understand common users and local users you have first to understand multitenant architecture in Oracle: container database (CDB) and pluggable databases (PDB).
In multitenant architecture you can only create a local user in a PDB.
To create a local user connected with SQL*Plus as user SYS:
Check your current CDB/PDB
show con_name
List existing PDBS
show pdbs
Go to an existing PDB:
alter session set container=mypdb;
Check your current PDB
show con_name
Create a local user in the current PDB and grant some basic privileges:
create user myuser identified by "mypwd" quota unlimited on tablespace myts;
grant create session to myuser;
grant create table to myuser;
To connect directly with SQL*Plus to this PDB you must use the Oracle Net service for this PDB:
sqlplus myuser/mypwd#myhost:myport/mypdb

PostgreSQL, SQL Shell(psql) psql: error: could not connect to server: fe_sendauth: no password supplied

SQL shell(psql) throws me this error when prompting pasword for user postgress psql: error: could not connect to server: fe_sendauth: no password supplied
tried CMD
C:\Users\myuser>psql
Password for user myuser:
psql: error: could not connect to server: fe_sendauth: no password supplied
C:\Users\myuser>psql -U postgres
Password for user postgres:
psql: error: could not connect to server: FATAL: password authentication failed for user "postgres"
found this 1. answer :maybe is this isue
pgpass.conf file needs to put it to PostgreSQL server and not with pgAdmin (client's dir)?? but cant find such file in explorer
pgAdmin 4 works just fine problem is with psql shell
im on WIN 10 ,anyone have same problem and how to solve it?
PS: i managed to work psql shell by setting pg_hba.config file to
host all all 127.0.0.1/32 md5
for ip4 and ip6 i set trust instade md5 and relaoded Postgress service ,but when i reverted back after seting new pasword to md5 same problem and same error
psql: error: could not connect to server: fe_sendauth: no password supplied
pgAdmin 4 still works
I've installed and uninstalled many times and I have managed to get the desired result in the picture below...
Install postgres without changing anything, except entering a new password and open the sql shell by entering 'psql' in your Windows search menu.
Inside SQL shell, keep pressing enter until it prompts you for your
password which you created on the installer
Type your password here, even though it doesn't look like it is
being keyed in and press enter once done.
It should look like...
Server [localhost]:
Database [postgres]:
Port [5432]:
Username [postgres]:
Password for user postgres:
psql (12.2)
WARNING: Console code page (850) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=#
Install pgadmin from this link pgadmin, enter the password from psql
and you should then see the following...
Click on the server database icon top left and add the password which you entered in psql.
Create a database and get the list.
postgres=# CREATE DATABASE your_database_name OWNER postgres; #Click enter here
CREATE DATABASE #result
postgres=# \l #to get the below datbase list
Go back to pg admin, refresh the browser, and click on the server icon.
Note: Should you need to uninstall/re-install you will need to manually delete the folder where you have installed Postgres and pgadmin. This is even after uninstalling from system settings. For some reason, Postgres folder's don't remove entirely even though you select the option.

How to solve My SQL ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)

I know there are already similar questions and I tried each of the solutions but somehow nothing seems to help. Maybe anyone has an idea what is going on. I am very new to the programming world and don't understand yet what's behind all the commands, but tried my best to solve it myself.
I installed MySQL via homebrew on a mac. As long as the password was not set up and I could just press enter when asked for password all was fine. Then I changed the password via this command
mysql> ALTER USER 'root'#'localhost' IDENTIFIED BY '';
After doing this, I could not log in any more and always get the ERROR 1045 (28000). I reinstalled SQL and also downloaded another version via Then I installed SQL via the MySQL community server, but this also did not change anything.
But by installing via MySQL community I could go to the system preferences and reset the password (which also did not work via the terminal) - but again no luck.
I would appreciate any ideas. Thanks.
The issue is likely due to socket authentication being enabled for the root user by default when no password is set, during the upgrade to ubuntu 16.04.
The solution is to revert back to native password authentication. You can do this by logging in to MySQL using socket authentication by doing:
sudo mysql -u root
Once logged in:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
which will revert back to the native (old default) password authentication.
Now use password as the password whenever required by MySQL.

Oracle 10g SQL plus unkown username, password and Host string

I have just installed Oracle 10g database and also oracle developer suit, which is installed as DevSuiteHome1 in my computer. I could not use SQL plus because I dont know the exact username, password and host string to connect. During installation I did not ask to enter any username & password. Then what would be the username,password + host string? Help me out of this.
During installation I did not ask to enter any username & password.
You might have done a client-only installation and not the database. Database creation will definitely prompt you to enter these details.
I dont know the exact username, password and host string to connect.
You can connect to the database locally using the combination of ORACLE_HOME and ORACLE_SID environment variables.
Depending on your OS:
Unix/Linux:
export ORACLE_HOME=<oracle_home_directory_till_db_home>
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA
Windows
set ORACLE_HOME=<oracle_home_path_till_db_home>
set PATH=%PATH%||%ORACLE_HOME%\bin
set ORACLE_SID=<your_oracle_sid>
SQLPLUS / AS SYSDBA
Once connected, you could then alter the user and modify the password.
ALTER USER username IDENTIFIED BY password;

Oracle 10g SQL plus username, password + Host string unkown

I have just installed Oracle 10g database and also oracle developer suit, which is installed as DevSuiteHome1 in my computer. I could not use SQL plus because I dont know the exact username, password and host string to connect. During installation I did not ask to enter any username & password. Then what would be the username,password + host string? Help me out of this.
Retrieve detail of database service name/host string:
Open cmd.
Issue command lsnrctl status.
Usually, only one database service name will be listed. good Luck!
you can connect many user:-
scott which password is tiger
hr which password is hr
you can connect also sys user.
For connect sys user, only write in user name:- / as sysdba