Unable to create a New Connection in Oracle SQL Developer - oracle

I am trying to create a new connection in Oracle SQL Developer.
Below are the inputs i am providing and its failing :
Connection Name: HR_ORCL
Username: hr
Password: (system password)
Hostname: localhost
SID: orcl
Clicking Test Connection .
Failure
Test Failed: ORA-01017:invalid username/password;login denied

Related

Oracle database connection via Codeingniter 4

Hi I have a Oracle database installed locally on my laptop. I'd like to connect to it via Codeigniter 4. Since version 4.2.0 it is able to do so.
https://codeigniter4.github.io/CodeIgniter4/changelogs/v4.2.0.html
All my database credentials are in the .env file, but I'm unable to establish connection. I'm new to Oracle.
I can connect to my database via Oracle SQL Developer.
The data I use for the connection:
host: localhost
port: 1521
user: system
password: MYPASSWORD
service name: orcl
How can I use that in my .env file?
This is what I have so far:
database.default.hostname = localhost
database.default.database =
database.default.username = system
database.default.password = MYPASSWORD
database.default.DBDriver = oci8
database.default.DBPrefix =
database.default.port = 1521
I get this error:
Unable to connect to the database.
Main connection [oci8]: oci_connect(): ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
(.env file)
Try using:
database.default.hostname = '127.0.0.1:1521/orcl'
Where:
'127.0.0.1:1521/orcl', // hostname:db_port/service_name

Connect NiFi to Oracle 11g

I have no problem to connect Oracle 11g with Oracle SQL Developer with configuration below:
Username: orc
Password: PAP
Connection Type: Basic
Hostname: connect.gogo.com
Port: 1528
Service name: svcname
In NIFI, any idea how should I put the value for the Database Connection URL?
Database Connection URL:
Database Driver Class Name: oracle.jdbc.driver.OracleDriver
Database Driver Location: /opt/nifi/jdbc/ojdbc8.jar
Thanks,
Kenny
you can add a DBCPConnectionPool under Controller Service like this
Database Connection URL: jdbc:oracle:thin:#connect.gogo.com:1528/svcname
more information here
https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
or you could use tnsnames.ora file syntax in url like this:
Database Connection URL: jdbc:oracle:thin:#(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL=TCP)(HOST=connect.gogo.com)(PORT=1528)))(CONNECT_DATA=...))

Issue implementing Sql_tracker_store

I want to use sql tracker store to store the conversation history in db but it seems it is not working for me.
I am having MySQL database which i want to connect for that i am using below code in my endpoint.yml
tracker_store:
type: SQL
dialect: "sqlite" # the dialect used to interact with the db
url: "localhost" # (optional) host of the sql db
db: "chatbot" # path to your db
username: "root" # username used for authentication
password: "test" # password used for authentication
when i am running rasa shell -m models --endpoints endpoints.yml
i am getting below error.
" sqlite:////absolute/path/to/file.db" % (url,)
sqlalchemy.exc.ArgumentError: Invalid SQLite URL: sqlite://root:test#localhost/c
hatbot
Valid SQLite URL forms are:
sqlite:///:memory: (or, sqlite://)
sqlite:///relative/path/to/file.db
sqlite:////absolute/path/to/file.db
When i tried to connect the same db using python code it worked for me. Below is my python code.
import mysql.connector
mydb = mysql.connector.connect(host="localhost",port="3306",user="root",database="chatbot",password="test")
mycursor = mydb.cursor()
sql = "Show tables;"
mycursor.execute(sql)
myresult = mycursor.fetchall()
print(myresult)
for x in myresult:
print(x)
Please help me how can i resolve this.
You need to change the dialect to use MySQL and db to include the .db suffix in your endpoint.yml:
tracker_store:
type: SQL
dialect: "mysql" # the dialect used to interact with the db
url: somewhere
db: "chatbot.db"
username: "root"
password: "test"
More info in the SQLALchemy docs 😊
You need to install pymysql using pip.
tracker_store:
type: SQL
dialect: "mysql+pymysql"
url: "localhost"
db: "Rasabot"
username: "root"
password: "xyz"

Installing Laravel with a database on another system

We have a local network, in the server's system I install SQL Server 2017, now I must install Laravel in my system with the server's database but I got this error
Connection failed: SQLSTATE[08001]: [Microsoft][ODBC Driver 13 for SQL Server]SQL Server Network Interfaces: Connection string is not valid [87].
my config
SQL Host : DESKTOP-Q03NUTO\LS
SQL Port : 1707
SQL Login: sa
SQL Password: ***

Connection in Oracle Sql Developer

I am trying to create a new connection in Oracle SQL Developer. Below are the inputs:
Connection Name:Dbms
Username:[My Name]
Password:[Ubuntu Password]
ConnectionType:Basic
Role: default
Hostname: localhost
Port: 1521
SID: xe
Upon clicking Test an error is being displayed:
Network Adapter could not establish connection

Resources