Seitenhistorie
...
Wenn man nicht sicher ist, ob sich um einen DB Dump im 'plain' Format handel, kann man versuchen, ihn mit less anzuzeigen. Ein solcher Dump ist nämlich einfach eine Textdatei mit den (postgresql-spezifischen) SQL Befehlen...
Script für das automatische Sichern von Postgrsdumps unter Windows/Mac
backup.bat
Upgrade (z.B. 9.1 -> 9.2)
...
Weitere Tipps zur Einrichtung von Postgres unter Linux finden sich hier.
Scripts zur Automatisierung
Scriptbeispiele, um das Sichern, Löschen, Initialisieren und Wiederherstellen von Postgresdatenbanken zu automatisieren finden sich hier.
Performance
- Linux Kernel Optimierung für PostgreSQL (noch mehr Details)
Oracle DB
Datenbank starten
Grundvoraussetzung ist, dass die Umgebungsvariablen ORACLE_HOME und ORACLE_SID gesetzt sind:
Codeblock |
---|
# env | grep -i oracle
ORACLE_OWNER=oracle
ORACLE_SID=oracle
PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/u01/app/oracle/product/11.2.0/dbhome_1/bin
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 |
Zunächst den Listener starten:
Codeblock |
---|
# /etc/init.d/oracledb start |
Manchmal reicht das nicht. Der nächste Schritt ist nun die Verbindung zum Listener mittels sqlplus:
Info |
---|
# sqlplus 'sys/sys as sysdba'
|
In diesem Beispiel ist die Datenbank noch nicht gestartet, und die Meldung 'Connected to an idle instance' ein Hinweis darauf. Innerhalb von sqlplus geht es jetzt weiter mit:
Codeblock |
---|
SQL> startup
ORACLE instance started.
Total System Global Area 966709248 bytes
Fixed Size 1340608 bytes
Variable Size 721423168 bytes
Database Buffers 239075328 bytes
Redo Buffers 4870144 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options |
Für weitere Untersuchungen in sqlplus bietet sich z.B. an:
Codeblock |
---|
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> select status from dba_tablespaces;
STATUS
---------
ONLINE
[...]
SQL> select status from user_tablespaces;
STATUS
---------
ONLINE
[...] |
Constraints
Weitere Infomationen zu einem Constraint
...
select * from user_constraints where constraint_name = 'XR_T_EO_DATENPAKETTYP___5CCMVM';
...
Performance
Performance Tuning
Siehe auch: NUCLOS-2924 Oracle Performance
DB Locks
- Oracle Locking Survival Guide
- Script für einen Baum des lock wait-for graphs
- Wann einsteht bei einem DML Statement ein Lock? (Oracle Dokumentation)
- Oracle TX row lock contention (mit Analyse SQL)
- Deadlocks (I)
- Deadlocks (II)
- Grundlagen Konsistenz (Oracle Dokumentation)
Java JDBC Treiber für Oracle DB
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
Nuclos
Alle Passwörter zurücksetzen
Codeblock | ||
---|---|---|
| ||
update <schema>.t_md_user set strpassword = null, BLNLOCKED = 0, INTLOGINATTEMPTS = 0 |
User nuclos zum Superuser machen
Codeblock | ||||
---|---|---|---|---|
| ||||
update <schema>.t_md_user set BLNSUPERUSER = 1 where STRUSER = 'nuclos' |
Nuclos User anlegen (falls User Tabelle komplett leer)
Codeblock |
---|
insert into <schema>.t_md_user (struser, struid, intversion, blnsuperuser, strfirstname, strlastname, datcreated, strcreated, datchanged, strchanged)
values ('nuclos', 'kskjsiunzaoahng', 1, true, 'the', 'master', '2014-06-01', 'nuclos', '2014-06-01', 'nuclos') |