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 TOP 100 | |
| total_elapsed_time / execution_count / 1000.0 AS [平均実行時間(ミリ秒)] | |
| , total_worker_time / execution_count / 1000.0 AS [平均 CPU 時間(ミリ秒)] | |
| , total_physical_reads / execution_count AS [平均物理I/O 数] | |
| , (total_logical_reads + total_logical_writes) | |
| / execution_count AS [平均論理I/O 数] | |
| , SUBSTRING(text, (statement_start_offset / 2) + 1, | |
| ((CASE statement_end_offset | |
| WHEN -1 THEN DATALENGTH(text) | |
| ELSE statement_end_offset |
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 | |
| resource_type AS type | |
| ,resource_associated_entity_id as entity_id | |
| ,( CASE WHEN resource_type = 'OBJECT' THEN | |
| OBJECT_NAME( resource_associated_entity_id ) | |
| ELSE | |
| ( SELECT | |
| OBJECT_NAME( OBJECT_ID ) | |
| FROM | |
| sys.partitions |
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 | |
| t.name AS 'TableName', | |
| c.name AS 'ColumnName', | |
| ep.name AS 'PropertyName', | |
| ep.value AS 'PropertyValue' | |
| FROM | |
| sys.tables t | |
| INNER JOIN | |
| sys.columns c |
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
| DECLARE @SchemaName sysname, @TableName sysname, @IndexName sysname | |
| DECLARE @basesql nvarchar(max), @sql nvarchar(max) | |
| SET @basesql = 'ALTER INDEX @1 On @2 REBUILD WITH ( FILLFACTOR = 50 ) ' | |
| DECLARE IXC CURSOR FOR | |
| SELECT | |
| OBJECT_SCHEMA_NAME(i.object_id) As SchemaName | |
| , OBJECT_NAME(i.object_id) AS TableName | |
| , i.name AS IndexName |
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
| -- Find the average fragmentation percentage of all indexes | |
| -- in the HumanResources.Employee table. | |
| SELECT | |
| i.index_id, name | |
| , s.avg_fragmentation_in_percent | |
| , s.avg_fragment_size_in_pages | |
| , s.fragment_count, s.page_count | |
| FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, NULL) AS s | |
| JOIN sys.indexes AS i ON a.object_id = b.object_id AND a.index_id = b.index_id | |
| where s.avg_fragmentation_in_percent > 30 |
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 --* | |
| sql_text, | |
| sql_id, | |
| sharable_mem, | |
| fetches, executions, | |
| first_load_time, last_load_time, last_active_time, | |
| disk_reads, | |
| cpu_time, elapsed_time | |
| plsql_exec_time, rows_processed, | |
| parsing_schema_name, |
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 | |
| l.type | |
| ,ltype.Name | |
| ,ltype.description | |
| ,decode(l.lmode, | |
| 1, 'Null', | |
| 2, '行共有(SS)', | |
| 3, '行排他(SX)', | |
| 4, '共有(S)', | |
| 5, '共有/行排他(SSX)', |
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 USER_NAME,PRIVILEGE,SUCCESS,FAILURE from DBA_PRIV_AUDIT_OPTS | |
| order by PRIVILEGE; | |
| select USER_NAME,AUDIT_OPTION,SUCCESS,FAILURE from DBA_STMT_AUDIT_OPTS | |
| order by AUDIT_OPTION; | |
| -- 監査OFF設定 | |
| @rdbms\admin\undoaud.sql | |
| -- Defaultプロファイル制限確認 |
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
| { | |
| "name": "Iceberg", | |
| "foreground": "#c6c8d1", | |
| "background": "#161821", | |
| "black": "#161821", | |
| "red": "#e27878", | |
| "green": "#b4be82", | |
| "yellow": "#e2a478", | |
| "blue": "#84a0c6", | |
| "purple": "#a093c7", |
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
| @font-face { | |
| font-family: 'meiryo'; | |
| src: local('Noto sans CJK JP Regular'); | |
| } | |
| @font-face { | |
| font-family: 'メイリオ'; | |
| src: local('Noto sans CJK JP Regular'); | |
| } |