This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| date -d "$(cut -f1 -d' ' /proc/uptime) seconds ago" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT pid, state, | |
| CASE WHEN wait_event is not null | |
| THEN concat(wait_event, ' (', wait_event_type, ')') | |
| ELSE NULL::text END AS lock_intel, | |
| pg_blocking_pids(pid) AS blocked_by, | |
| substr(query, 1, 20) | |
| FROM pg_stat_activity | |
| WHERE state IS NOT NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach($inputFile in get-childitem -recurse | Where-Object { @('.m4a','.aac') -contains $_.extension }) | |
| { | |
| $outputFileName = [System.IO.Path]::GetFileNameWithoutExtension($inputFile.FullName) + ".mp3"; | |
| $outputFileName = [System.IO.Path]::Combine($inputFile.DirectoryName, $outputFileName); | |
| $programFiles = ${env:ProgramFiles(x86)}; | |
| if($programFiles -eq $null) { $programFiles = $env:ProgramFiles; } | |
| $processName = $programFiles + "\VideoLAN\VLC\vlc.exe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alter database add logfile ('+DATA', '+DATA') size 100m; | |
| ... | |
| alter database drop logfile group 1; | |
| ... | |
| alter system switch logfile; | |
| alter system checkpoint; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- exécuter un snapshot sur les DEUX INSTANCES | |
| EXEC perfstat.statspack.snap; | |
| variable jobno NUMBER; | |
| BEGIN | |
| FOR inst IN (SELECT dbid, inst_id AS id FROM gv$database) LOOP | |
| STATSPACK.MODIFY_STATSPACK_PARAMETER( | |
| i_snap_level => 7, | |
| i_dbid => inst.dbid, | |
| i_instance_number => inst.id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Average DB Time over the past week | |
| select instance_number, avg(dbtime_min) avg_dbtime_min | |
| from ( | |
| select a.instance_number, begin_interval_time, end_interval_time, | |
| round((a.value-lag(a.value) over (order by a.instance_number, a.snap_id ))/1000000/60,2) dbtime_min | |
| from dba_hist_sys_time_model a, dba_hist_snapshot b | |
| where a.snap_id = b.snap_id and a.instance_number = b.instance_number | |
| and a.stat_name = 'DB time' | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| col COMPATIBILITY form a10 | |
| col DATABASE_COMPATIBILITY form a10 | |
| col NAME form a20 | |
| select group_number, name, compatibility, database_compatibility from v$asm_diskgroup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from user_password_limits; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET lines 250 | |
| COL enabled FOR a8 | |
| COL last_start_date FOR a18 | |
| COL next_run_date FOR a18 | |
| SELECT owner, job_name, enabled, | |
| to_char(last_start_date, 'YYYY-MM-DD HH24:MI:SS') last_date, | |
| to_char(next_run_date, 'YYYY-MM-DD HH24:MI:SS') next_date | |
| FROM dba_scheduler_jobs | |
| WHERE owner = 'PERFSTAT' AND job_name LIKE 'SP_%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set line 200 | |
| col columns for a100 | |
| select i.table_name, i.index_name, listagg(i.column_name, ',') within group (order by i.column_position) columns | |
| from dba_ind_columns i | |
| left join dba_constraints c on i.index_name = c.index_name | |
| where i.index_owner = '&owner' and i.table_name = '&table' | |
| group by i.table_name, i.index_name; |