Na Windows SBS konzole od Windows Small Business Server 2008 možda srušiti, prikaz "Nije dostupno" za ostale upozorenja ili zahtijevaju dugo vremena za prikaz stanja sigurnosti i drugih upozorenja

Simptomi

Na Windows SBS konzole od Windows Small Business Server 2008 možda prikazati jedan ili više sljedećih simptoma.

1. simptom

Status Nije dostupan pojavit će se Drugi upozorenja odjeljku Mreže Essentials sažetakPočetna stranica.

2. simptom

Datoteka Console.log je prijavljen iznimku sličnu sljedećoj:

[5164] 090620.094247.9164: Exception: --------------------------------------- An exception of type 'Type: System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has occurred. Timestamp: 06/20/2009 09:42:47 Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Stack: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.WindowsServerSolutions.SystemHealth.Monitoring.MonitoringSQLDataStore.GetAlertCountPerType(ComputerType type)

Simptoma 3

Nakon dugo vremena statusima pojavljuju za Sigurnost i Drugih upozorenja odjeljku Mreže Essentials sažetakPočetna stranica.

Simptoma 4

Nakon dugo vremena vrijednosti pojavljuju se u stupcu Stanje sigurnosti i Drugih upozorenja stupac na računalima karticu stranice mreže .

Simptoma 5

Kada pokušate ručno generiranje izvješća na kartici izvješća SBS konzole Windows može srušiti ako je potvrđen okvir sigurnosti za dodavanje sadržaja sigurnost izvješće.

Uzrok

Taj se problem pojavljuje jer je baza podataka nadzor vrlo velike. Windows konzola SBS ne može brzo upit nadzor bazu podataka.

Rješenje

Da biste riješili taj problem, pokrenite sljedeću skriptu Windows PowerShell. Ova skripta smanjuje povijesne podatke u bazi podataka nadzor smanjivanjem povijesni podaci čuvaju od 90 dana za 30 dana. Također, Ova skripta stvara indeksi mogu se izvoditi upite brže. Da biste pokrenuli tu skriptu, slijedite ove korake:

  1. Kliknite Start, u okvir za pretraživanje upišite Notepad , i zatim pritisnite Notepad u rezultatima pretraživanja.

  2. Kopirajte i zalijepite sljedeću skriptu u blok za pisanje:

    cls;############################################################################ SQL Scripts#########################################################################$sqlScript = @"USE [SBSMonitoring]BEGIN TRAN T1UPDATE [SBSMonitoring].[dbo].[Settings] SET [Value] = 30 WHERE [Name] = 'CleanupPeriod'COMMIT TRAN T1SELECT N'Set CleanupPeriod to 30 days'EXECUTE [SBSMonitoring].[dbo].[CleanupDatabase]SELECT N'CleanupDatabase job done.'-- Create IndexesIF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_index_WMICollectedData_5_K4_K1_K5_2')DROP INDEX [_SBS_BLOG_index_WMICollectedData_5_K4_K1_K5_2] ON [dbo].[WMICollectedData] WITH ( ONLINE = OFF )CREATE NONCLUSTERED INDEX [_SBS_BLOG_index_WMICollectedData_5_K4_K1_K5_2] ON [dbo].[WMICollectedData] ([WMIPropertyID] ASC,[ID] ASC, [WMIInstanceID] ASC) INCLUDE ( [DateCollected]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]SELECT N'Succeeded to create index _SBS_BLOG_index_WMICollectedData_5_K4_K1_K5_2'IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Reports]') AND name = N'_SBS_BLOG_index_Reports_5_K2_K3_1_4')DROP INDEX [_SBS_BLOG_index_Reports_5_K2_K3_1_4] ON [dbo].[Reports] WITH ( ONLINE = OFF )CREATE NONCLUSTERED INDEX [_SBS_BLOG_index_Reports_5_K2_K3_1_4] ON [dbo].[Reports] ([ConfigurationID] ASC, [DateGenerated] ASC) INCLUDE ([ID], [Data]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]SELECT N'Succeeded to create index _SBS_BLOG_index_Reports_5_K2_K3_1_4'IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_index_WMICollectedData_5_K2D_K4_K5')DROP INDEX [_SBS_BLOG_index_WMICollectedData_5_K2D_K4_K5] ON [dbo].[WMICollectedData] WITH ( ONLINE = OFF )CREATE NONCLUSTERED INDEX [_SBS_BLOG_index_WMICollectedData_5_K2D_K4_K5] ON [dbo].[WMICollectedData] ([DateCollected] DESC, [WMIPropertyID] ASC, [WMIInstanceID] ASC) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]SELECT N'Succeeded to create index _SBS_BLOG_index_WMICollectedData_5_K2D_K4_K5'IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Alerts]') AND name = N'_SBS_BLOG_index_Alerts_8_7_')DROP INDEX [_SBS_BLOG_index_Alerts_8_7_] ON [dbo].[Alerts] WITH ( ONLINE = OFF )CREATE INDEX [_SBS_BLOG_index_Alerts_8_7_] ON [SBSMonitoring].[dbo].[Alerts] ([DefinitionID], [ComputerID]) INCLUDE ([DateOccured])SELECT N'Succeeded to create index _SBS_BLOG_index_Alerts_8_7_'-- Create StatisticsIF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_stat_WMICollectedData_5_1_4')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_stat_WMICollectedData_5_1_4]CREATE STATISTICS [_SBS_BLOG_stat_WMICollectedData_5_1_4] ON [dbo].[WMICollectedData]([WMIInstanceID], [ID], [WMIPropertyID])SELECT N'Succeeded to create statistics _SBS_BLOG_stat_WMICollectedData_5_1_4'IF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_dta_stat_WMICollectedData_4_1_5_2_3')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_dta_stat_WMICollectedData_4_1_5_2_3]CREATE STATISTICS [_SBS_BLOG_dta_stat_WMICollectedData_4_1_5_2_3] ON [dbo].[WMICollectedData]([WMIPropertyID], [ID], [WMIInstanceID], [DateCollected], [StatusID])SELECT N'Succeeded to create statistics _SBS_BLOG_dta_stat_WMICollectedData_4_1_5_2_3'IF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_dta_stat_WMICollectedData_5_1_3_4')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_dta_stat_WMICollectedData_5_1_3_4]CREATE STATISTICS [_SBS_BLOG_dta_stat_WMICollectedData_5_1_3_4] ON [dbo].[WMICollectedData]([WMIInstanceID], [ID], [StatusID], [WMIPropertyID])SELECT N'Succeeded to create statistics _SBS_BLOG_dta_stat_WMICollectedData_5_1_3_4'IF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_dta_stat_WMICollectedData_5_4_2')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_dta_stat_WMICollectedData_5_4_2]CREATE STATISTICS [_SBS_BLOG_dta_stat_WMICollectedData_5_4_2] ON [dbo].[WMICollectedData]([WMIInstanceID], [WMIPropertyID], [DateCollected])SELECT N'Succeeded to create statistics _SBS_BLOG_dta_stat_WMICollectedData_5_4_2'IF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_stat_WMICollectedData_2_1_5')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_stat_WMICollectedData_2_1_5]CREATE STATISTICS [_SBS_BLOG_stat_WMICollectedData_2_1_5] ON [dbo].[WMICollectedData]([DateCollected], [ID], [WMIInstanceID])SELECT N'Succeeded to create statistics _SBS_BLOG_stat_WMICollectedData_2_1_5'IF EXISTS (SELECT * FROM sys.stats WHERE object_id = OBJECT_ID(N'[dbo].[WMICollectedData]') AND name = N'_SBS_BLOG_stat_WMICollectedData_1_3_5_2')DROP STATISTICS [dbo].[WMICollectedData].[_SBS_BLOG_stat_WMICollectedData_1_3_5_2]CREATE STATISTICS [_SBS_BLOG_stat_WMICollectedData_1_3_5_2] ON [dbo].[WMICollectedData]([ID], [StatusID], [WMIInstanceID], [DateCollected])SELECT N'Succeeded to create statistics _SBS_BLOG_stat_WMICollectedData_1_3_5_2'"@;$userInput = Read-Host -Prompt @"Before running this script, follow the instructions in the Knowledge Base article 981939 to back up your database files.  If you are ready to run the script, type the letter 'Y' to confirm that you have backed up the database, and then press 'Enter'. "@;if([System.String]::Compare($userInput, "Y", $true) -ne 0){exit;}################################################################################## Save the sql file to temp folder###############################################################################$sqlFile = [System.IO.Path]::Combine($Env:TEMP, "UpdateSBSMonitoring.sql");$sqlScript | Out-File -FilePath "$sqlFile" -Force;################################################################################## Get SBS2008 log folder###############################################################################$regKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WSSG";$regVal = "ProductLogDir";$sqlLogPath =[System.Environment]::ExpandEnvironmentVariables([Microsoft.Win32.Registry]::GetValue($regKey, $regVal, $null));if([System.String]::IsNullOrEmpty($sqlLogPath)){$sqlLogPath = $Env:TEMP;}$dateTime = Get-Date;$sqlLogFile = "UpdateSBSMonitoring_{1}_{0:HH}{0:mm}{0:ss}.log" -f $dateTime, $dateTime.ToShortDateString().Replace('/', '_');$sqlLogFile = [System.IO.Path]::Combine($sqlLogPath, $sqlLogFile);################################################################################## Call " SqlCmd " to execute the sql script###############################################################################$cmdPara = " -S $Env:COMPUTERNAME\SBSMonitoring -E -i `"$sqlFile`"";Write-Host ("Sqlcmd" + $cmdPara);$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo("Sqlcmd", $cmdPara);$processStartInfo.UseShellExecute = $false;$processStartInfo.ErrorDialog = $true;$processStartInfo.CreateNoWindow = $true;$processStartInfo.RedirectStandardOutput = $true;$processStartInfo.RedirectStandardError = $true;$process = [System.Diagnostics.Process]::Start($processStartInfo);$startTime = [System.DateTime]::Now;$process.WaitForExit(); $finishTime = [System.DateTime]::Now;$stdOutput = $process.StandardOutput.ReadToEnd();$errOutput = $process.StandardError.ReadToEnd();if($process.ExitCode -eq 0 -and $errOutput.Length -eq 0){Write-Host $stdOutput;Write-Host "The script ran successfully."}else{Write-Host $stdOutput;Write-Host $errOutput;Write-Host "An error occurred while running the script. For details about this error, see the log file at $sqlLogFile.";}[System.String]::Join([System.Environment]::NewLine, `(("Sqlcmd" + $cmdPara), `("Started at: " + $startTime), `("Finished at:" + $finishTime), `"Standard Output: ", $stdOutput, `"Error Output: ", $errOutput))| Out-File $sqlLogFile -Force;
  3. Spremite datoteku koristeći naziv sljedeće datoteke:

    KB981939.ps1.Napomena Preporučujemo da spremite datoteku na mjesto koje možete jednostavno pristupiti. Na primjer, spremite datoteku u mapu C:\windows\temp .

  4. Sigurnosnu nadzor datoteke baze podataka. Da biste to učinili, slijedite ove korake:

    1. Kliknite Start, u okvir za pretraživanje upišite Services.msc services.msc u rezultatu pretraživanja desnom tipkom miša i zatim kliknite Pokreni kao administrator.

      UAC Ako se od vas zatraži administratorsku lozinku ili potvrdu, upišite lozinku ili dajte potvrdu.

    2. Pronađite servis SQL Server (SBSMONITORING) .

    3. Desnom tipkom miša kliknite servis SQL Server (SBSMONITORING) , a zatim kliknite Zaustavi.

    4. Sigurnosne kopije datoteka u sljedećoj mapi:

      C:\Programske datoteke (x86) \Microsot SQL Server\MSSQL.1\MSSQL\Data

    5. Desnom tipkom miša kliknite servis SQL Server (SBSMONITORING) , a zatim kliknite Start.

  5. Kliknite Start, u okvir za pretraživanje upišite PowerShell desnom tipkom miša kliknite Windows PowerShell module u rezultat pretraživanja i zatim kliknite Pokreni kao administrator.

    UAC Ako se od vas zatraži administratorsku lozinku ili potvrdu, upišite lozinku ili dajte potvrdu.

  6. U prozoru Windows PowerShell module promijeniti trenutni direktorij na mjesto gdje ste spremili datoteku KB981939.ps1.

  7. Upišite sljedeću naredbu da biste pokrenuli Windows PowerShell skriptu, a zatim pritisnite tipku ENTER:

    .\kb981939.ps1Napomena Morate konfigurirati pravila Windows PowerShell izvršavanja skripti za pokretanje prije pokretanja ove naredbe. U suprotnom, primit ćete sljedeću poruku o pogrešci kada pokrenete naredbu:

    C:\KB981939.ps1 datoteku nije moguće učitati jer je izvršavanje skripti onemogućena na ovom sustavu. Pogledajte "get-help about_signing" za više detalja.

    Dodatne informacije o konfiguriranju pravila za izvršavanje Windows PowerShell posjetite sljedeće web-mjesto Microsoft TechNet:

  8. Upišite Y kada primite sljedeću poruku:

    Prije nego što pokrenete ovu skriptu, slijedite upute u t sigurnosnu kopiju datoteke baze podataka.

    Ako ste spremni pokrenuti skriptu, upišite slovo Y da biste potvrdili ste napravili sigurnosne kopije baze podataka i zatim pritisnite "Enter".Napomena Ako je baza podataka nadzor vrlo velike, skripta može pokrenuti za 10 minuta ili duže vrijeme. Ako skriptu uspješno pokrenuli, morate vratiti sigurnosnu kopiju datoteke baze podataka za nadzor .

Reference

Dodatne informacije o ovom problemu, posjetite sljedeće web-mjestu TechNet:

Potrebna vam je dodatna pomoć?

Proširite svoje vještine
Istražite osposobljavanje
Prvi koristite nove značajke
Pridružite se Microsoft Insidere

Jesu li ove informacije bile korisne?

Hvala vam na povratnim informacijama!

Hvala vam na povratnim informacijama! Čini se da bi vam pomoglo kad bismo vas povezali s nekim od naših agenata podrške za Office.

×