| Comment | SQLServer Stored Procedure
PURPOSE
List properties of the Processor of the local computer.
Field list:
- Name VARCHAR(128) NOT NULL (PK)
- Info_date DATETIME NULL
- NumberOfCores INT NULL
- NumberOfLogicalProcessors INT NULL
- MaxClockSpeed INT NULL
- CurrentClockSpeed INT NULL
This procedure uses the following method:
- Create Powershell script on given dump_path
- Run the Powershell script (with xp_cmdshell) and output results to csv-file to given dump_path
- Use BULK INSERT to load the csv-file into a temp table
- Select results from the temp table (including systemdate as Info_date)
PARAMETERS
1 @dump_path VARCHAR(255) = Path to dump scriptfile (ps1) and datafile (csv) to.
EXAMPLES
EXEC [dbo].[prc_ps_processor] @dump_path = 'C:\Data\Temp';
USED OBJECTS
- xp_cmdshell (extended stored procedure, needs config parameter xp_cmdshell=1)
- powershell (external program)
- dbo.prc_save_text_to_file (SP in local database)
- dbo.fun_FolderExist (UDF in local database)
- dbo.fun_DeleteFile (UDF in local database)
- dbo.fun_FileExist (UDF in local database)
HISTORY
2026-01-24 - Created procedure
TAGS
<program>
<description>List properties of the Processor of the local computer</description>
<generic>1</generic>
<author>Gerrit Mantel</author>
<created>2026-01-24</created>
<lastmodified>2026-01-24</lastmodified>
</program> |