Pre-Migration activities
Pre-Migration activities
-- for example, to set max server memory to 6Gb on a server with 8Gb physical memory
exec sp_configure 'max server memory', 6144
reconfigure with override
DECLARE
@memInMachine DECIMAL(9,2)
,@memOsBase DECIMAL(9,2)
,@memOs4_16GB DECIMAL(9,2)
,@memOsOver_16GB DECIMAL(9,2)
,@memOsTot DECIMAL(9,2)
,@memForSql DECIMAL(9,2)
,@CurrentMem DECIMAL(9,2)
,@sql VARCHAR(1000)
SET @sql = 'DECLARE @mem decimal(9,2) SET @mem = (' + @sql + ') INSERT INTO #mem(mem)
VALUES(@mem)'
PRINT @sql
EXEC(@sql)
SET @memInMachine = (SELECT MAX(mem) FROM #mem)
SET @memOs4_16GB =
CASE
WHEN @memInMachine <= 4 THEN 0
WHEN @memInMachine > 4 AND @memInMachine <= 16 THEN (@memInMachine - 4) / 4
WHEN @memInMachine >= 16 THEN 3
END
SET @memOsOver_16GB =
CASE
WHEN @memInMachine <= 16 THEN 0
ELSE (@memInMachine - 16) / 8
END
--Output findings------------------------------------------------------------------------------------------------------
SELECT
@CurrentMem AS CurrentMemConfig
, @memInMachine AS MemInMachine
, @memOsTot AS MemForOS
, @memForSql AS memForSql
,'EXEC sp_configure ''max server memory'', ' + CAST(CAST(@memForSql * 1024 AS INT) AS VARCHAR(10))
+ ' RECONFIGURE' AS CommandToExecute
,'Assumes dedicated instance. Only use the value after you verify it is reasonable.' AS
Comment----------------------------------------------------------------------
CheckHadrEnpointOwner
Users can install and run multiple versions of the .NET Framework on their computers. When you develop or
deploy your app, you might need to know which .NET Framework versions are installed on the user’s
computer. Note that the .NET Framework consists of two main components, which are versioned separately:
A set of assemblies, which are collections of types and resources that provide the functionality for your
apps. The .NET Framework and assemblies share the same version number.
The common language runtime (CLR), which manages and executes your app's code. The CLR is
identified by its own version number (see Versions and Dependencies).
To get an accurate list of the .NET Framework versions installed on a computer, you can view the registry or
query the registry in code:
For information about detecting the installed updates for each version of the .NET Framework, see How to:
Determine Which .NET Framework Updates Are Installed. For information about installing the .NET
Framework, see Install the .NET Framework for developers.
To find .NET Framework versions by viewing the registry (.NET Framework 1-4)
The installed versions are listed under the NDP subkey. The version number is stored in the Version
entry. For the .NET Framework 4 the Version entry is under the Client or Full subkey (under NDP), or
under both subkeys.
Note
The "NET Framework Setup" folder in the registry does not begin with a period.
To find .NET Framework versions by viewing the registry (.NET Framework 4.5 and
later)
Note that the path to the Full subkey includes the subkey Net Framework rather than .NET Framework.
Note
If the Full subkey is not present, then you do not have the .NET Framework 4.5 or later installed.
Check for a DWORD value named Release. The existence of the Release DWORD indicates that
the .NET Framework 4.5 or newer has been installed on that computer.
The value of the Release DWORD indicates which version of the .NET Framework is installed.