SQL server services status- powershell
Do anybody have powershell script to monitor listed sqlserver instances services and send an email alert when the services stoped stat? that results should store in database?
Hi RoyalM,
The script can get the sql services on local server, and will sends email when the sql service stops.
Get-Service | where-Object{$_.name -like '*sql*'} | foreach{
if ($_.status -eq "stopped"){
$message = "sql service "+$_.name+" is stopped"
send-mailmessage -to "User01 <[email protected]>" -from "User02 <[email protected]>" -subject $message}
I hope this helps.
Similar Messages
-
C# script to check SQL server Service Status
Dear,
i want any console application or asp.net web site project which give me sql server services status of my and other local machine which is using same network connect with other machine name.
in other word, i want such asp.net website project or console application when i run it give me status of all sql server service status of other specific machine
plz help me
Asif MehmoodJust connect to the machines
SCM and query it.
Use the
ServiceController class and especially this
ServiceController constructor (String, String) to connect to remote machines.
You may use the static
ServiceController.GetServices(String) method instead of manually connecting to the remote SCM.
E.g.
namespace Samples
using System;
using System.ServiceProcess;
class Program
static void Main(string[] args)
ServiceController[] serviceControllers;
serviceControllers = ServiceController.GetServices("hoffmann-04");
foreach (ServiceController serviceController in serviceControllers)
Console.WriteLine("{0}", serviceController.ServiceName);
Console.WriteLine("\t{0}\n", serviceController.DisplayName);
Console.WriteLine("Done.");
Console.ReadLine();
When running this code within a ASP.NET application, this means that it will run in the ASP.NET application pool. This pool uses normally a local, restricted account, which does not possess the necessary priveleges to query a remote SCM.
E.g. for SQL Server services:
namespace Samples
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
class Program
static void Main(string[] args)
List<ServiceController> serviceControllers;
serviceControllers = ServiceController.GetServices(".")
.Where(sc => sc.ServiceName.Contains("SQL")).ToList();
foreach (ServiceController serviceController in serviceControllers)
Console.WriteLine("{0}: {1}", serviceController.ServiceName, serviceController.Status);
Console.WriteLine("\t{0}\n", serviceController.DisplayName);
Console.WriteLine("Done.");
Console.ReadLine(); -
SQL Server services having stop
We're using SQL server 2008 r2 but having lot of issues. My application running on SQL server but it stop everyday. SQL services stop then my application automatic hang then i restart the server then after my application work.
Hi harigaurav,
If SQL Server Services stop regularly every day, then you can check the Start Mode for the services in SQL Server Configuration Manager, check the Windows Scheduler or use some monitor tools to monitor SQL Server services status.
If SQL Server Services always stop unexpectedly, we can configure SQL Server Agent to restart the SQL Server and SQL Server Agent services automatically. To configure automatic service restart:
Open the SQL Server Management Studio Management folder, right-click the SQL Server Agent entry, and select Properties.
On the General page, select the Auto Restart SQL Server If It Stops Unexpectedly check box.
Here, you should also select the Auto Restart SQL Server Agent If It Stops Unexpectedly check box.
Click OK.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Query to Find what SQL Server services running, what status and with what service account
I need to check what SQL Server services are running(engine,agent,IS,AS,RS,browser and Full text) and what is the present status and what service accounts are been used by them on several servers in a single shot.
Could any one help me in finding a good script for the same.I have been looking for the same thing, the issue I am running into is finding the Actual Service Name. I know this question is old, and I personally do not understand the reply.
so Far I have the following:
DECLARE @ServiceAcount NVARCHAR(128);
SET @Service = 'No Return Value'
--MsDtsServer100 (SSIS)
EXEC master.dbo.xp_regread
'HKEY_LOCAL_MACHINE',
'SYSTEM\CurrentControlSet\services\MsDtsServer100',
'ObjectName',
@ServiceAccount OUTPUT;
SELECT @ServiceAccount;
I am still looking for the correct service naming for Analysis Services, Distributed Replaay Client, Distributed Replay Controller -
Hi
I get this warning running through powershell_ise but through sql agent it just errors out.
The code does everything it is supposed to and I tried everything to completely resolve the warning to no avail.
How do I supress it so sql agent wont error out running powershell code?
Thanks!
WARNING: Could not obtain SQL Server Service information. An attempt to connect to WMI on 'server_name' failed with the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Warning only present when it connects to remote servers, it doesn't produce it for local server. And it does get all info from the remote servers.
PaulaHi paulata,
According to your description, when you run powershell scripts about the remote machine
in SQL Server Agent job, the warning error will occur. “The common error message is Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).” This suggests that your credentials aren't sufficient for accessing the
remote system. If you have an account that has sufficient permissions for the query, there's a simple workaround for this problem in the form of PowerShell's Get-Credential command and the script's Credential parameter. I recommend you check if your account
has permission on remote machine and it can execute the powershell scripts.
In addition, if you want to run query statement on the remote machine , I recommend you create Linked Server, then do some related operations. There is a similar issue about access denied, you can review the following article.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/157f536d-6716-4547-bdb4-9e3c8451cb95/sql-agent-service-account-permissions-sql-server-2008?forum=sqlgetstarted
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Monitor SQL Server service Broker queue status
I need to monitor SQL Server service Broker queue status. If the queue is disabled, send me an email alert.
Can you let me know what's the best way to accomplish it using SCOM?1) create a queue for notification
2) create a service on notification queue
3)Create an event notification for broker queue disable. Associate this with the queue that you are monitoring.
4)Create a procedure that send you and email with this event happens
Example:
---- Notification
CREATE
QUEUENotify_queue
-- Service
CREATE
SERVICE[http://queue_Notify]
ONQUEUENotify_queue([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
--Event
CREATE
EVENTNOTIFICATION[http://queue_Notify_event]
ONQUEUETarget_queue
FORBROKER_QUEUE_DISABLED
TOSERVICE'http://queue_Notify','current
database';
GO
procedure will be something like...
WAITFOR
RECEIVETOP(1)
@RecvReqMsgName=message_type_name,
@RecvReplyMsg=message_body,
@RecvReplyDlgHandle=conversation_handle
FROMNotify_queue),TIMEOUT5000
IF(@RecvReqMsgName='http://schemas.microsoft.com/SQL/Notifications/EventNotification')
BEGIN
DECLARE@cmdNVARCHAR(MAX)
SET@cmd='dbo.sp_send_dbmail
@profile_name="Name XYZ",
@recipients="[email protected]",
@body="CAST(@RecvReplyMsg as NVARCHAR(MAX)",
@subject="Queue Disabled Detected";'
EXEC
(@cmd)
END -
SharePoint 2010 - SQL Server Service Application Server Appears on Server without SSRS Installed
I have SSRS instance installed on Server 2 in integrated mode and reports within SharePoint are working as expected. But, when you go to manage the SQL Server Service Application it throws an 503 error and I believe it is related to the fact that the
service also shows up on another Application Server, Server1, that does not have SSRS installed. The service is disabled and it shows up in the list of Services for the server but I believe SharePoint thinks its the primary service and cannot access
it. Is there any way to remove the Service from Server2? I attempted the below powershell commands to remove but it gives me an error. Any suggestions would be appreciated.
Get-SPRSServiceApplicationServers
Address
Server1
Server2
get-spserviceinstance -all |where {$_.TypeName -like "SQL Server Reporting*"}
TypeName Status Id
SQL Server Reporting Services... Disabled a5179dce-2d6c-476b-a74b-764375d70a94
SQL Server Reporting Services... Online 64a99ed8-d31c-4dd3-b9f7-b6d946e41e16
Remove-SPServiceApplication a5179dce-2d6c-476b-a74b64375d70a94 -RemoveData
Remove-SPServiceApplication : Object not found.
At line:1 char:28
+ Remove-SPServiceApplication <<<< a5179dce-2d6c-476b-a74b-764375d70a94 -Remo
eData
+ CategoryInfo : ObjectNotFound: (Microsoft.Share...viceApplicati
on:SPCmdletRemoveServiceApplication) [Remove-SPServiceApplication], Invali
dOperationException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSe
rviceApplication
Remove-SPServiceApplication : Object reference not set to an instance of an ob
ect. At line:1 char:28
+ Remove-SPServiceApplication <<<< a5179dce-2d6c-476b-a74b-764375d70a94 -Remo
eData + CategoryInfo : InvalidData: (Microsoft.Share...viceApplication:
SPCmdletRemoveServiceApplication) [Remove-SPServiceApplication], NullRefer
enceException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRemoveSe
rviceApplicationYou're getting a Service Instance object and trying to remove it with a Service Application cmdlet... This won't quite work :) Can you double check to validate that SSRS 2008 R2 or higher bits were not accidentally laid down on the problem host?
Trevor Seward, MCC
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Reviewing Windows NT Rights and Privileges Granted for SQL Server Service Accounts
Hi Folks,
I am an experienced .NET apps developer who has been tasked with writing a bunch of technical controls for all the SQL Server instances on a domain.
So for the last month I have been diving in the deep end learning Powershell, dba and infrastructure tasks. This is still a work in progress, so be kind to me.. ;o)
So the task I am stuck on is described in the section on 'Reviewing Windows NT Rights and Privileges Granted for SQL Server Service Accounts' http://technet.microsoft.com/en-us/library/ms143504(v=sql.105).aspx
I have not been able to find cmdlets that gives me this information. I have found some exes which come frustratingly close like NTRights.exe. This lets me specify a computer name which is great, but only seems to let you set or deny permissions, not just
list them!
Any help with this would be very much appreciated as I am firmly stuck. As per comments above also bear in mind that up until around 1.5 months ago I had never used powershell / knew very much at all about SQL server admin etc. Feeling much more comfortable
with them now, but much less so with Active Directory/ windows permission structures etc so please can I ask anyone kind enough to reply to try and keep the acronyms down as much as humanly possible.. ;o)
Cheers
KieronHi Kieron,
Take a look at this module, it makes permissions much easier to work with than what's currently available:
https://gallery.technet.microsoft.com/scriptcenter/PowerShellAccessControl-d3be7b83
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing) -
SQL Server Service Account - Domain Account - WMI Provider Error - 0x80092004
Hi,
if I try to use an domain account for SQL service start using SQL configuration Manager I receive the error
WMI Provider Error - 0x80092004
in Popup Window and in Eventlog 5 Error Events from Source MSSQLSERVER:
26014:
Unable to load user-specified certificate [Cert Hash(sha1) "BA78B5DBF93CCD7EFA1860C99B0D6141D480199A"]. The server will not accept a connection. You should verify that the certificate is correctly installed. See "Configuring Certificate for
Use by SSL" in Books Online.
17182:
TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property. "
17182:
TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
17826:
Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
17120:
SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
After I put the account in local administrator group the service starts up.
I want to use the lowest privileges. Do I really need the SQL server service account in local administrator group? How to fix the error?
thanksHi baschuel,
It is recommended to run SQL Server service by using the lowest possible user rights and it is supported to use a domain account instead of an account from local Administrators group to configure SQL Server service. According to your error messages, the
issue could be due to that the incorrect certificate is used, or the domain account has no access to the Crypto folder(C:\ProgramData\Microsoft\Crypto). To troubleshoot the issue, you could follow the two solutions below.
1.Import the correct certificate following the steps in the article:
http://windows.microsoft.com/en-hk/windows/import-export-certificates-private-keys#1TC=windows-7
2.Grant the domain account full access to the Crypto folder.
Regards,
Michelle Li
If you have any feedback on our support, please click
here. -
Install Fails With SQL Server Version - Status: Incorrect
Hi. I am working to install BPC 7 in a single server environment. During installation the setup diangostic detects a problem with [[Microsoft and 3rd Party Software]], below is what appears:
X - SQL Server Version
____ OK - Required: 10.0.1600.22 or higher
____ OK - Currently: Not Installed
____ X - Status: Incorrect
X - SQL Reporting Services Server Version
____ OK - Required: 10.0.1600.22 or higher
____ OK - Currently: Not Installed
____ X - Status: Incorrect
X - OLAP Server Version
____ OK - Required: 10.0.1600.22 or higher
____ OK - Currently: Not Installed
____ X - Status: Incorrect
Under [[Computer Services Status]] SQL Server is alright:
OK - MS SQL Server Service
____ OK - Required: Running
____ OK - Currently: Running
____ OK - Status: OK
OK - MS SQL Server Agent Service
____ OK - Required: Running
____ OK - Currently: Running
____ OK - Status: OK
OK - SQL Integrated Service
____ OK - Required: Running
____ OK - Currently: Running
____ OK - Status: OK
OK - SQL Report Service
____ OK - Required: Running
____ OK - Currently: Running
____ OK - Status: OK
OK - MS SQL Server OLAP Service
____ OK - Required: Running
____ OK - Currently: Running
____ OK - Status: OK
What I've Checked so far:
- Collation
- Account for installation is SQL SysAdmin and a Windows account
- Mixed mode authentication
I should mention, this is a single server install on a 64 bit version of Windows, with 64 bit version of SQL.
Any experience, ideas or suggestions are welcome.
Joe
Edited by: jwainz on Mar 29, 2010 5:55 PMI think the clearest statement about this is on page 11 of the Master Guide (SAP BPC 7.0 M Master Guide at [http://service.sap.com/instguidesEPM-BPC]).
Look at the rows for OLAP Server and Microsoft SQL Server. In each of those, you wil find this statement:
"Can be 64‒bit when separate from Application/web services"
On page 10 in the Installation Guide, for look at the rows for Application server Web Server. The prerequisites are as follow:
App Server:
Windows Server 2003 or Windows Server 2003 R2 Standard or Enterprise Edition SP2 (32-bit) configured with NTFS, set to English (United States)
Web Server:
Windows Server 2003 or Windows Server 2003 R2 Standard or Enterprise Edition SP2 (32-bit) configured with NTFS
Finally, the PAM is a bit confusing. For product SAP BPC 7.0 FOR MICROSOFT, click on the tab Operating Systems and then click on the tab BPC Server. That is the software that you install for the Application Server and the Web Server server types. The Operating System Version listed is WINDOWS SERVER 2003/IA32 32BIT -
I know this question has been asked before, but never for R2, that I can tell, and the posted fixes aren't working. I have just installed SCVMM 2008 R2 on a Windows Server 2008 R2 server, using a remote SQL 2008 SP1 database. When I attempt to connect to SCVMM, I get the following error:
"The SQL Server service account does not have permission to access Active Directory Domain Services (AD DS).
Ensure that the SQL Server service is running under a domain account or a computer account that has permission to access AD DS. For more information, see "Some applications and APIs require access to authorization information on account objects" in the Microsoft Knowledge Base at http://go.microsoft.com/fwlink/?LinkId=121054.
ID: 2607"
What I've seen online is that this is usually becuase the domain account SCVMM is running as does not have the proper permissions on the SQL database. Here's what I've confirmed:
1) My SCVMM service account is a local admin on the SCVMM server
2) My SCVMM service account is a dbowner on the SCVMM database in SQL
3) My SQL service account is a dbowner on the SCVMM database in SQL
4) My SQL service account is a domain user (even made it a domain admin, just in case, and it still "doesn't have access to AD DS," which is obviously untrue)
5) Neither service account is locked out
Has anyone run in to this? It says in Technet that remote SQL 2008 is supported, as long as the SQL management studio is installed to the SCVMM server, and I installed and patched before I began the SCVMM installation. I just don't know what else to try - I have no errors in event logs, no issues during the installation itself...
Andrew ToppThat answer was very unhelpful fr33m4n. The individual mentions that they've received the error that points to the KB article. I currently receive the same error -- there seems to be no resolution. I've run the Microsoft VBS script to add TAUG to the WAAG
as suggested by 331951, and that made absolutely no difference.
1) My SCVMM service account is a local admin on the SCVMM server
2) My SCVMM service account is a dbowner on the SCVMM database in SQL
3) My SQL service account is a dbowner on the SCVMM database in SQL
4) My SQL service account is a domain user (even made it a domain admin, just in case, and it still
"doesn't have access to AD DS," which is obviously untrue)
The user is also a member of WAAG, the machines have delegated authority to each other. Is there any other solution? -
I have created a Linked Server to Access Database of 64 MB in Size located in Remote System to SQL Server 2012.In Start for Some time it works fine and after it is giving the Error
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.".
Msg 7303, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
Previously I thought it as Permission Issue. By trying some fixes proposed in forums it not fixed. But, after restarting the SQL Server Services without changes to the linked Server it works perfectly. How could i fix it. I don't want restart the SQL Server
Service it leads to Some other process failures.
RehaanKhan. MAfter all the Errors, When I am restarting the SQL Server its working correctly.
Whats the problem it is clearing itself after restarting of SQL Server. Why ?. I can't find anything regarding this in SQL Server .
The following are the Errors i got connecting to SQl Server.
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.".
Msg 7303, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
Error-2:
Executed as user: RMS\Administrator. Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST". [SQLSTATE 42000] (Error 7303) OLE DB provider
"Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" returned message "Cannot open a database created with a previous version of your application.". [SQLSTATE 01000] (Error 7412). The step failed.
After unchecking the Allow In Process in OLEDB.ACE Provider Properties.
Msg 7399, Level 16, State 1, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST" reported an error. Access denied.
Msg 7301, Level 16, State 2, Procedure Insert_Records_Into_Actual_Calls_History, Line 29
Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "LANDLINE_TEST".
for to fix above error i have followed the instructions in the following link,
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/08/19/permissions-needed-to-set-up-linked-server-with-out-of-process-provider.aspx
This also failed to work. I Restarted SQL Server and make the Linked Server Properties Default to my Configuration and it works fine.
Can you suggest me a solution for this issue. Every time i don't want to restart SQL Server Services as it effects other jobs and Processes.
Thank you.
RehaanKhan. M -
SQL Server Service won't start on SQL Server 2008
Hi everyone,
I'm having trouble starting SQL Server service after stopping and starting the service. Before this happened, I created a Stored Procedure for marking all tables at once along with a maintenance plan for differential backup on all my databases based on the
recommendation from this link, http://msdn.microsoft.com/en-us/library/ms253070.aspx.
When I realized that the differential backup failed with some databases displaying (Restoring...) post-fix to the database name, I decided to stop SQL Server service and start it up. That is when I won't be able to start the service again.
Is there a fix for starting the SQL Server service? Any help is very much appreciated.
Additional information:
- With administrator permission granted.
- Service Pack 1 for SQL Server 2008 installed.
- Using default database instance.
- Tried C:\Program Files\Microsoft SQL Server\MSSQL.....\Binn>net start MSSQLSERVER /T3608 ( return msg: System error 5 has occurred. Access is denied.
- When I start SQL Server service, I keep getting this dialog msg:
"Windowns could not start the SQL Server (MSSQLSERVER) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1814."
The event log does not explain or provide any hint on how to fix the problem.
- Log msg:
2010-07-22 10:30:25.09 Server (c) 2005 Microsoft Corporation.
2010-07-22 10:30:25.09 Server All rights reserved.
2010-07-22 10:30:25.09 Server Server process ID is 6076.
2010-07-22 10:30:25.10 Server Authentication mode is MIXED.
2010-07-22 10:30:25.10 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2010-07-22 10:30:25.11 Server This instance of SQL Server last reported using a process ID of 5708 at 7/21/2010 3:27:01 PM (local) 7/21/2010 10:27:01 PM (UTC). This is an informational message only; no user action is required.
2010-07-22 10:30:25.11 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2010-07-22 10:30:25.14 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2010-07-22 10:30:25.14 Server Detected 4 CPUs. This is an informational message; no user action is required.
2010-07-22 10:30:25.23 Server Using locked pages for buffer pool.
2010-07-22 10:30:25.43 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2010-07-22 10:30:25.73 Server Node configuration: node 0: CPU mask: 0x000000000000000f Active CPU mask: 0x000000000000000f. This message provides a description of the NUMA configuration for this computer. This is an informational
message only. No user action is required.
2010-07-22 10:30:25.81 spid7s Starting up database 'master'.
2010-07-22 10:30:26.14 spid7s CHECKDB for database 'master' finished without errors on 2010-07-19 21:15:02.823 (local time). This is an informational message only; no user action is required.
2010-07-22 10:30:26.18 spid7s Resource governor reconfiguration succeeded.
2010-07-22 10:30:26.18 spid7s SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2010-07-22 10:30:26.18 spid7s SQL Server Audit has started the audits. This is an informational message. No user action is required.
2010-07-22 10:30:26.19 spid7s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.
2010-07-22 10:30:26.28 spid7s SQL Trace ID 1 was started by login "sa".
2010-07-22 10:30:26.29 spid7s Starting up database 'mssqlsystemresource'.
2010-07-22 10:30:26.31 spid7s The resource database build version is 10.00.2531. This is an informational message only. No user action is required.
2010-07-22 10:30:26.43 spid10s Starting up database 'model'.
2010-07-22 10:30:26.43 spid7s Server name is 'XXXXXXXXXXXXXX'. This is an informational message only. No user action is required.
2010-07-22 10:30:26.47 spid10s The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run.
2010-07-22 10:30:26.47 spid10s Error: 927, Severity: 14, State: 2.
2010-07-22 10:30:26.47 spid10s Database 'model' cannot be opened. It is in the middle of a restore.
2010-07-22 10:30:26.59 spid10s Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in
the event log that may indicate why the tempdb files could not be initialized.
2010-07-22 10:30:26.59 spid10s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.Hello,
Could you please copy the model.mdf and modellog.ldf from
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn\Templates
To
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA
Rebuilding the system databases you will lose lose logins, jobs, SSIS packages. You may have to restore or attach user databases.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Hi
i have a sharepoint deployment with one SQL Server (running on VM) hosting the config DB and another SQL Server (Physical Host because VM was running out of space) to host the huge Content DBs. I need to schedule automatic backups of the Content DBs to a
network share. For that i need to run the SQL Server Service with an account having permissions to the share as suggested in https://support.microsoft.com/kb/207187?wa=wsignin1.0
I tried changing the logon as a service account to a domain
account which has permissions to the Network Share and is also in local Administrators group of SQL Server and has "public and sysadmin" roles in SQL Server but that caused an issue. the SharePoint Web Application started showing a White Screen so
I had to revert back to the default accounts i.e. NT Service\SQLSERVERAGENT and NT Service\MSSQLSERVER. I viewed the event logs . These are the types of error i got after changing the logon as a service account to a domain account
1) Information Rights Management (IRM): Retried too many times to initialize IRM client. Cannot retry more. Retried times is:0x5.
System
Provider
[ Name]
Microsoft-SharePoint Products-SharePoint Foundation
[ Guid]
{6FB7E0CD-52E7-47DD-997A-241563931FC2}
EventID
5148
Version
15
Level
2
Task
9
Opcode
0
Keywords
0x4000000000000000
TimeCreated
[ SystemTime]
2015-02-02T04:46:04.750899500Z
EventRecordID
176477
Correlation
[ ActivityID]
{8FACE59C-1E17-50D0-7135-25FDB824CDBE}
Execution
[ ProcessID]
6912
[ ThreadID]
8872
Channel
Application
Computer
Security
[ UserID]
S-1-5-21-876248814-3204482948-604612597-111753
EventData
hex0
0x5
2)
Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below.
The target principal name is incorrect. Cannot generate SSPI context.
System
Provider
[ Name]
Microsoft-SharePoint Products-SharePoint Foundation
[ Guid]
{6FB7E0CD-52E7-47DD-997A-241563931FC2}
EventID
5586
Version
15
Level
2
Task
3
Opcode
0
Keywords
0x4000000000000000
TimeCreated
[ SystemTime]
2015-02-02T07:01:35.843757700Z
EventRecordID
176490
Correlation
[ ActivityID]
{50B4E59C-5E3A-50D0-7135-22AD91909F02}
Execution
[ ProcessID]
6912
[ ThreadID]
5452
Channel
Application
Computer
Security
[ UserID]
S-1-5-17
EventData
int0
0
string1
The target principal name is incorrect. Cannot generate SSPI context.Hi Aparna,
According to your description, you get the above two errors when scheduling backups of Content DB. Right?
Based on those two error messages, they are related to the service principal name(SPN) for SQL Server service. Please verify the if the SPN is registered successfully. You can view it in ADSI Edit or use command line. Please see:
http://blogs.msdn.com/b/psssql/archive/2010/03/09/what-spn-do-i-use-and-how-does-it-get-there.aspx
When installing SQL Server, those two services below should be registered:
MSSQLSvc/servername:1433
MSSQLSvc/servername
Please check if those SPNs or duplicated SPNs exist. You can use command to reset SPN or remove duplicated SPN and add new one. See:
Setspn.
We have also met this issue when this SPN is registered under Administrator. Please try to register it under Computer. You can add it in ADSI Edit.
If you have any question, please feel free to ask.
Simon Hou
TechNet Community Support -
After changing 'MS SQL server' service's user name SDAC doesn't work properly
I've changed 'MS SQL Server' service user name
from .\admin (have had such already) to network_services
and now my oracle linked servers to Oracle instance stopped to work.
Namely, 'Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server Ora_RO'.
In event log i see next:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{2206CDB0-19C1-11D1-89E0-00C04FD7A829}
and APPID
{2206CDB0-19C1-11D1-89E0-00C04FD7A829}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.
So, MSDAINITIALIZE Class fails to start. I cannot locate this service under dcomcnfg. Could you help me?The error seems to be clear what is causing the issue, check this link to fix this issue
Here the scenario is with SharePoint instead oracle so you can make out:-
http://www.wictorwilen.se/Post/Fix-the-SharePoint-DCOM-10016-error-on-Windows-Server-2008-R2.aspx
http://social.technet.microsoft.com/Forums/en-US/696204d5-b07e-46db-a785-737ea57b8da2/distributed-com-error-message
Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
INSQLSERVER.COM
Mohammad Nizamuddin
Maybe you are looking for
-
Can I move music from my ipod to my itunes?
My old computer crashed and all I have left from the music on that computer is what is on my ipod. Is it possible to transfer music from my ipod onto my new computer? If so, please let me know how in the easiest way you can. I'm extremely computer il
-
How can I read published data from a datasocket server running in a different network?
Hi all, I have been trying to solve this problem but without any success. I want to develop data acquisition Vi to run on a computer on a remote location. I want to use the datasocket technology to acquire and publish this data so that in my office (
-
Slow Performance Forms 10g !!!!
Hi, I have migrated several forms from 6i to 10g and i use a 11g Database. Most of the users accessing from different countries complain of slow performance but the basic idea of migration is to get a better performance. My users mostly work on lapto
-
I am trying to change the size of an image using setPreferredSize(int width, int height) The API says that if the size specified is less than the minimum width and height, the minimum width and height is used. But they have told that if the width and
-
when i leave the computer on and come back to it lets say in an hour it seems dead. is this normal because i cant get it to start up again unless i shut it down with the turn on button.