Na Windows SBS konzolu od Windows mali poslovni Server 2008 može pasti, prikazati „Nije dostupno” za druga upozorenja ili zahteva dosta vremena da se prikaže u bezbednosti i druga upozorenja statusi

Simptomi

Na Windows SBS konzolu od Windows mali poslovni Server 2008 može pokazati neke od sledećih simptoma.

Simptom 1

Status Nije dostupan pojavljuje se u Druga obaveštenja u odeljku Mreže Essentials rezime stranice kući .

Simptom 2

Izuzetak, koja je slična sledećoj se evidentira u Console.log datoteci:

[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)

Simptom 3

Nakon dugo vremena, u statuse se pojavljuju za bezbednost i Druga upozorenja u odeljku Mreže Essentials rezime stranice kući .

Simptom 4

Nakon dugo vremena, vrednosti se pojavljuju u koloni Bezbednosnog statusa , kao i u koloni Druga upozorenja na kartici kompjuterimrežne stranice.

Simptom 5

Kada pokušate da ručno generisanje izveštaja na kartici izveštaje , konzolu za Windows SBS može da se sruši ako je potvrđen izbor bezbednosti da biste dodali sadržaj bezbednosti izveštaj.

Uzrok

Do ovog problema dolazi zato što je baza podataka Monitoring je veoma veliki. Windows SBS Console nije moguće ispitati Monitoring baze podataka brzo.

Rešenje

Da biste rešili ovaj problem, pokrenite sledeću Windows PowerShell skriptu. Ovaj scenario smanjuje istorijske podatke u bazi podataka Monitoring smanjivanjem istorijski podaci koje je krio od 90 dana na 30 dana. Takođe, ovaj scenario kreira indekse koji se može koristiti za pokretanje upita brže. Da biste pokrenuli ovaj scenario, slijedite ove korake:

  1. Kliknite na dugme Start, u polju za pretragu otkucajte Notepad , a zatim izaberite stavku " Notepad " u rezultatu pretrage.

  2. Kopirajte i nalepite sledeću skriptu u Notepad:

    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. Sačuvajte datoteku koristeći sljedeći naziv datoteke:

    KB981939.ps1.Napomena Preporučujemo da sačuvate datoteku na lokaciju koju možete lako pristupiti. Na primer, sačuvajte datoteku u fasciklu C:\windows\temp .

  4. Napravite rezervnu kopiju datoteke baze podataka Monitoring . Da biste to uradili, sledite ove korake:

    1. Kliknite na dugme Start, u okvir za pretragu upišite Services.msc desnom tipkom miša kliknite services.msc u rezultatu pretrage i zatim kliknite na dugme Pokreni kao administrator.

      UAC Ako se od vas zatraži administratorska lozinka ili potvrda, otkucajte lozinku ili obezbedite potvrdu.

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

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

    4. Napravite rezervnu kopiju datoteke 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 na dugme Start.

  5. Kliknite na dugme Start, u polju za pretragu otkucajte PowerShell desnom tipkom miša kliknite Windows PowerShell module u rezultatu pretrage, a zatim izaberite stavku Pokreni kao administrator.

    UAC Ako se od vas zatraži administratorska lozinka ili potvrda, otkucajte lozinku ili obezbedite potvrdu.

  6. U prozoru Windows PowerShell module , promenite trenutni direktorijum za lokaciju na kojoj ste sačuvali datoteku KB981939.ps1.

  7. Upišite sljedeću naredbu da pokrenete Windows PowerShell skriptu, a zatim pritisnite taster ENTER:

    .\kb981939.ps1Napomena Morate da konfigurišete smernice za izvršavanje Windows PowerShell da dozvolite pokretanje pre pokretanja ove komande skripti. U suprotnom, dobijate sledeću poruku o grešci kada pokrenete komandu:

    Nije moguće učitati datoteku C:\KB981939.ps1 jer izvršavanje skripti je onemogućena na ovom sistemu. Molim vas pogledajte odeljak „se-pomoći about_signing” za više detalja.

    Za više informacija o konfigurisanju Windows PowerShell pogubljenje politika, posetite sledeću Microsoft TechNet Web lokaciji:

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

    Pre nego što pokrenete ovu skriptu, pratite uputstva iz t da napravite rezervne kopije datoteka baze podataka.

    Ako ste spremni da pokrenete skriptu, upišite slovo „C” da biste potvrdili da ste napravili rezervne kopije baze podataka, a zatim pritisnite „Enter”.Napomena Ako bazu podataka Monitoring je veoma veliki, scenario može se pokrenuti za 10 minuta, ili na duži vremenski period. Ako skripti ne pokreće uspješno, neophodno je da vratite rezervnu kopiju datoteke baze podataka Monitoring .

Reference

Za više informacija o ovom problemu, posetite sledeće TechNet Web lokaciji:

Potrebna vam je dodatna pomoć?

Unapredite veštine
Istražite obuku
Prvi nabavite nove funkcije
Pridružite se Microsoft insajdere

Da li su vam ove informacije koristile?

Hvala vam na povratnim informacijama!

Hvala za povratne informacije! Izgleda da će biti od pomoći ako vas povežemo sa našim agentima Office podrške.

×