Find postgres I was connected to - macos

I have done something rather dumb.
I got a new work machine and, for weeks (I know, I know) I have been connected to a version of postgres. Last night, the machine restarted and now I can't seem to flip on the correct version of postgres.
When I try to access the database using the same credentials as before, my machine claims that the user, postgres, doesn't exist. That can't be true, as I successfully logged in as that user and had done quite a bit of work.
My question: is there a way to find out where that database is on my filesystem somehow? I know I called the database "analysis_db" and I remember several of the tablenames.
Any help would be appreciated. Thank you!

Related

Steps to create dag in airflow by connecting to remote database

I am learning airflow and I have to create a dag that will connect to a remote oracle database and insert data from one table to another. Below is what I have done till now
After installation, ran pip install 'apache-airflow[oracle]' so that I can use oracle operator
Created connection string from UI to connect to remote database
Then I wrote my first dag but it didn't seem to run.
Before I try to find why it's not running, I want to make sure if I have to do some other steps that I may have skipped like some changes in airflow.cfg file especially in sql_alchemy_conn (this file I found in my home directory) or if cx_oracle is required to be installed so that I can connect to remote database or just connection string is needed (step 2 above).
There are so many things mentioned about airflow but yet not clear on the exact steps. If someone could help me in this that will be much appreciated. These might be the basics but I am stuck with what to do from end to end. Please help
Thank you!!

Running Zend with XAMPP on Windows 10 - connect to database

I have a problem learning Zend, hope you can help me. Much approchiato, some evenings lost...
I am following this tutorial and reach an article about a table creation. I am using XAMPP v3.2.2 and in the PhpStorm I can connect to its MariaDB database using a Database panel.
However when I attempt to run the php script load_db described there, it creates a database in my /data folder.
How can I connect it to the XAMPP database? I guess I need to run some MariaDB script in order to connect to the actual database, however I was unable to ask Google a correct question I guess.
I think I am missing something totally obvious, I hope you can push me in the right way.

Pre-Installation Check Mantis: can't install

I am trying to install Mantis on my server. Problem is that I can't seem to get pass the Pre-Installation Check step. I click on "Install/Upgrade Database", and displays all "GOOD". Then it says:
Database Creation Suppressed, SQL Queries follow
<< here it prints a lot of sql queries, mainly create and alter tables >>. When I say this the first time, I went to MySQL Workbench, (the database bugtracker was already created), and ran the script given. Thereby, creating all the needed tables.
Then it says:
Your database has not been created yet. Please create the database, then install the tables and data using the information above before proceeding.
It checks a few more things (all with result "GOOD") and finally it displays this message:
Install was successful.
Continue to log into Mantis
The previous word "Continue" appears as a hyperlink leading to login_page.php. When I click it, it leads right back to this pre installation check page.
The thing is, the database is created! And the first time I encountered the sql queries I ran them, so the tables are indeed created.
Attempting to connect to database as admin GOOD
Attempting to connect to database as user GOOD
Checking Database Server Version
Running mysql version 5.5.25
My PHP version is 5.3.14.
The Mantis version i'm trying to install is 1.2.11.
Any ideas as in what it is I am doing wrong? Or any other piece of information I could provide?
I realize now that this is not the best place for this question. Nonetheless, in case someone else happens tu stumble across this, I wanted to let know the only workaround I could find was installing another Mantis version: 1.1.1. Very old, but it worked!

Oracle Connection String With Windows Authentication

We have a requirement to make our products work on Oracle as well as SQL Server (around which they were originally built). Unfortunately we don't have any in house Oracle development experience to speak of but as a senior dev it has fallen to me to lead the project. So far I have managed to make our app connect to an Oracle database (I'm using Oracle XE 11.2) by using the following connection string:
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VS010-ORA11GR1)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=DEVORA)));User Id=dbo;Password=dbo;
The reason we decided to use this type of connection string is because we do not want to rely on changing tnsnames.ora on every client machine. However, as you can see this specifies an Oracle user and associated password. We also need to provide the ability to use the equivalent of SQL Server integrated security.
According to the literature I have read, to do this I simply need to specify / as the user id and then omit the password portion (as this is ignored anyway for Windows authentication). I also created the user in Oracle, making sure it matched the Windows user, with the following snippets:
CREATE USER "OPS$<DOMAIN>\<user>" IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO "OPS$<DOMAIN>\<user>";
I also checked that the sqlnet.ora file on my local machine which hosts the XE instance and my dev environment contained the line:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
I understood that this would enable my app to connect to the Oracle database uing Windows Authentication. However what actually happens is that I get the following Oracle error message:
ORA-01005: null password given; logon denied
this doesn't make much sense because of course its null - it's supposed to be, according to the tutorials I've read.
The app targets .Net Framework 3.5, we are using the System.Data.OracleProvider and the actual connecting and so on is handled by Enterprise Library 5. Incidentally, I am aware of the deprecation of the OracleClient component but I just want this to work before I go into the extra complexities of changing providers.
Can anyone tell me what I'm missing? Have I chosen the wrong type of connection string? I apologise for any basic mistakes but I have always managed to avoid Oracle until now so my knowledge of it is close to zero.
Many thanks
I had the same problem and solved after adding this to conn. string:
Integrated Security=yes
To expand on the answer above by #Stikut. I tested this out with NHibernate 3.3.3.GA and it works.
user id=/;password=;Integrated Security=yes

How do I browse databases on an Oracle Server?

So I'm coming from a position as a SQL Server developer who has written a little bit of PL/SQL way back in the mists of time but effectively knows nothing.
I've got a laptop, it's running Oracle. There is a database on the laptop which I need to have a look at and neither I, nor anyone else I can speak to, knows what it's called.
I have a couple of logins including one which alleges to be an Admin login.
What's the easiest way to browse the databases on the server and then connect to one?
I suspect that my assumptions about relationships between servers, users and databases from SQL Server are leading me astray but right now I can't get past idea that the client tools Oracle ships are someone's idea of a joke but I'm really not finding it that funny.
I'm pretty sure that it's version 9.2 that's running.
Happy to provide more information but right now I don't know where to start.
If this is windows look in the services. Each database will have a separate service. By default these are named OracleServiceDATABASENAME.
You may be able to connect with just this information on the default port 1521.
If that does not work open the properties of that service you can find the location of the oracle home. The default place to keep your connection information in the ORACLEHOME\network\admin\tnsnames.ora . Using the database name you can find your connect information in this file.
If this is linux/unix look in the /etc/oratab file. This should have the database name and oracle home listed. The default location of the tnsnames.ora file is the same as on windows.
Once you have this information you can use any of the tools mentioned above to connect to the database.
I don't know what qualifies as "easiest" in your book. I'm moderately fond of Aqua Data Studio (www.aquafold.com); it's nice & visual & pretty & all. It's also Not Cheap, but might be worth a 2-week evaluation to see if it does anything helpful for you. I'm not an expert on this, and I joined an Oracle-based group from a SQL Server background; that's the tool they were using at the time, and I've found it extremely usable. But that's just me. Good luck.
Check out Oracle SQL Developer. (It's free)
I'm not a SQL Server expert, but there are differences in terminology.
An Oracle "Instance" is a single entity of the Oracle software. A database is the actual logical data that the instance serves. You may have multiple instances of the Oracle database software running against one database (This is considered a RAC setup); or just one instance running against one database.
I'm assuming what you mean by database here is actually the different schemas/users/tablespaces/procedures etc. that you have within an Oracle database. In that case, Oracle SQL Developer should do the job nicely.
If you are able to utilize Enterprise Manager (this is a licensed option), it provides this functionality as well, though it is more cumbersome than SQL Developer IMHO. EM does provide many other tools for providing a general overview of your Oracle instance health, alerts, and many things used to help tune the performance of your Oracle instance.
In Windows, the following command lists running database services:
net start | findstr -i ora
In Unix/Linux, grepping for the Oracle SMON process will give you the names of running databases:
ps -ef | grep smon

Resources