SQLite3
Wenn man bequem in eine SQLite3-DB schauen möchte, geht das am besten mit dem Sqlite-Browser
Download: https://sqlitebrowser.org/dl/
Tabelle aufrufen
root@ns01: cd /srv/powerdns/sqlite3
root@ns01: sqlite3
SQLite version 3.11.0 2016-02-15 17:29:24
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open powerdns.sqlite3
Tabellen auflisten:
sqlite> .tables
comments domainmetadata records tsigkeys
cryptokeys domains supermasters
Tabellen anzeigen (z.B. von records)
sqlite> .schema records
CREATE TABLE records (
id INTEGER PRIMARY KEY,
domain_id INTEGER DEFAULT NULL,
name VARCHAR(255) DEFAULT NULL,
type VARCHAR(10) DEFAULT NULL,
content VARCHAR(65535) DEFAULT NULL,
ttl INTEGER DEFAULT NULL,
prio INTEGER DEFAULT NULL,
change_date INTEGER DEFAULT NULL,
disabled BOOLEAN DEFAULT 0,
ordername VARCHAR(255),
auth BOOL DEFAULT 1,
FOREIGN KEY(domain_id) REFERENCES domains(id) ON DELETE CASCADE ON UPDATE CASCADE
);
CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);
CREATE INDEX orderindex ON records(ordername);
Tabelleneinträge anzeigen (z.B. von records)
sqlite> SELECT * FROM records;
1|1|meinedomain.de|SOA|ns01.meinedomain.de hostmaster.meinedomain.de 1 10800 3600 604800 3600|3600|0||0||1
2|1|meinedomain.de|NS|ns01.meinedomain.de|3600|0||0||1
3|1|vm0039.meinedomain.de|A|10.97.9.128|3600|0||0||1
sqlite3 verlassen
sqlite> .quit
Alle SQLite Kommandos:
sqlite> .help
No comments to display
No comments to display