Lapas

pirmdiena, 2026. gada 12. oktobris

Check - is computer EntraID connected device

 To check - is computer EntraID connected device - run in CMD command:

dsregcmd /status

Check for status:

AzureAdJoined: YES
EnterpriseJoined: YES

ceturtdiena, 2026. gada 26. marts

SQL top 10 largest tables

Query returns TOP 10 largest db tables
  
select top 10 schema_name(tab.schema_id) + '.' + tab.name as [table],
    cast(sum(spc.used_pages * 8)/1024.00 as numeric(36, 2)) as used_mb,
    cast(sum(spc.total_pages * 8)/1024.00 as numeric(36, 2)) as allocated_mb
from sys.tables tab
    inner join sys.indexes ind 
        on tab.object_id = ind.object_id
    inner join sys.partitions part 
        on ind.object_id = part.object_id and ind.index_id = part.index_id
    inner join sys.allocation_units spc
        on part.partition_id = spc.container_id
group by schema_name(tab.schema_id) + '.' + tab.name
order by sum(spc.used_pages) desc

trešdiena, 2023. gada 1. novembris

Exceeded the Maximum Number of Computer Accounts Allowed to Create in this Domain

 It happens because of default AD ms-DS-MachineAccountQuota value which is 10.

The workaround is to delegate custom rights for specific account:

1. Open the Active Directory Users and Computers snap-in.

2. Right-click the container under which you want the computers added, and press Delegate Control.

3. Press Next.

4. Press Add.

5. After adding all the users and/or groups, press Next.

6. Select Create custom task to delegate and press Next.

7. Select Only the following objects in the folder, check Computer objects, check the Create selected objects in this folder box, and press Next.

8. Check the Create all child object box and press Next.

9. Press Finish.

 Source: community.spiceworks.com

ceturtdiena, 2020. gada 3. septembris

Reset MySQL root password on Windows



Stop MySQL service
Give user full access to /data folder

Command line:
mysqld --skip-grant-tables
mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password') where USER='root'; 
mysql> FLUSH PRIVILEGES;

ceturtdiena, 2020. gada 25. jūnijs