Navigationslinks überspringen
Unternehmen
Leistungen
Produkte
Blog
Deutsche Seiten English Sites
Andere Blogs
Diese Liste enthält keine Elemente.
Deutsch > Blog
Blogs
installierte Updates mittels WMI auflisten
On Error Resume Next
objFSO = CreateObject("Scripting.FileSystemObject")
objTextFile = objFSO.CreateTextFile("c:\Updates.csv", True)
objDel = ";"
objTextFile.WriteLine("Caption" & objDel & "CSName" & objDel & "Description" & objDel & "FixComments" & objDel & "HotFixID" & objDel & _
"InstallDate" & objDel & "Installedby" & objDel & "InstalledOn" & objDel & "Name" & objDel & "ServicePackInEffect" & objDel & "Status")
strComputer = "."
objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
colQuickFixes = objWMIService.ExecQuery _
("Select * from Win32_QuickFixEngineering")
For Each objQuickFix In colQuickFixes
objTextFile.WriteLine(objQuickFix.Caption & _
objDel & objQuickFix.CSName & _
objDel & objQuickFix.Description & _
objDel & objQuickFix.FixComments & _
objDel & objQuickFix.HotFixID & _
objDel & objQuickFix.InstallDate & _
objDel & objQuickFix.InstalledBy & _
objDel & objQuickFix.InstalledOn & _
objDel & objQuickFix.Name & _
objDel & objQuickFix.ServicePackInEffect & _
objDel & objQuickFix.Status)
Next
installierte Software mittels WMI auflisten
On Error Resume Next

objFSO = CreateObject("Scripting.FileSystemObject")

objTextFile = objFSO.CreateTextFile("c:\software.csv", True)

objDel = ";"

objTextFile.WriteLine("Caption" & objDel & "Description" & objDel & "Identifying Number" & objDel & "Install Date" & objDel & "Install Location" & objDel & _
"Install State" & objDel & "Name" & objDel & "Package Cache" & objDel & "SKU Number" & objDel & "Vendor" & objDel & "Version")
strComputer = "."
objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
colItems = objWMIService.ExecQuery("Select * from Win32_Product", , 48)
For Each objItem In colItems
objTextFile.WriteLine(objItem.Caption & _
objDel & objItem.Description & _
objDel & objItem.IdentifyingNumber & _
objDel & objItem.InstallDate & _
objDel & objItem.InstallLocation & _
objDel & objItem.InstallState & _
objDel & objItem.Name & _
objDel & objItem.PackageCache & _
objDel & objItem.SKUNumber & _
objDel & objItem.Vendor & _
objDel & objItem.Version)
Next
Workaround - MOSS Anmeldung über https schlägt fehl.
Sie browsen eine Sharepoint Seite mit Anonymous Rechten von Extern mit einer dazwischen liegenden Firewall (ISA oder TMG). Wenn Sie jetzt auf Anmelden klicken sollte die Forms Anmeldung vom ISA Server oder TMG kommen.
 
Es kommt aber die Fehlermeldung 403 - forbidden.
Anderns sie die URL zur Anmeldung manuelle auf HTTPS funktioniert es.
 
Workaround:
Im ISA Server wie auch TMG gibt es das Verzeichnis:
C:\Programme\Microsoft ISA Server\ErrorHtmls
oder
C:\Programme\Microsoft Forefront Threat Management Gateway\ErrorHtmls
 
Dieses Verzeichnis enthalt Vorlagen die bei den entsprechenden Fehlermeldungen angezeigt werden. Gehen Sie wie folgt vor, um bei einem Fehler die URL Anforderung auf HTTPS umzulenken.
 
  1. Legen Sie Sicherheitskopien von den Dateien default.htm, defaultr.htm und defaultt.htm an
  2. Kopieren Sie in jeder dieser Dateien unter die <BODY> Klausel das folgende Skript.
  3. <! Add to C:\WINDOWS\Help\iisHelp\common\403-4.htm>
    <script>
    window.navigate("https://" + location.hostname + location.pathname);
    </script>
  4. Speichern und Rechner neu starten

Nach dem Neustart versuchen sie wieder von Extern auf die Sharepoint Seite mit Anonymous zuzugreifen und gehen dann auf Anmelden. Jetzt wird wieder Fehler 403 ausgelöst. Der Fehler wird aber nicht angezeigt, Sie werden direkt auf die entsprechende HTTPS Seite verwiesen. Dort können Sie sich anmelden und wie gewohnt weiter arbeiten.

 
MOSS 2007 - Kein Anonymous Zugriff auf Listen möglich
Sie erstellen eine Website die auf einer Publishing Site-Vorlage basiert. Sie konfigurieren die Website den anonymen Zugriff zu verwenden. Wie beispielsweise beim BLOG Template. Der Anonymous Zugriff funktioniert auch soweit, nur beim Zugriff auf Listen werden Sie zur Anmeldung aufgefordert.
 
Dieses Verhalten tritt auf, wenn das Feature zur Sperrung der Berechtigunsgstufe mit beschränktem Zugriff aktiviert ist (Limited Access permission level). Dieses Feature verhindert z.B. den anonymen Zugriff auf Listen.
 
Für weitere Details lesen Sie den Microsoft Artikel KB927082.
 
Hier die Lösung dazu, zitiert aus dem KB Artikel:
 
"Um dieses Problem zu beheben, verwenden Sie das Stadm.exe-Befehlszeilenprogramm das Sperr-Feature deaktivieren. Gehen Sie hierzu folgendermaßen vor:
  1. Klicken Sie auf Start , klicken Sie auf Ausführen , geben Sie Cmd im Feld Öffnen und klicken Sie dann auf OK .
  2. Geben Sie an der Eingabeaufforderung die folgenden Zeilen ein. Drücken Sie nach jeder Zeile die EINGABETASTE.
    cd/d %commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\BIN
    Stsadm -o Deactivatefeature - Url http:// ServerName - Dateiname ViewFormPagesLockDown\feature.xml
  3. Geben Sie exit , um die Eingabeaufforderung zu beenden.
Hinweis: Nach dem Ausführen dieses Befehlszeilenprogramm für Ihre Website müssen Sie die Websiteeinstellungen erweiterte Berechtigungen so deaktivieren Sie anonymen Zugriff umschalten. Anschließend aktivieren Sie Anonymer Zugriff erneut. Sie müssen dies tun für den Befehl für wirksam auf Inhalt, der vorhanden ist, in der Site."
 
Trace beenden - stoppen (Kill)

DECLARE @TraceID int

SET @TraceID = ?

EXEC sp_trace_setstatus @TraceID, 0

EXEC sp_trace_setstatus @TraceID, 2

Trace ermitteln

select * from ::fn_trace_getinfo(default)

Tabellen und Indexes je Data_Space inkl. Indexusage

SELECT p1.object_id

, object_name(p1.Object_id) Objectname

, p1.Partition_number

, ds.name as data_space_name

, p1.rows as rows_in_data_space

, p1.index_id

, idx.name index_name

, idx.type_desc index_type

, idx.is_unique index_is_unique

, iu.user_seeks

, iu.user_scans

, iu.user_updates

, iu.system_seeks

, iu.system_scans

, iu.system_updates

FROM sys.partitions p1

inner join sys.allocation_units au

      on p1.hobt_id = au.container_id

inner join sys.data_spaces ds

      on au.data_space_id = ds.data_space_id

inner join sys.indexes idx

      on idx.index_id = p1.index_id

      and idx.object_id = p1.object_id

inner join sys.dm_db_index_usage_stats iu

      on ((iu.index_id = idx.index_id) and (iu.object_id = idx.object_id))

where ds.name = 'PRIMARY'

order by p1.rows desc

Indexstatistiken - Details zur Verwendung

begin try 

      Select (dense_rank() over (order by s.name,t.name))%2 as l1

      ,       (dense_rank() over (order by s.name,t.name,i.name))%2 as l2

      ,           s.name as [schema_name]

      ,       t.name as [table_name]

      ,       i.name as [index_name]

      ,       i.type_desc

      ,       case when iop.object_id is NULL then '' else convert(varchar(20),iop.object_id) end as object_id

      ,       case when iop.index_id is NULL then '' else convert(varchar(20),iop.index_id) end as index_id

      ,       case when iop.partition_number is NULL then '' else convert(varchar(20),iop.partition_number) end as partition_number

      ,       case when iop.leaf_insert_count is NULL then '' else convert(varchar(20),iop.leaf_insert_count) end as leaf_inserts

      ,       case when iop.leaf_delete_count is NULL then '' else convert(varchar(20),iop.leaf_delete_count) end as leaf_deletes

      ,       case when iop.leaf_update_count is NULL then '' else convert(varchar(20),iop.leaf_update_count) end as leaf_updates

      ,       case when iop.leaf_ghost_count is NULL then '' else convert(varchar(20),iop.leaf_ghost_count) end as leaf_ghosts

      ,       case when iop.nonleaf_insert_count is NULL then '' else convert(varchar(20),iop.nonleaf_insert_count) end as nonleaf_inserts

      ,       case when iop.nonleaf_delete_count is NULL then '' else convert(varchar(20),iop.nonleaf_delete_count) end as nonleaf_deletes

      ,       case when iop.nonleaf_update_count is NULL then '' else convert(varchar(20),iop.nonleaf_update_count) end as nonleaf_updates

      ,       case when iop.leaf_allocation_count is NULL then '' else convert(varchar(20),iop.leaf_allocation_count) end leaf_allocations

      ,       case when iop.nonleaf_allocation_count is NULL then '' else convert(varchar(20),iop.nonleaf_allocation_count) end nonleaf_allocations

      ,       case when iop.leaf_page_merge_count is NULL then '' else convert(varchar(20),iop.leaf_page_merge_count) end leaf_page_merges

      ,       case when iop.nonleaf_page_merge_count is NULL then '' else convert(varchar(20),iop.nonleaf_page_merge_count) end nonleaf_page_merges

      ,       case when iop.range_scan_count is NULL then '' else convert(varchar(20),iop.range_scan_count) end as range_scan

      ,       case when iop.singleton_lookup_count is NULL then '' else convert(varchar(20),iop.singleton_lookup_count) end as singleton_lookups

      ,       case when iop.forwarded_fetch_count is NULL then '' else convert(varchar(20),iop.forwarded_fetch_count) end as forwarded_fetches

      ,       case when iop.lob_fetch_in_pages is NULL then '' else convert(varchar(20),iop.lob_fetch_in_pages) end as lob_fetches

      ,       case when iop.lob_fetch_in_bytes is NULL then '' else convert(varchar(20),iop.lob_fetch_in_bytes ) end as lob_bytes_fetched

      ,       case when iop.row_lock_count is NULL then '' else convert(varchar(20),iop.row_lock_count) end as row_locks

      ,       case when iop.row_lock_wait_count is NULL then '' else convert(varchar(20),iop.row_lock_wait_count) end as row_lock_waits

      ,       case when iop.row_lock_wait_in_ms is NULL then '' else convert(varchar(20),iop.row_lock_wait_in_ms) end as row_lock_wait_ms

      ,       case when iop.page_lock_count is NULL then '' else convert(varchar(20),iop.page_lock_count) end as page_locks

      ,       case when iop.page_lock_wait_count is NULL then '' else convert(varchar(20),iop.page_lock_wait_count) end as page_lock_waits

      ,       case when iop.page_lock_wait_in_ms is NULL then '' else convert(varchar(20),iop.page_lock_wait_in_ms) end as page_lock_wait_ms

      ,       case when iop.index_lock_promotion_attempt_count is NULL then '' else convert(varchar(20),iop.index_lock_promotion_attempt_count ) end as index_lock_promotion_attempts

      ,       case when iop.index_lock_promotion_count is NULL then '' else convert(varchar(20),iop.index_lock_promotion_count) end as index_lock_promotions

      ,       case when iop.page_latch_wait_count is NULL then '' else convert(varchar(20),iop.page_latch_wait_count) end as page_latch_waits

      ,       case when iop.page_latch_wait_in_ms is NULL then '' else convert(varchar(20),iop.page_latch_wait_in_ms) end as page_latch_wait_ms

      from sys.dm_db_index_operational_stats(db_id(),null,null,null) iop

      inner join sys.indexes i on ((iop.index_id = i.index_id) and (iop.object_id = i.object_id))

      inner join sys.tables t  on ( i.object_id = t.object_id )

      inner join sys.schemas s on ( t.schema_id = s.schema_id )

      where i.type <> 0

      order by s.name, t.name, i.name, iop.partition_number

end try

begin catch

      select

                  -100 as l1

      ,           0 as l2

      ,           N'' as [schema_name]

      ,       ERROR_SEVERITY() as table_name

      ,       ERROR_STATE() as index_name

      ,       ERROR_MESSAGE() as type_desc

      ,           ERROR_NUMBER()  as object_id

      ,           0 as index_id

      ,           0 as partition_number

      ,           0 as leaf_inserts

      ,           0 as leaf_deletes

      ,           0 as leaf_updates

      ,           0 as leaf_ghosts

      ,           0 as nonleaf_inserts

      ,           0 as nonleaf_deletes

      ,           0 as nonleaf_updates

      ,           0 as leaf_allocations

      ,           0 as leaf_page_merges

      ,           0 as nonleaf_page_merges

      ,           0 as range_scans

      ,           0 as singleton_lookups

      ,           0 as forwarded_fetches

      ,           0 as lob_fatches

      ,           0 as lob_bytes_fetches

      ,           0 as slob_fatches

      ,           0 as slob_bytes_fetched

      ,           0 as row_locks

      ,           0 as row_lock_waits

      ,           0 as row_lock_wait_ms

      ,           0 as page_locks

      ,           0 as page_lock_waits

      ,           0 as page_lock_wait_ms

      ,           0 as index_lock_promotion_attempts

      ,           0 as index_lock_promotions

      ,           0 as page_latch_waits

      ,           0 as page_latch_wait_ms

end catch

Indexstatistiken

begin try 

      Select

                  (dense_rank() over (order by s.name,t.name))%2 as l1

      ,       (dense_rank() over (order by s.name,t.name,i.name))%2 as l2

      ,           s.name as [schema_name]

      ,       t.name as [table_name]

      ,       i.name as [index_name]

      ,       i.type_desc

      ,       case when iu.object_id is NULL then '' else convert(varchar(20),iu.object_id) end as object_id

      ,       case when iu.index_id is NULL then '' else convert(varchar(20),iu.index_id) end as index_id

      ,       case when iu.user_seeks is NULL then '' else convert(varchar(20),iu.user_seeks) end as seek_user

      ,       case when iu.user_scans is NULL then '' else convert(varchar(20),iu.user_scans) end as scan_user

      ,       case when iu.user_updates is NULL then '' else convert(varchar(20),iu.user_updates) end as update_user

      ,       case when iu.last_user_seek is NULL then '' else iu.last_user_seek end as time_seek_user

      ,       case when iu.last_user_scan is NULL then '' else iu.last_user_scan end as time_scan_user

      ,       case when iu.last_user_lookup is NULL then '' else iu.last_user_lookup end as time_lookup_user

      ,       case when iu.last_user_update is NULL then '' else iu.last_user_update end as time_update_user

      ,       case when iu.system_seeks is NULL then '' else convert(varchar(20),iu.system_seeks) end as seek_system

      ,       case when iu.system_scans is NULL then '' else convert(varchar(20),iu.system_scans) end scan_system

      ,       case when iu.system_updates is NULL then '' else convert(varchar(20),iu.system_updates) end as update_system

      ,       case when iu.last_system_seek is NULL then '' else iu.last_system_seek end as time_seek_system

      ,       case when iu.last_system_scan is NULL then '' else iu.last_system_scan end as time_scan_system

      ,       case when iu.last_system_lookup is NULL then '' else iu.last_system_lookup end as time_lookup_system

      ,       case when iu.last_system_update is NULL then '' else iu.last_system_update end as time_update_system

      from sys.dm_db_index_usage_stats iu

      inner join sys.indexes i on  ((iu.index_id = i.index_id) and (iu.object_id = i.object_id))

      inner join sys.tables t on ( i.object_id = t.object_id )

      inner join sys.schemas s on (s.schema_id = t.schema_id)

      where iu.database_id = db_id() and i.type <> 0

      order by s.name,t.name,i.name

end try

begin catch

      select

                  -100 as l1

      ,           0 as l2

      ,       ERROR_SEVERITY() as table_name

      ,       ERROR_STATE() as index_name

      ,       ERROR_MESSAGE() as type_desc

      ,           ERROR_NUMBER() as object_id

      ,           0 as index_id

      ,           0 as seek_user

      ,           0 as scan_user

      ,           0 as update_user

      ,           0 as time_seek_user

      ,           0 as time_scan_user

      ,           0 as time_lookup_user

      ,           0 as time_update_user

      ,           0 as seek_system

      ,           0 as scan_system

      ,           0 as update_system

      ,           0 as time_seek_system

      ,           0 as time_scan_system

      ,           0 as time_lookup_system

      ,           0 as time_update_system

end catch

Tabellen und Indexes je Data_Space

SELECT p1.object_id

, object_name(p1.Object_id) Objectname

, p1.Partition_number

, ds.name as data_space_name

, p1.rows as rows_in_data_space

, p1.index_id

, idx.name index_name

, idx.type_desc index_type

, idx.is_unique index_is_unique

FROM sys.partitions p1

inner join sys.allocation_units au

      on p1.hobt_id = au.container_id

inner join sys.data_spaces ds

      on au.data_space_id = ds.data_space_id

inner join sys.indexes idx

      on idx.index_id = p1.index_id

      and idx.object_id = p1.object_id

order by ds.name, object_name(p1.Object_id), idx.name

 

1 - 10 Weiter

 ‭(Ausgeblendet)‬ Administratorhyperlinks

certlogo
Small Business Specialist
Impressum  | Kontaktieren Sie uns  |