While the computer isn’t powered on yet, press and hold the [F2] button of the keyboard, and then press the [Power button] (Do not release F2 button until the BIOS configuration display.).
Friday, November 26, 2021
Thursday, October 7, 2021
Linux: Change swap file
swapoff /dev/vg1/swap
lvextend -L +30GB /dev/vg1/swap
mkswap /dev/vg1/swap
swapon /dev/vg1/swap
MySQL: Increase InnoDB buffer cache memory allocation
On each host (as root):
1. Backup the existing MySQL configuration:
cp /etc/my.cnf /etc/my.cnf.bak
2. Using vi, add the following parameters to /etc/my.cnf
[mysqld]
innodb_buffer_pool_size=100G
innodb_flush_method=O_DIRECT
3. Restart the MySQL database
service mysql55-mysqld restart
mysqladmin flush-hosts -p
Wednesday, August 4, 2021
Sophos UTM Web Proxy!!!
Sophos UTM Web Proxy is a pain in the backside.
It allows access to web-based admin pages EVEN THOUGH the FIREWALL doesn't allow such access! The firewall doesn't allow access, but the web proxy does!! FFS!!!
So, for example, your ISP router configuration interface could be accessible by a guest user, albeit protected by a password. Then your ISP router is susceptible to password guessing or script-based attacks.
And it's not just your ISP router is at risk, it's everything with an admin page.
On top of that, it re-badges your (valid) connection as though it's coming from the DESTINATION network. FFS! I guess it's a proxy, so that's sort of expected.
The web proxy is sort of necessary, since it has the dual-AV scanning engine. Therefore, disabling the web proxy and using only the firewall will result in web traffic not being scanned for malware.
Friday, July 16, 2021
SQL Server: How to DBCC REPAIR_ALLOW_DATA_LOSS
USE master;
ALTER DATABASE Prod_Clone SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
USE Prod_Clone
go
--DBCC CHECKTABLE ('AIFDOCUMENTLOG', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;
--DBCC CHECKTABLE ('AIFDOCUMENTLOG') WITH NO_INFOMSGS,ESTIMATEONLY ;
DBCC CHECKDB ('Prod_Clone') WITH NO_INFOMSGS;
GO
--ALTER DATABASE Prod_Clone SET MULTI_USER;
--GO
SQL Server: small TEMPDB causes DBCC Errors
If you get the following DBCC CHECKDB errors, then the problem could simply be a small TEMPDB. I've BOLDEN the really important clue at the end of the error stack.
This was really annoying!!!!!
Msg 8964, Level 16, State 1, Line 1
Table error: Object ID 630097831, index ID 1, partition ID 72057653728051200, alloc unit ID 72057594343129088 (type LOB data). The off-row data node at page (1:35728379), slot 0, text ID 1055064064 is not referenced.
Msg 2534, Level 16, State 2, Line 1
Table error: page (1:35797497), whose header indicates that it is allocated to object ID 630097831, index ID 1, partition ID 72057653728051200, alloc unit ID 72057594343129088 (type LOB data), is allocated by another object.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:34608553) allocated to object ID 630097831, index ID 1, partition ID 72057653728051200, alloc unit ID 72057594343129088 (type LOB data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 630097831, index ID 1, partition ID 72057653728051200, alloc unit ID 72057594343129088 (type LOB data). The off-row data node at page (1:33939922), slot 0, text ID 944701440 is referenced by page (1:36219352), slot 4, but was not seen in the scan.
Msg 2533, Level 16, State 1, Line 1
Table error: page (1:34616630) allocated to object ID 630097831, index ID 1, partition ID 72057653728051200, alloc unit ID 72057594343129088 (type LOB data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
CHECKDB found 0 allocation errors and 3366 consistency errors in table 'XX' (object ID 630097831).
CHECKDB found 0 allocation errors and 3366 consistency errors in database 'DB'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (DB).
Msg 9002, Level 17, State 4, Line 1
The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'.
SQL Server: ETA of a DBCC Command
SELECT r.session_id,r.command,CONVERT(NUMERIC(6,2),r.percent_complete)
AS [Percent Complete],CONVERT(VARCHAR(20),DATEADD(ms,r.estimated_completion_time,GetDate()),20) AS [ETA Completion Time],
CONVERT(NUMERIC(10,2),r.total_elapsed_time/1000.0/60.0) AS [Elapsed Min],
CONVERT(NUMERIC(10,2),r.estimated_completion_time/1000.0/60.0) AS [ETA Min],
CONVERT(NUMERIC(10,2),r.estimated_completion_time/1000.0/60.0/60.0) AS [ETA Hours],
CONVERT(VARCHAR(1000),(SELECT SUBSTRING(text,r.statement_start_offset/2,
CASE WHEN r.statement_end_offset = -1 THEN 1000 ELSE (r.statement_end_offset-r.statement_start_offset)/2 END)
FROM sys.dm_exec_sql_text(sql_handle)))
FROM sys.dm_exec_requests r WHERE command = ('DBCC TABLE CHECK')