How to access Alfresco database via url? - database

in my alfresco-global.properties file it says:
db.url=jdbc:postgresql://localhost:5432/${db.name}
I want to know how to access this database in the browser?

The default PostgreSQL client application is psql. If you can't install this or if you want to use a GUI client, the PostgreSQL community maintains a list of GUI clients.
Every client either asks you for credentials or will present you a form where you can enter them.
The JDBC URL from your question is
jdbc:postgresql://localhost:5432/${db.name}
My guess is that db.name is equal to alfresco. So the complete JDBC URL would be
jdbc:postgresql://localhost:5432/alfresco
If you have installed Alfresco only your local computer, this would be the JDBC URL to use with a client that uses JDBC. If you have installed Alfresco on a different computer, you would have to replace localhost with the host name of this computer.

To connect to alfresco data base you can use any Postgresql client, by the way, alfresco install pgAdmin client.
To use this client you shoud open {alfresco_install_directory}/postgresql/bin/pgAdmin3, add new server and type database credentials(host, port ...) from alfresco-global.properties.
Edit
This is an example of configuration, you can find all what you need in alfresco-global.properties.

In case you have made the default installation(postgresql), you cant.
If you have switched the database to mysql you could use something like php admin or similar. Hope it helps.

Related

Power Bi PostgreSQL data import error - The remote certificate is invalid according to the validation procedure.'"

I am trying to connect PostgreSQL database to Power Bi. Database is hosted on Heroku. I am getting the following error -
An error happened while reading data from the provider:
'The remote certificate is invalid according to the validation procedure.
I think i am getting this error because it needs "sslmode=require". but I am not sure how to proceed.
Can someone help me with this problem.
Thanks in advance.
These steps should help you connect to Power BI desktop via ODBC. Note, you should probably create a follower database in heroku so you're not using your production database credentials.
Download PostgreSQL ODBC driver and install. Note, be sure to check the GAC option during installation (https://www.postgresql.org/ftp/odbc/versions/msi/).
Restart computer.
Open Power BI and click "Get Data" button in the ribbon.
Click "Other" and then select "ODBC".
Choose "None" as the data source name.
Click the "Advanced options" and enter this connection string:
Driver={PostgreSQL Unicode};Server=HEROKU_HOST, where HEROKU_HOST is the "Host" from your heroku database credentials (example: ec2-xx-xxx-xx-xx.xxx.amazon.com).
On the next screen, enter the user name (user from heroku db credentials), password (password from heroku db credentials), and for connection string enter the following (with HEROKU_XXXX replaced with your info:
PORT=HEROKU_PORT;DATABASE=HEROKU_DATABASE;POOLING=True;MINPOOLSIZE=1;MAXPOOLSIZE=20;HOST=HEROKU_HOST;COMPATIBLE=2.2.3.0;USER ID=HEROKU_USER;PASSWORD=HEROKU_PASSWORD;SSLMODE=require
I don't use Heroku but had a similar problem with AWS and had to configure the db provider and certificates as described below. I would think that something similar is needed for Heroku.
I did some digging and found 2 possible solutions for Heroku:
Supply the additional settings sslmode=Require;Trust Server Certificate=true in the database connection. This does not seem to be an option with PowerBI, because even under "Advanced Settings" there is nowhere to provide these.
Download the certificate for you database as described here and then follow much the same process as I did below to register the certificate with Windows. If Heroku supplies a P7B (PKCS#7 or pfx (PKCS#12) format certificate you can register that with Windows without having to do the conversion I described.
My setup of the Npgsql provider and AWS Certificates
PowerBI and Excel support connections to Postgres using the Npgsql .NET Data Provider. This provider is not installed by default on Windows. Here's how to install it:
Download the appropriate .msi installer from the Npgsql releases page. The version you need depends on your version of Excel. I am running Office 365, which required version 4.0.x (I installed 4.0.10, download here).
Run the installer. During the install there is an option to install to the GAC which is switched off by default - you must select to have the files installed to the GAC.
Reboot your computer and you should be able to connect setup a Postgres connection in PowerBI or Excel.
AWS RDS Postgres - additional requirement
If you are connecting to a Postgres cluster running in AWS, when you attempt to connect to Postgres after installing the Npgsql provider you may get an error saying:
"The remote certificate is invalid according to the validation procedure"
Here's how to fix it:
Download the public keys for AWS RDS regions: https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
Convert the bundle to a Windows certificate in P7B/PKCS#7 format. There are many ways to do this, and easy one is to use https://www.sslshopper.com/ssl-converter.html.
In Windows, search for the "Manage User Certificates" utility and open it.
Right-click on "Trusted Root Certificate Authorities", "All Tasks", "Import..."
Select the .p7b file which was the output of converting the AWS keys to P7B format.
Choose to place all certificates in the Trusted Root Certification Authorities store.
You will probably have to confirm for each certificate - there is one per AWS region
You should now be able to connect to your AWS RDS Postgres database from PowerBI or Excel.
You need to check if the host based authentication in your postgres database is allowing this from connection from POWERBI.
[https://www.postgresql.org/docs/current/auth-pg-hba-conf.html][1]
The file is usually available in the postgres data folder and the structure is like below. Make sure the client host, username have the right permissions to access the database.
local database user auth-method [auth-options]
Note: If you are using a cluster manager like patroni, the pg_hba.conf file will be overwritten by Patroni every time you edit it. you will have to edit this configuration from the patronictl command.

Can I access my oracle database if I select the Desktop class when I install oracle database in my server

Can some body tell me that whether I can access my oracle database from my notebook, if I select the Desktop class when I install oracle database in my server.
And if I can, what I should do? (I just want to try to connect my oracle database in server from my notebook using SQL developer tool.)
enter image description here
Accessibility doesn't differ based on Server / Desktop class. This two class is basically for configuration. For example, if you select server class, then it is expected that you are installing it for production environment which may require to configure it with different options. So, if you select desktop class, it will take you to the simple screen with minimum configuration items. So, you can install desktop class on the server too.
To connect, you need connection string. Yes, you can connect from sqldeveloper too from your laptop. You need to create connection string by providing username, password, server ip/address, port, sid name.
Check the screen shot in this link:
https://www.google.com/imgres?imgurl=http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/paas/accessdbinstance/images/AccessDBInstance_OBE_connect_db_service.jpg&imgrefurl=https://apexapps.oracle.com/pls/apex/f%3Fp%3D44785:112:2859948781695::::P112_CONTENT_ID,P112_PREV_PAGE:11368&h=417&w=670&tbnid=oQJTUwkQNk7MDM:&tbnh=131&tbnw=211&usg=__5lgQ5gu8SrkZL9KoGkU0HP0mugk=&vet=10ahUKEwielOGHgvTTAhUTSI8KHTtJDOEQ9QEIJTAA..i&docid=d34NHq-Krt96NM&sa=X&ved=0ahUKEwielOGHgvTTAhUTSI8KHTtJDOEQ9QEIJTAA

Apex Listener(ords) installation to different server

I have two different servers. One of them includes Oracle db and Apex listener. I want to setup the Apex listener(ords) on a different server. So users cant reach db server directly. How can I configure this installation? Is there any way to do that?
That's actually the standard practise. Keep the ords on a separate application server.
On the application server you need the following.
Oracle JAVA
Application server (if not standalone). I.e. tomcat or glassfish
Port access to the database. I.e. 1521
If you have those you can set it up.

Connect PhpMyAdmin to database in server

I have PhpMyAdmin and MySQL running in Windows 8.
I have installed them using Apache friends XAMPP v 3.1, so I didn’t do any configuration myself.
Currently if I go to localhost/phpmyadmin">http://localhost/phpmyadmin, then it automatically shows my local MySQL db and tables.
That I need is connect to remote server(it has MySQL) and runnig locally in my machine , for teh user of one app.
How can I connect to that server from phpmyadmin.
I’ve been trying to find if there any kind of connect panel in phpmyadmin, but no fruit yet.
For rather severe security reasons applicable servers to connect to are not configured at runtime but in the core configuration file config.inc.php. Otherwise a single hacked database account on an edge server could easily expose the entire network for brute force hacking, or tunneling into LAN-only unsecured databases.

Silverlight SQL 2005

I want to allow a user to provide their SQL login credentials, and display local SQL tables, stored procs, etc. in a listing. Is this possible? Note: I do not want to install some local, small SQL variant. I'm talking about the full version of SQL 2005+ that's already sitting on a developer's workstation.
Silverlight provides no mechanism for connecting to a SQL Database directly. You either need to provide a set of web services to interface with your data source or use ADO.NET Data services.
Connecting to a local SQL database using Silverlight alone isn't possible.
Something I almost missed is that you don't want to connect back to a database on the web server. You want information about a possible sql server instance on the user's (developer's) local machine. That isn't possible from within Silverlight alone.
I had thought you might be able to send the credentials on to the web server, have it dynamically generate a connection string, and then use the information_schema views to return lists of tables and views like any other data source. But that won't work.
However, in that scenario the web server is essentially acting as a proxy for your silverlight app. You might be able to build something else to act a proxy instead. Perhaps a small clickonce winforms app. That would install from a web page via hyperlink, so you could craft a link to install it on the page hosting your silverlight app.
With silverlight you cannot access the local machine/network resources. you will need to use wpf/xbap.

Resources