MSSQL JOIN Selection Queries

INNER JOIN: Only records with joing fields in both tables.
LEFT OUTER JOIN: All records from table 1 and only matching fields from table 2 that match on join field.
RIGHT OUTER JOIN: All records from table 2 and only matchin records from table 2 that match on join field

Below an example…

SELECT DISTINCT [Database].[dbo].[Table1].[Field1] AS [Table1-Field1]
,[Database].[dbo].[Table1].[Field2] AS [Table1-Field2]
,[Database].[dbo].[Table2].[Field3] AS [Table2-Field3]
FROM [Database].[dbo].[Table1]
INNER JOIN [Database].[dbo].[Table2] ON [Database].[dbo].[Table2].[Field0] = [Database].[dbo].[Table1].[Field0]
WHERE [Database].[dbo].[Table1].[Field1]  [Database].[dbo].[Table2].[Field3]
ORDER BY [Database].[dbo].[Table1].[Field1],[Database].[dbo].[Table1].[Field1];

 

MSAD Move FSMO Roles

Commands or tools to move or view Active Directory Flexible Single Master Operations roles.

Schema Master (1 per forrest)

regsvr32 schmmgmt.dll
mmc -> Schema

Domain Naming Master (1 per forrest)

AD Domains and Trusts

RID Master (uitgave SID’s) (1 per domain)

AD Users and Computers

Infrastructure Master (AD infrastructuur) (1 per domain)

AD Users and Computers

PDC Emulator (Time Server, log-on NT4 clients, Password chenges) (1 per domain)

AD Users and Computers

 

Netwerk IPv4 Subnetting

max aantal subnetten: 2^n (-2) // n = aantal masked bits *subnet* mask
max aantal hosts in subnet = 2^n -2 // n = ongemaskeerde bits

next multiple of 8 = next mult. of 8 greater or eq. to CIDR netmask not.
interesting value = (next multiple of 8) / 8

incremental value = 2^ (next multiple of 8 - CIDR netmask notation)

bijv. 192.168.10.50/27:
incremental value = 2^(32-27) = 2^5 = 32
interesting value = 32 / 8 = 4
netwerkadressen: 192.168.10.0, 192.168.10.32, 192.168.10.64, enz.
broadcastadressen: 192.168.10.31, 192.168.10.63, 192.168.10.95, enz.
netwerk 192.168.10.32
broadcast 192.168.1.63 (192.168.10.(64-1))

bijv. 10.6.127.255/14:
incremental value: 2^(16-14) = 2^2 = 4
interesting value = 16 / 8 = 2
netwerkadres: 10.4.0.0
broadcast: 10.7.255.255 ( 10.(8.0.0-1)