I am using a mac and I typically use Sequel Pro to interact with sql databases. Usually I use mysql, but I understand redshift uses Postgres.
When I try to connect to my Redshift db, should I use the IP, or the "endpoint"?
Also when I try to connect, I get this error from Sequel Pro.
Unable to connect to host {{my_db_host}}, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Can't connect to MySQL server on '{{my_db_host}}' (4)
Can anyone offer advice on how to get connected?
Thanks
You should be using the Redshift Endpoint, if you have your security group settings configured correctly. You might want to set your group to 0.0.0.0/0 during testing(this opens up your cluster to the entire internet, and you can lock it down later once it works)
You also need to make sure you have the correct ODBC/JDBC driver. I recommend either Netbeans(comes with connection driver), SQL Workbench, or Aginity Redshift. Default port is 5439.
I thikn you are using the wrong driver(a mysql driver not psql driver), becaues your error says MySQL server.
http://docs.aws.amazon.com/redshift/latest/gsg/rs-gsg-prereq.html
For mac, I believe you could also try and use the a terminal PSQL client. Something like...
psql -H endpoint.aws.com -p 5439 -U username --password
Related
Using Windows 10 cmd.exe
I was using psql 7.4.6 which looks like the most recent version, but it no longer works. https://sourceforge.net/projects/psql/
I'm still waiting on IT to tell me which version of Posgresql we have. I cannot do it myself. I normally use psql to do that but psql no longer works.
I'm trying to use psql to get the current date from a Postgresql server but I get this error: "SSL Error: SSLv3 alert handshake error"
We have upgraded Postgresql at least once since psql has worked with it. Could it be psql (which hasn't been updated since 2013) no longer works without our newer Postgresql?
Is there a free Windows front end I could use to browse raw data in our Postgresql DB?
I only need read access to the DB, I do not need write access. I will not have admin access to it. The DB sites on a black box from a vendor so we cannot configure Postgresql.
The software should not require me to install any other packages like Apache, PHP, Java, etc.
Thank you!
I'm new at this and I got a job where I need to connect to a PostgreSQL database, they told me to use this command:
psql -h remote_ip -p 54320 -U user -d database
I'm trying to connect with Navicat but this error occurs:
psql: FATAL: no pg_hba.conf entry for host "18.221.220.67", user "pse", database "pse", SSL off
It sounds like you are not the DBA of this database, and whoever is the DBA forgot to configure the database to let you in. You will have to have them fix it for you. Maybe you are supposed to be coming in through a VPN which will change your apparent IP address (although in that case I would think you wouldn't even be able to contact the database without the VPN; as it would be blocked at the firewall). Or perhaps you are only allowed to connect over SSL, but navicat is not trying to do that for some reason.
Some context: I'm setting up an environment to run some Ruby code our Lead wrote to connect to some remote Databases. I'm using Win10 and have WSL installed. I have installed SQL*Plus, docker, and Ruby, and am sure I have installed all the dependent gems (actually at this point I know for a fact its not a ruby problem). I'm using Docker to use a pre-built image of an Oracle Database, and I have populated it with data.
Obfuscated company DB information:
'Broken' DB (TNS no listener)
Username: W-WORK-DEV
Password: password
Host: host1
Port: 999
SID: W-WORK-DB.tech.company
'Working' DB (can connect just fine)
Username: C-OLD-DEV
Password: password
Host: host2
Port: 999
SID: C-OLD-DB.tech.company
Please note the names I have provided here are purely for obfuscation, they do not represent anything about age or even config. They are essentially the same, just different databases on different hosts. Also note this is a corporate company and would have a lot of base infrastructure for their internal network.
The issue I am having is that with the specific database I am working on, I cannot connect to it. I connect to the company intranet via a VPN (I work offsite) and have issues connecting to WORK-DB.tech.company, though I can connect to C-OLD-DB.tech.company. Methods I have tried to connect with:
Oracle SQL Developer
I have inputted all the correct jdbc strings and username / password. Have even asked other people to attempt to connect (at least 3 others). They can all access C-OLD-DB as well as W-WORK-DB. When using this method, I get The network adapter could not establish the connection.
Side note: I'm fairly sure I have connected to the DB just fine in the past, though I can't be certain because I'm fairly new to this team and have only accessed it once, if that.
SQL*Plus via WSL
I installed SQL*Plus because I think Ruby was accessing it in some capacity when running the script. I got to the point where the script was able to connect to my local docker Database, but when it tried to connect to the remote database, it would return TNS: no listener. I attempted this using sqlplus as well and got the same error.
Example:
sqlplus C-OLD-DEV/password#host2:999/C-OLD-DB.tech.company
This command works and connected to the DB jsut fine.
sqlplus W-WORK-DEV/password#host1:999/W-WORK-DB.tech.company
This command gave me TNS: no listener.
During my research I had found mentions about tnsnames.ora, sqlnet.ora, and listener.ora. I have found relevant files around the company intranet and attempted to use them in my own personal environment to no avail (one of the sqlnet.ora files actually stopped me from being able to connect to any) I found mention about a config/database.yml file related to ruby, but our code already has the database information set up and I seem to be getting to the same solution as the script when trying to manually connect via sqlplus.
Here are some relevant environment variables I have set up when doing these installs. I'm thinking that at some point when trying to set up my environment, I messed up some config that changed the way sqldeveloper or sql plus would connect to that database.
$ echo $ORACLE_HOME: /usr/lib/oracle/12.2/client64/
$ echo $TNS_ADMIN: /usr/lib/oracle/12.2/client64/network/admin
$ echo $LD_LIBRARY_PATH: /usr/lib/oracle/12.2/client64/lib
I hope I have provided all the information I have come across and have explained clearly what my issue is, if you have any questions feel free to comment about it so I can clear it up. Thank you for any and all your help.
So my problem ended up being a 'firewall/port' issue. In the end i found out that specific port I was connecting to was blocked, but I thought it was only on my system. Turns out the VPN I'm using was the issue blocking that port. Company has a Primary Data Center and a Secondary one, and apparently the SDC VPN was blocking that port from me. I switched to using the PDC VPN and it worked.
Are you using the 64 bit jdbc drivers?
I have to connect to a remote Oracle database. Connection will only work with a VPN access to the remote network. I have already setup the VPN, and that is working.
Remote team has passed TNS.ORA settings. I have hardly worked on configuring oracle and neither I am aware of the setup that I need to have on my machine. I just need to run few queries to test the data.
Can somebody guide me on the setup and the configuration I need to have on my windows 7 to connect to a remote Oracle database ?.
My first assumption was to download Oracle client. I downloaded Oracle Insta Client files, but I have no idea how to configure it to connect to a remote database. I couldn't even find any ORA file in the installed files of Insta client.
One you installed the instant client and installed it, you can conect to the remote database by using an easyconnect string. If you are in sqlplus you can do the following:
CONNECT username#[//]host[:port][/service_name][:server][/instance_name]
Lets assume your remote host is remote1 and the service_name is test (This can be retrieved from the tnsnames.ora)
connect username#//remote1/test
I use the command prompt to connect my Oracle database. All functions work, but when I try to use my Navicat to connect to the database, it shows the following error message:
ORA-12514:TNS:listener does not currently know of service requested in
connect descriptor.
My general settings for Navicat are:
host type:basic
ip address:127.0.0.1(also try my ip, but still have same problem)
port:1521
service name:orcl
By "all functions work", I assume you mean you are able to connect to the database and query.
Can you show us the connect that you use.
If you are using sqlplus in this fashion,
sqlplus userid/password#database1
it means your current client is pointing to the correct tnsnames.ora. May be navicat does not point to the correct tnsnames.ora file? The error indicates that you want to connect to, say database1, and Oracle is not able to map "database1" to the correct server, host and port number.
Have you gone through the connectiond details here?
http://www.navicat.com/en/products/navicat_oracle/oracle_detail_win.html
What is your operating system version and oracle version?