I am trying to create an alert on my new SQL 2005 box to email alert/notify when/if the service ever stops, etc. Is there an existing alert I can use or do I have to script one, and if I do - how would I do it?
I am trying to create an alert on my new SQL 2005 box to email alert/notify when/if the service ever stops, etc. Is there an existing alert I can use or do I have to script one, and if I do - how would I do it?
I've noticed that the 14150 event is no longer showing up in the Application Log. The 14151 event does. We tried modifying the alert: sp_altermessage 14150, 'WITH_LOG', 'true';
But this of course doesn't work on messages under 50000. We utilized this alert in SQL 2000 to send emails upon the success of a merge replication. Any idea how to get this to work? Is there a workaround or did MS drop the ball on this event? If they dropped it - sure wish they would let us know and also remove the ability to setup the alert for it...
In SQL Server 2000 you could run the piece of code below, to enable the logging of a deadlock in the SQL Server error log. Which could then be used to fire an alert, and then kick of an Agent job to send an SMTP email alert.
Exec sp_altermessage 1205, 'WITH_LOG', 'true'
The error message logged was a nice simple one liner, like this:
Transaction (Process ID 57) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Now I work for a managed SQL Server company, and a large number of our clients used our alerting for deadlocking to tune their applications, or at a minimum to show them when something was wrong with the database due to sudden rise in the number of deadlocks.
However, in SQL Server 2005, the functionality for the sp_alertmessage procedure has been changed so that you can't update any message id less than 50,000. Which comes inline with the secure engine that Microsoft have designed.
But this now means you can no longer enable the logging for deadlock message ID 1205. Which in turn means no alerting can be enabled.
You can still log information by enabling the necessary trace flags, however that logs very verbose information about the deadlocking chain, which in turn can quickly blow the size of the error logs out.
What I would love to see is this functionality returned in SQL Server 2008, or at least an alternative so that only minimum information is logged initially for a deadlock, and alerting can be setup.
Also, for those of you who have read through the 2005 BOL, about deadlocking, although it states the following in the section on deadlocking: "...The 1205 deadlock victim error records information about the threads and resources involved in a deadlock in the error log.€?
This isn't the case, unless you enable some trace flags, which as mentioned will give you a whole lot of information, which although is valuable, isn't ideal if you're wanting day to day deadlock tracking.
Does anyone have any thoughts on this? Have you struck this as well? Do you think this should be something that shouldn't have been removed from 2000?
My SQL Server 2005 Database was down last night.From logs I can find out below details only.
Code Block Date 11/30/2007 1:01:34 AM Log SQL Server (Archive #1 - 11/30/2007 1:01:00 AM) Source spid4s Message SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required.
Now I want to find out root cause for this.Who has stopped this service.And If services was stopped automatically then which program/service is resposible?
So Please suggest me how to do root cause analysis for this downtime.
Hello,I'm upgrading from SQL 7 to SQL 2000 on another box. To minimize thedowntime I would like to1) backup my sql 7 database,2) copy it to the new box with SQL 2000 already installed,3) restore the database on the SQL 2000 box,4) Shutdown my sql 7 database,5) Copy the transaction logs to the SQL 2000 database,6) Restore the transaction logs to the SQl 2000 database,7) Bring up SQL 2000.My only concern with this is restoring the transaction logs that werecreated on SQL 7 to SQL 2000. Do you know if I can do this?Do you see any (other) problem(s) with my plan.Thanks, Scott
Can you use the below query to get CPU high utilisation alert purposes for both named and default instance? or, do I need to make any changes here (@wmi_namespace=N'.ROOTCIMV2' ) ?
USE [msdb] GO EXEC msdb.dbo.sp_add_alert @name=N'CPU_WM_Utilization_Check', @message_id=0, @severity=0,
I'm preparing a checklist for myself before getting ready to migrate from 2005 to 2012. Our largest database is a nice one at over 250GB. I'm thinking my best bet to minimize any downtime would be to Restore the DB (NORECOVERY) on the new server and keep rolling it forward with the transactional logs. Eventually I'll need to bring the old DB offline and do one last backup and apply that one to the new server but that should be a small time frame given the whole process could take several hours.
There is a great book on database refactoring that contains a comprehensive set or recipies on how to revise databases that are supposed to be always online and may have various clients that can't be upgraded at the same time. I guess this is a typical case with large databases and I would be surpised if Amazon stops their servers just to move a column from one table to another. The book describes necessary steps for such changes. Basically it's all about creating intermediate database schemas that would be used during transition period.
For example, if we need to move a column from one table to another:
Version 1. Table A columns: Name, Price Table B columns: Quantity, Date
Let's say we move Price to table B:
Version 2. Table A columns: Name Table B columns: Quantity, Date, Price
The book suggests an intermediate version:
Version 1_2. Table A columns: Name, Price Table B columns: Quantity, Date, Price Additional trigger that will synchronize "Price" columns between A and B.
Version 1_2 can be used by both clients written for version 1 and 2. Software developers don't need to rush their upgrades, transition can last months and include several changes.
This technique requires accuracy in version control management, but looks very good to implement non-interruptible database schema upgrade. I wonder if this is the only option available for data schema upgrade with no downtime. I can't think about anything else - it this how large data warehouses updata their databases?
1. I am looking data base solution for highly critical application. what type of HA/DR solution will suite for this.(always on, transactional , log shipping or mirroring). make sure all secondary nodes should be identical to production .
2. for any need to upgrade /patching /maintenance work, Â production should not be able to down. No downtime 100%.
I have a process that restores a production DB, overwriting the existing copy each night. I'd like to keep the solution "up" for as long as possible. And this'll be more important if I want to update it in the day (where there are more queries) too. The nature of queries thrown at the system is that there are about 20 per hour, it's underpinning a reporting system, it's not an OLTP system.
It seems to me I could restore the fresh DB copy into a holding DB, then rename it to the production DB name at the end of the process. The rename process should be pretty much instant.
But I need to think about detecting and waiting for queries to complete on the prod DB, before removing/demoting it (actually, I though to rename it, then reusing it as the next copy to update).
I need a query to find out the server uptime and downtime of the server from MOM database, i don't know in which tables MOM actually stores this infomation.
I need this very urgently.
Thanks in advance
You can use this code to find out the information stored in the MOM tables:- ############################################################################ create PROC [dbo].[SearchMyTables]
I'm trying to run a query to check the downtime in production lines, but if a line has assigned more than one cause for the downtime it repeat the info for each cause.
This is the code.
SELECT D.Line AS Line, D.ProductionLine AS ProductionLine, D.Shift AS Shift, D.DownTime, CONVERT(VARCHAR(10), D.DatePacked,101) AS DatePacked, AssignedDowntime, (D.DownTime - AssignedDowntime) AS NOASSIGNED, R.Enviromental,R.Equipment, R.IT_Systems, R.Material_External,R.Quality,R.Material_Internal, R.Method,R.PreProduction,R.People FROM ( SELECT Line, Shift, DatePacked, SUM(Cast(Downtime AS INT)) AS AssignedDowntime,
[Code] ....
I'm expecting that if is more than one "Down Reason "it will include in the same line. At this moment if i have more than one reason it create a line for each one for example:
If i have a total Downtime of 50 minutes and they are assigned 10 for itequipment, 30 by testequipment and 10 assigned to quality issues i will have and output like this:
I have a table (named table1) with 20million rows. It takes around 11 minutes to apply the primary key to this table. There are some tables with over 100 million rows so based on the previous time if my calculations are correct it will take close to an hour apply this primary key for tables with around 100 million rows.
My current solution is to create another table (named table2) with no indexs or primary keys. Pump over only like 5 days worth of data, then apply the primary key. Then have a script that will eventually populate table2 with the rest of the data gradually. When I say gradually I mean like insert like every 100k per hour or something. Keep in mind this table2 is heavily updated with new records.
Two servers are configured with Windows 2008 / SQL server 2012 utililizing Always-On for HA. We need to upgrade both servers to Windows 2012 / SQL Server 2014 with minimum downtime(Time for Always-On failover). The upgrade to SQL 2014 is straight forward with for minimum downtime.The Windows upgrade(2008 -> 2012) is the problem. From what I have observed and read in blogs.The Windows node to be upgraded must be removed from the Windows cluster before the node can be upgraded to Win 2012.A Win 2008 and Win 2012 node can not reside in the same cluster. If this is true then the only option I can think of is to dump the DB on WIN 2008 server and restore on Win 2012. This is an outage(time it takes to dump and restore).Is there any other method to upgrade these two nodes utilizing Always-On of some other method without downtime?
Hi, I understand from previous threads that installing SQL Server 2005 Service Pack 2 on the desktop client can speed up the response rate of the Visual Studio 2005 Business Intelligence Tools.
However after logging on as an administrator and installing Service Pack 2, Service Pack 2 returned no errors. However after launching Visual Studio and clicking on the about dialog box the version reported was still €śRTM.050727-4200€? where I was expecting to see €śSP.050727-7600€?.
I understood that I applied the same service pack to my copy of SQL Server on my laptop and the upgrade worked successfully.
********************************************************************************** Processes Locking Files Process Name Feature Type User Name PID
********************************************************************************** Product Installation Status Product : Express Database Services (SQLEXPRESS) Product Version (Previous): 1399 Product Version (Final) : Status : Failure Log File : D:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9Express_Hotfix_KB921896_SQLEXPR.EXE SQL Express Features : SQL_Data_Files,SQL_Engine,SQL_Replication,SQL_SharedTools Error Number : 1332 Error Description : *** Shared String ID 1332 Not Found *** ----------------------------------------------------------------------------------
********************************************************************************** Summary One or more products failed to install, see above for details Exit Code Returned: 1332
Hi, for some reason, when I've installed visual studio 2005, I didn't install also SQL server. Than I've updated VS with Service Pack 1 (thank god, I was trying unsucesfully for about 2 weeks :/ ).
Than I want to install MSSQL 2005 and an error came up:
Message displayed to user SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme. SQL Server Setup has detected that the following required component is not installed: Microsoft Windows Installer 3.1. To proceed, download and install the Windows Installer 3.1 Redistributable from http://go.microsoft.com/fwlink/?LinkId=50380 , and then run SQL Server Setup again.
1. The http link leads to main page of MS Download Centre. 2. I have Installer 3.1. (version of file c:windowssystem32msiexec.exe said so) 3. I really do not have any beta version of any mentioned SW. I never had.
So I think the issue could be, that installer is checking for not updated version of Visual Studio. (I was searching through net/msdn and seems no one had this problem (maybe wrong keywords, though) ).
I'm running setup.exe from CD1.
Uninstalling of VS Service Pack 1 is not an option. I really don't want to spent another week by installing it. Please tell that there is some another way :) . Thanks a lot.
Microsoft SQL Server 2005 Setup beginning at Wed Mar 14 18:23:08 2007 Process ID : 2336 Y:setup.exe Version: 2005.90.1399.0 Running: LoadResourcesAction at: 2007/2/14 18:23:8 Complete: LoadResourcesAction at: 2007/2/14 18:23:8, returned true Running: ParseBootstrapOptionsAction at: 2007/2/14 18:23:8 Loaded DLL:Y:xmlrw.dll Version:2.0.3604.0 Complete: ParseBootstrapOptionsAction at: 2007/2/14 18:23:8, returned true Running: ValidateWinNTAction at: 2007/2/14 18:23:8 Complete: ValidateWinNTAction at: 2007/2/14 18:23:8, returned true Running: ValidateMinOSAction at: 2007/2/14 18:23:8 Complete: ValidateMinOSAction at: 2007/2/14 18:23:8, returned true Running: PerformSCCAction at: 2007/2/14 18:23:8 Complete: PerformSCCAction at: 2007/2/14 18:23:8, returned true Running: ActivateLoggingAction at: 2007/2/14 18:23:8 Complete: ActivateLoggingAction at: 2007/2/14 18:23:8, returned true Delay load of action "DetectPatchedBootstrapAction" returned nothing. No action will occur as a result. Action "LaunchPatchedBootstrapAction" will be skipped due to the following restrictions: Condition "EventCondition: __STP_LaunchPatchedBootstrap__2336" returned false. Running: PerformSCCAction2 at: 2007/2/14 18:23:8 Error: Action "PerformSCCAction2" threw an exception during execution. Return Code: 87 Message displayed to user SQL Server 2005 Setup has detected incompatible components from beta versions of Visual Studio, .NET Framework, or SQL Server 2005. Use Add or Remove Programs to remove these components, and then run SQL Server 2005 Setup again. For detailed instructions on uninstalling SQL Server 2005, see the SQL Server 2005 Readme. SQL Server Setup has detected that the following required component is not installed: Microsoft Windows Installer 3.1. To proceed, download and install the Windows Installer 3.1 Redistributable from http://go.microsoft.com/fwlink/?LinkId=50380 , and then run SQL Server Setup again.
Class not registered. Running: UploadDrWatsonLogAction at: 2007/2/14 18:23:9 Message pump returning: 87
How can deploy Reporting Service 2005 runtime with VisualStudio 2005? The reason here goes...
I have completed my project in VS2005. Now I am trying to make package. But here, i do not know how to deploy Reporting Service (My Report files) to Customer's Server with Setup or any other runtime solution. thanks
We would like to install Sql 2005 Enterprise Edition (including database engine, reporting service, integration service and analysis service) as a sepearte instance on a server which already has Sql 2000 with reporting services and analysis services. We do not want to disturb the existing sql 2000 setup.
If we do that then what will happen to my earlier sql 2000 reporting service? Will it be upgraded to sql 2005 reporting service? I heard that reporting services are instance unaware application. Where will be the default reporting service database available?
I have a strange problem. I'm trying to start the sql server service and the server agent under a domain account but the services are not starting. If i use the same domain account for the browser service it will start just fine. This account is part the the local admin group. I'm not sure why this wouldnt start if the browser service is starting?
I downloaded the sp2a from MS website. However after running the SP it shows version 9.00.3042.00 When I applied the KB933508 it brings up the version as 9.00.3050.00
Is there a problem. Per this site, some time ago, the version we need to be on ideally, is 9.00.3042.01
In which case which patch do I need to download and apply?
In my report, I get a '0' as my Age @ TOS. What I would like to have is 7 months vs the '0' it is reporting. I would like to try accomplishing this without doing a function if possible. I know I used YY in my DATEDIFF. I only noticed this today because of a few patients in my DB were under 1 yr at the TOS.
Hi there, I,m want to developing Web Service, but can not management database into Service.As anonumous access user, permission, and do not understood Buitinadministrator and ComputerNameadministrator. Because I'm beginer .net .
My Project using C# in VS.NET 2005. .Net FX 2.0 and SQL Server 2005. Who get other idea can introduction to mind. Such as Component it easy in developing.
I need to access a billing webservice from SQL. I createde a new c# class project and made a web refrence to the web service "ProdBilling".
Here is the code of my assembly
using System.Data; using Microsoft.SqlServer.Server; using System.Data.SqlTypes; namespace PaymentProc { public class PaymentProc { [Microsoft.SqlServer.Server.SqlProcedure] public static void ChargeCard(int account, int amount) { string Response; ProdBilling.Service serv = new ProdBilling.Service(); Response = serv.ChargeCard(account, amount); SqlContext.Pipe.Send(Response); } } }
and added the assembly CREATE ASSEMBLY PaymentProc from 'D:ProdCodePaymentProc.dll' WITH PERMISSION_SET = UNSAFE
I cannot figure out how to refrence the chargecard method
I have tried
CREATE PROCEDURE PaymentProc @Account int, @Amount int AS EXTERNAL NAME PaymentProc.[PaymentProc.PaymentProc].ChargeCard
It seems wsdl.exe put all this serialization code
namespace PaymentProc { using System.Diagnostics; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Xml.Serialization;
/// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="ServiceSoap", Namespace="http://ProdWeb1/PaymentProc")] public partial class PaymentProc : System.Web.Services.Protocols.SoapHttpClientProtocol {
Hi, im new to asp but have experiance with php/mysql.
Im bulding an application which connets to my Web Service.
Does anyone know of any great tutorial explaining fully how to connect a Web Service to a microsoft 2005 sql server?
I wish my Web Service to send string and arrayLists, not dataSets(or whatever) as i wish to manipulate this data before it is displayed. Thanks for your time.
I have installed MS 2005 report service. I checked the IIS configuration and the default web server started and checked Report Services Configuration Manager and report server status is running. However when I go to http://servername/reportserver , it said Services Unavailabe ? Can anyone please tell me what else I am missing? Many thanks.