Hot answers tagged

6

14.04 shipped with PostgreSQL 9.3, so that's what you're going to get if you use Ubuntu's repositories. If you want PostgreSQL 9.4 or newer releases you need to add a 3rd party package repository, like the official PostgreSQL repositories from http://apt.postgresql.org/ . See the instructions there for details. (You should also probably read https://help....


5

You have to use Service Names to connect to Pluggable Databases in 12c. It's just one of those things that can trip you up, I guess! SQL Plus connecting OK probably threw you.


3

The reason is the different versions installed in the two environments. The option for DEFAULT CURRENT_TIMESTAMP for datetime columns was added in 5.6 version (specifically in 5.6.5). See the doumentation about the DATE, DATETIME, and TIMESTAMP Types: The TIMESTAMP and (as of MySQL 5.6.5) DATETIME data types offer automatic initialization and updating ...


3

A (possibly obvious) additional step is become the postgres user, otherwise you may get errors about roles not existing. sudo su - postgres psql -l or psql postgres=> \l


2

Launch Shell as User: If all else fails, on Ubuntu 14.04 LTS running on AWS, try this... me@local $ ssh -i aws.pem ubuntu@foo ubuntu@foo $ sudo -u mongodb bash # OR whatever shell (zsh) mongodb@foo $ mongod --dbpath /data/db --fork OF COURSE, you'll add a much larger set of flags to the command. Note also that this assumes you're authenticated as ...


2

From here: Case insensitive table names It says: So, the final recommendation is to leave the lower_case_table_names variable unaltered (i.e. its default value), which is 0 on Linux-based systems and 2 on Windows and write table names to a lettercase that suits you best (both at creation as well as at query time). If you are moving from Windows to Linux, ...


2

Since you're on SSD you're better of disabling readahead. Seek time is not an issue for flash based drives. That's for the spinning era. It's more important to align the filesystem properly. Postgresql is using 8k pages so best performance generally comes with matching blocksize. With XFS use nobarrier and make the filesystem with proper agcount and ...


2

Files below /usr/share/postgresql/ are supposed to be data files that are not meant to be edited. They are not live configuration files. The FHS spec at https://wiki.debian.org/FilesystemHierarchyStandard defines /usr as: /usr/ Secondary hierarchy for shareable, read-only data (formerly from UNIX source repository, now from UNIX system resources) (...


2

We had 2 problems: 1) We had one mysql query that used three joins. Turns out this function was crashing Mysql. We rewrote this query to use 4 mysql queries without joins and that solved that problem. (Bit of a hot-fix, we will probably rewrite the function so it is possible to cache it). 2) We were experiencing around 99.9 % I/O wait when we only used 10% ...


2

Do you just want to use a certificate on the server which the clients use to authenticate the server? (This is the normal mode of operation). The server then authenticates the clients using password challenges just as if ssl were not being used. Or do you want to use client certificates to authenticate the clients to the server as well as the server to ...


1

You need to use sudo service to start MongoDB as a service, check the documentation for further details: sudo service mongod --auth --port 27017 --dbpath /var/lib/mongodb


1

Reproducing the situation : mc1 collection already created on shard0000 before sharding mc2 collection already created on shard0001 before sharding Create a test-shard: $ mongo --nodb mongo> config={d0:{smallfiles:"",noprealloc:"",nopreallocj : ""}, d1 : {smallfiles : "", noprealloc : "", nopreallocj : "" }}; mongo> cluster = new SharingTest({...


1

I am not too sure about this, but it seems that BDR is build into postgresql, since I added a shared_preload_library like this: shared_preload_libraries = 'bdr', it seems to be working the same as BDR or maybe better.


1

Your connection string is wrong. With easy connect you need to provide a hostname and servicename/SID. In your case you would provide sqlplus user/"SomePass"@HOSTNAME:$PORT/servicename If you want to configure your connection in the tnsnames.ora, you can connect to it using sqlplus user/"SomePass"@TNSALIAS I actually don't understand the part of your ...


1

Looks like there are some hoops with fire you need to jump thru for installing Oracle XE on Ubuntu. You may want to try following the article here: http://meandmyubuntulinux.blogspot.com/2012/05/installing-oracle-11g-r2-express.html Oracle is very finicky when it comes to installing on particular OS's. It's very specific as to what they support. However, ...


1

You have to ask yourself the question "How much is my data worth to me/the company?". Cheap solution: You could buy 2 2TB disks to replace the 2 1TB ones you already have. That would be a stop gap IMHO. RAID0 really doesn't cut the mustard these days with bit-rot and 24x7 operation. If one of your disks goes down, you'll place a lot of extra strain on the ...


1

You need to apply what MongoDB Docs say https://docs.mongodb.org/manual/tutorial/transparent-huge-pages/ I installed MongoDB 3.0.8 as couple of months ago and got the same warnings. This setting was set by Amazon. First thing to do is create a script that can enabled and disable Transaparent Pages. Documentation gives this: #!/bin/sh ### BEGIN INIT INFO # ...


1

In the original tutorial: export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` Notice the backticks. The value of NLS_LANG variable should be the output of the above command, not the file name with absolute path. Just set the value of NLS_LANG, as you already did: export NLS_LANG=AMERICAN_AMERICA.AL32UTF8


1

I don't quite understand the problem you are having - let me explain why. The SqlBinary class is just a wrapper around a byte[] which adds some nice programmer-friendly methods and properties to it. But underneath the hood it is just a byte array. You can find this out by viewing the source code here: http://referencesource.microsoft.com/#System.Data/System/...


1

That is not how you start mysql from the command line. When you type mysql in the command line it will launch the mysql-client not the mysql-server, which looks for the user/password options to be provided as arguments, if they aren't provided it will expect them to be specified in ~/.my.cnf or /etc/mysql/my.cnf. If it still can't find the details there ...


1

What version are you running? 5.6 doc gives the details: innodb_flush_log_at_trx_commit can be set (1) on the commandline, (2) in my.cnf, or (3) via SET GLOBAL. sql_safe_updates can only be set via SET SESSION or SET GLOBAL. Note that SET GLOBAL does not impact anyone currently connected (including yourself). It will effect anyone connecting later, but ...


1

This is the same issue as described here (for MySQL): High CPU usage from MySQL with no queries at all running sudo date -s now Caused by leap second and a bug in the kernel.


1

If your directory is actually /var/lib/postgres/ then this is actually an easy fix. Just create the .psql_history file in that directory, and then give the postgres user ownership of the file. Even after I did initdb and then created my test database in the /var/lib/postgres/data/ directory, a .psql_history file was not created. For some reason this has ...


1

There is a confirmed bug on Launchpad that affects PostgreSQL on Ubuntu 14.04: Bug #1334714 - User postgres can't write to /var/lib/postgresql: (Reported on 2014-06-26, Status: Confirmed) https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1334714 Bug Description Unable to write to history log. Seems to be the same problem as bug ...


1

You have to configure the following two files pg_hba.conf host all all 0.0.0.0/0 md5 postgresql.conf listen_addresses='*' Make sure to restart postgres service after changing the files. You have to check if the port 5432 is open: http://www.yougetsignal.com/tools/open-ports/ If it's not then add a rule to your iptables: iptables -A INPUT -s 0/0 -p ...


1

This problem was causing pain for me, where Doctrine generated capital/CamelCase table names and mysql stored them as small letter! Solved by changing my.cnf and adding lower_case_table_names = 1 under [mysqlid] section my.cnf path: under LAMPP/XAMPP... : /opt/lampp/etc/my.cnf stand alone mysql server : /etc/mysql/my.cnf restart mysql server, and ...



Only top voted, non community-wiki answers of a minimum length are eligible