This commit is contained in:
Roger Rutishauser 2024-10-03 20:47:28 +02:00
parent ea82d96615
commit de3b52ecf8
4 changed files with 195 additions and 0 deletions

41
datentransfer/README.md Normal file
View File

@ -0,0 +1,41 @@
---
gitea: none
include_toc: true
---
# Datentransfer
## SCP
### lokal auf server
```
scp -oProxyCommand="ssh -W %h:%p ubuntu@jumphost-cosmos.docuteam.cloud" <datei.endung> ubuntu@10.0.3.137:/home/ubuntu
```
### server auf lokal
mit Jumphost.
```
scp -r -oProxyJump=ubuntu@jumphost-cosmos.docuteam.cloud butler@10.7.1.97:/home/butler/actions/clients/640/workbench/0_preparation/Sefar "/mnt/scratch/640 Sefar"
```
## rsync
https://www.tecmint.com/rsync-local-remote-file-synchronization-commands/
### Files und Ordner von Server nach lokalem Verzeichnis kopieren
```
rsync -e "ssh -i ~/.ssh/id_rsa" -avzh administrator@33766.hostserv.eu:/var/www/ig_baumfreunde .
```
oder
```
rsync -e "ssh -i ~/.ssh/id_rsa" -avzhu --ignore-existing administrator@33766.hostserv.eu:/var/www/ig_baumfreunde .
```
## robocopy
ToDo

127
oracle/README.md Normal file
View File

@ -0,0 +1,127 @@
---
gitea: none
include_toc: true
---
# Oracle DB
## search for string in entire set of tables of a db
``` sql
SET SERVEROUTPUT ON SIZE 100000
DECLARE
match_count INTEGER;
BEGIN
FOR t IN (SELECT owner, table_name, column_name
FROM all_tab_columns
WHERE owner = 'APLKN_ARCHV_SRG' and data_type LIKE '%CHAR%' AND table_name like 'TB%') LOOP
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM ' || t.owner || '.' || t.table_name ||
' WHERE '||t.column_name||' like :1'
INTO match_count
USING '%Schrank ganz hinten%';
IF match_count > 0 THEN
dbms_output.put_line( t.owner ||' --- '||t.table_name ||' --- '||t.column_name||' --- '||match_count );
END IF;
END LOOP;
END;
```
or, without owner:
``` sql
SET SERVEROUTPUT ON SIZE 100000
DECLARE
match_count INTEGER;
BEGIN
FOR t IN (SELECT TABLE_NAME, COLUMN_NAME
FROM all_tab_columns
WHERE data_type LIKE '%CHAR%' AND TABLE_NAME LIKE 'TB%') LOOP
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM ' || t.TABLE_NAME ||
' WHERE '||t.COLUMN_NAME||' like :1'
INTO match_count
USING 'Conclusion of Peace between Russia and Esthonia%';
IF match_count > 0 THEN
dbms_output.put_line( t.TABLE_NAME ||' --- '||t.COLUMN_NAME||' --- '||match_count );
END IF;
END LOOP;
END;
```
## get physical storage place of archval description 88176
``` sql
SELECT
tbs_bhltn.bhltn_def_stand_ort_cd
FROM
APLKN_ARCHV_SRG.tbs_vrzng_enht a
LEFT OUTER JOIN
APLKN_ARCHV_SRG.tbs_bhltn_vrzng_enht tbs_bhltn_vrzng_enht
ON
a.vrzng_enht_id = tbs_bhltn_vrzng_enht.vrzng_enht_id
INNER JOIN
APLKN_ARCHV_SRG.tbs_bhltn tbs_bhltn
ON
tbs_bhltn.bhltn_id = tbs_bhltn_vrzng_enht.bhltn_id
WHERE
a.vrzng_enht_id = 88176;
```
## "limit" in oracle
``` sql
select * from (
SELECT * FROM APLKN_ARCHV_SRG.TBS_GSFT_OBJ_DTL
WHERE MEMO_TXT LIKE '%Schrank ganz hinten%';
)
where ROWNUM <= number;
```
## show instance name (SID)
```sql
select sys_context('userenv','instance_name') from dual;
```
## show port and other connection params
``` sql
select * from v$listener_network;
```
## show tables
``` sql
SELECT owner, table_name FROM all_tables;
```
## get all tables with col name xy
``` sql
select table_name
from all_tab_columns -- or: dba_tab_columns
where column_name like '%GSFT_OBJ_TYP_ID%';
```
## get all physical storage
``` sql
SELECT tbs_bhltn.* FROM tbs_bhltn WHERE rownum <= 10;
```
## sqlplus
### sql file in sqlplus
```
SQL > @/oracle/scripts/script.sql
```

18
pdf-tools/README.md Normal file
View File

@ -0,0 +1,18 @@
---
gitea: none
include_toc: true
---
# PDF-Tools 3-Heights Converter
## Errors
### Fehler bei html und/oder msg Konvertierung
In `O2PWSC.ini` schauen, dass diese Settings verwendet werden:
```
[HTML]
IEPRINT=true
PageSetup = bottom=0.5,top=0.5,left=0.7,right=0.7,Print_Background=Yes,Shrink_To_Fit=Yes,footer=,header=
HTMOPT=true
```

9
postgres/README.md Normal file
View File

@ -0,0 +1,9 @@
---
gitea: none
include_toc: true
---
# PostgreSQL
## Console
To enter console mode, open CMD, go to `%APPS_PATH%\postgreSQL\bin` and run `psql -U postgres`