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

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

Related

how to reset password in oracle xe 12

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;

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

SYS AS SYSDBA user password forgotten

I have a sys as sysdba user of which password I have forgotten. I have a saved connection of the same in Oracle SQL developer, if I double click on it, I am able to connect it inside SQL Developer.
I want that password, I am exporting connection but the password is getting exported but in an encrypted way.
Can someone please help.

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;

MS SQL Server '08 ignoring username and password when requesting a connection with connection string using Integrated security=SSPI

I'm using this connection string to connect to a ms sql server '08 db,
"Data Source=qwe;Initial Catalog=dsa;Integrated Security=SSPI;User Id=mydom\unamee;Password=pwd;"
but the server is ignoring the username i specify and uses my machine name instead; and says that it is unable to authenticate user mydom\myMachineName
I've check the other similar question, but that is not the same as this problem, someone please help, my head is breaking
When you use Integrated Security=SSPI (or true), UserID and password you have specified are ignored. Login will be made using the windows credentials you are logged in Windows\domain. In that case you'll need to have an appropriate windows login created in SQL Server.
If you want to use SQL Server login, specifying username and password created in SQL Server -you should set 'Integrated Security=false or remove that property altogether because false is default value.
EDIT:
To make a long story short: You can either use Integrated security or username/password and not both. You can not log in using someone else's domain account, only of user logged in Windows at the moment.
In order to use a domain account to connect to Sql Server you have to be logged with that account, Integrated Security=SSPI; pass to SQL the current domain credentials,User Id and Password values in connection string are used to send SQL Server user (not domain user) and password to connect to it, but in this case your Sql Server has to be set in mixed mode security to allow this kind of credentials. Sorry about my english, I hope this was useful for you. Regards