# HG changeset patch # User Oleksandr Gavenko # Date 1412674500 -10800 # Node ID 5f433b1c2d6aeeb3e1ef4e5b2aa6bb75a489f4b9 # Parent 1559575ac211c0a65316c79b3111976e4d34f81f# Parent eacf6cd64bd9725a6e897fd5bd86bea7049440c1 merged diff -r 1559575ac211 -r 5f433b1c2d6a csv.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/csv.rst Tue Oct 07 12:35:00 2014 +0300 @@ -0,0 +1,17 @@ +.. -*- coding: utf-8; -*- +.. include:: HEADER.rst + +====== + CSV. +====== +.. contents:: + +DBF to CSV. +=========== +:: + + $ sudo aptitude install libdbd-xbase-perl + $ dbf_dump --fs="=" BSPR.DBF > BSPR.csv + +Seems that ``dbf_dump`` can't quote fields, so use rare char as separator! + diff -r 1559575ac211 -r 5f433b1c2d6a oracle.rst --- a/oracle.rst Sun Oct 05 17:19:37 2014 +0300 +++ b/oracle.rst Tue Oct 07 12:35:00 2014 +0300 @@ -41,38 +41,70 @@ end; / -Информация о таблицах в БД Oracle. -================================== +Database info. +============== + +List of users:: + + select distinct(OWNER) from ALL_TABLES; -Список таблиц:: +List of current user owned tables:: - select * from user_tables; + select * from USER_TABLES; + select TABLE_NAME from USER_TABLES; -Занимаемый размер таблиц и индексов:: +List of tables by owner:: - select segment_name, segment_type, sum(bytes) from user_extents - group by segment_name, segment_type order by sum(bytes); + select OWNER || '.' || TABLE_NAME from ALL_TABLES + order by OWNER; - select sum(bytes) from user_extents; +List of current user table sizes:: + + select SEGMENT_NAME, SEGMENT_TYPE, sum(BYTES) from USER_EXTENTS + group by SEGMENT_NAME, SEGMENT_TYPE order by sum(BYTES); -Список индексов по таблицам:: + select sum(BYTES) from USER_EXTENTS; + +Tables indexes:: - select * from user_indexes order by table_name; + select * from USER_INDEXES order by TABLE_NAME; -Список размеров индексов по таблицам:: +List of index sizes:: select index_name, table_name, sum(user_extents.bytes) as bytes from user_indexes left outer join user_extents on user_extents.segment_name = table_name group by index_name, table_name order by table_name; -Список ограничений:: +List of tables without primary keys:: - select * from user_constraints; + select OWNER || '.' || TABLE_NAME from ALL_TABLES + where TABLE_NAME not in ( + select distinct TABLE_NAME from ALL_CONSTRAINTS where CONSTRAINT_TYPE = 'P' + ) and OWNER in ('USER1', 'USER2') + order by OWNER, TABLE_NAME; + +List of currenct user constraints:: + + select * from USER_CONSTRAINTS; + +List of tablespaces:: -Используемое пространство таблиц:: + select distinct TABLESPACE_NAME from USER_TABLES; + +List of current user permissions:: + + select * from SESSION_PRIVS; + +List of user permissions to tables:: - select distinct tablespace_name from user_tables; + select * from ALL_TAB_PRIVS where TABLE_SCHEMA not like '%SYS' and TABLE_SCHEMA not like 'SYS%'; + +List of user privileges:: + + select * from USER_SYS_PRIVS + select * from USER_TAB_PRIVS + select * from USER_ROLE_PRIVS Profiling. ========== diff -r 1559575ac211 -r 5f433b1c2d6a ssh.rst --- a/ssh.rst Sun Oct 05 17:19:37 2014 +0300 +++ b/ssh.rst Tue Oct 07 12:35:00 2014 +0300 @@ -22,7 +22,7 @@ $ ssh-keygen -t dsa -f my_dsa_key # store priv key under my_dsa_key # and pub key under my_dsa_key.pub - $ ssh-keygen -y -f my_dsa_key # recover pub key from priv + $ ssh-keygen -y -f ~/.ssh/id_dsa >~/.ssh/id_dsa.pub # recover pub key from priv $ ssh-keygen -p -N "newphrase" -P "oldphrase" -f ~/.ssh/id_dsa # change passphrase of priv key diff -r 1559575ac211 -r 5f433b1c2d6a web-search.rst --- a/web-search.rst Sun Oct 05 17:19:37 2014 +0300 +++ b/web-search.rst Tue Oct 07 12:35:00 2014 +0300 @@ -25,10 +25,11 @@ ================= http://www.mail-archive.com/ - turns your mailing list into a searchable archive + Turns your mailing list into a searchable archive. http://www.gmane.org/ - USENET gateway/archive service, some lists may have delay in - indexing. + USENET gateway/archive service, some lists may have delay in indexing. + http://markmail.org/ + Free service for searching mailing list archives. Image by image search. ======================