Friday, March 30, 2012
Help in creating xsd file
I have following XML and i do want to create xsd file to BulkLoad data
into SQL SERVER table, so pls help me how can i create xsd file out of
following XML file...
<PTLV_PROJ>
<PROJECT>
<PID>10649280</PID>
<PDESC>FS2 - TAX MEETINGS GENERAL</PDESC>
<ACTIVITIES>
<ACT>
<AID>0000</AID>
<ADESC>General</ADESC>
</ACT>
<ACT>
<AID>10000</AID>
<ADESC>General test</ADESC>
</ACT>
</ACTIVITIES>
</PROJECT>
<PROJECT>
<PID>10649489</PID>
<PDESC>AREA KNOWLEDGE NETWORK</PDESC>
<ACTIVITIES>
<ACT>
<AID>20000</AID>
<ADESC>General</ADESC>
</ACT>
<ACT>
<AID>3001</AID>
<ADESC>AWS CHAMPION</ADESC>
</ACT>
</ACTIVITIES>
</PROJECT>
</PTLV_PROJ>Hi
You post may be better answered in microsoft.public.sqlserver.xml
Check out the following on how to use updategrams
http://msdn.microsoft.com/library/d...
egram_375f.asp
http://msdn.microsoft.com/library/d...asp?frame=true
http://msdn.microsoft.com/library/d...ations_0gqb.asp
John
"mvp" wrote:
> Hello everybody,
> I have following XML and i do want to create xsd file to BulkLoad data
> into SQL SERVER table, so pls help me how can i create xsd file out of
> following XML file...
>
> <PTLV_PROJ>
> <PROJECT>
> <PID>10649280</PID>
> <PDESC>FS2 - TAX MEETINGS GENERAL</PDESC>
> <ACTIVITIES>
> <ACT>
> <AID>0000</AID>
> <ADESC>General</ADESC>
> </ACT>
> <ACT>
> <AID>10000</AID>
> <ADESC>General test</ADESC>
> </ACT>
> </ACTIVITIES>
> </PROJECT>
> <PROJECT>
> <PID>10649489</PID>
> <PDESC>AREA KNOWLEDGE NETWORK</PDESC>
> <ACTIVITIES>
> <ACT>
> <AID>20000</AID>
> <ADESC>General</ADESC>
> </ACT>
> <ACT>
> <AID>3001</AID>
> <ADESC>AWS CHAMPION</ADESC>
> </ACT>
> </ACTIVITIES>
> </PROJECT>
> </PTLV_PROJ>
help how to create a row progressive..
select.
Example..
Select * from employers
Name Surname Position Age Hire Date Progressive
Mario Rossi Consultant 25 26/07/2003 1 (this
field doeas not exists in table)
fredrick Bauman Secretary 30 15/06/1999 2
Liana Orfei Director 45 15/01/1970 3
...................................... .....................
...........n
Thanks to every bodyHere's an example from the Pubs database:
SELECT
(SELECT COUNT(*)
FROM Authors
WHERE au_id <= A.au_id)
,*
FROM Authors AS A
--
David Portas
SQL Server MVP
--|||If you can afford to use an intermediate temp table:
select IDENTITY(int,1,1) as ProgressiveNumber into #Employers
select * from #Employers
MSSQL requires a table (even a temp table) on which to hang the identity
state info.
" Pecos Bill" <pecos.bill@.yahoo.it> wrote in message
news:6KlCc.15581$c_1.447390@.twister1.libero.it...
> Hi to everybody, I'd like to know how to extract a progressive number in a
> select.
> Example..
> Select * from employers
> Name Surname Position Age Hire Date Progressive
> Mario Rossi Consultant 25 26/07/2003 1 (this
> field doeas not exists in table)
> fredrick Bauman Secretary 30 15/06/1999 2
> Liana Orfei Director 45 15/01/1970 3|||> SELECT
> (SELECT COUNT(*)
> FROM Authors
> WHERE au_id <= A.au_id)
> ,*
> FROM Authors AS A
thanks...I'll try soon.|||"Mischa Sandberg" <mischa_sandberg@.telus.net> ha scritto nel messaggio
news:72pCc.6022$E84.827@.edtnps89...
> If you can afford to use an intermediate temp table:
> select IDENTITY(int,1,1) as ProgressiveNumber into #Employers
> select * from #Employers
> MSSQL requires a table (even a temp table) on which to hang the identity
> state info.
thanks...I'll try soon.
alessandro|||>> I'd like to know how to extract a progressive number in a select.
<<
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files; there is no sequential access
or ordering in an RDBMS, so "first", "next" and "last" are totally
meaningless. In SQL and tiered architectures, things that deal with a
PHYSICAL ordering are done in the front end, never in the database.
Monday, March 26, 2012
Help Fixing Script.
Hello everybody... I have a SQL 2000 Script that is not working on SQL 2005.. Or 2000 for that matter.. I wanted to know if somebody can help me fix this script.
/****** Object: Database NetManage_SQL ******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'NetManage_SQL')
DROP DATABASE [NetManage_SQL]
GO
CREATE DATABASE [NetManage_SQL] ON (NAME = N'NetManage_SQL_Data', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\NetManage_SQL_Data.MDF' , SIZE = 10, FILEGROWTH = 10%) LOG ON (NAME = N'NetManage_SQL_Log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\NetManage_SQL_Log.LDF' , SIZE = 10, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
GO
exec sp_dboption N'NetManage_SQL', N'autoclose', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'bulkcopy', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'trunc. log', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'torn page detection', N'true'
GO
exec sp_dboption N'NetManage_SQL', N'read only', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'dbo use', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'single', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'autoshrink', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'ANSI null default', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'recursive triggers', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'ANSI nulls', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'concat null yields null', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'cursor close on commit', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'default to local cursor', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'quoted identifier', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'ANSI warnings', N'false'
GO
exec sp_dboption N'NetManage_SQL', N'auto create statistics', N'true'
GO
exec sp_dboption N'NetManage_SQL', N'auto update statistics', N'true'
GO
if( ( (@.@.microsoftversion / power(2, 24) = 8) and (@.@.microsoftversion & 0xffff >= 724) ) or ( (@.@.microsoftversion / power(2, 24) = 7) and (@.@.microsoftversion & 0xffff >= 1082) ) )
exec sp_dboption N'NetManage_SQL', N'db chaining', N'false'
GO
use NetManage_SQL
GO
exec sp_addlogin 'NetManageAdmin', 'DigitalNetrixdbadmin', 'NetManage_SQL', 'us_english'
GO
/****** Object: Table [dbo].[Device_SwitchPorts] ******/
CREATE TABLE [dbo].[Device_SwitchPorts] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Device_IPAddress_ID] [int] Default 0 ,
[SwitchPortDevice_Type_ID] [int] Default 0 ,
[SwitchPortSlotNumber] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SwitchPortNumber] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SwitchPortDeviceID] [int] Default 0 ,
[SwitchPortDeviceName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Device_Type] ******/
CREATE TABLE [dbo].[Device_Type] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Device_Type_ID] [int] Default 0 ,
[Device_Type] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[IPAddress] ******/
CREATE TABLE [dbo].[IPAddress] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Subnet_ID] [int] Default 0 ,
[IPAddress] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[IPDecimal] [float] Default 0 ,
[IPAddress_TypeID] [int] Default 0 ,
[Device_Type_ID] [int] Default 0 ,
[IPAddress_Host_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[IPAddressLocation] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[IPComments] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[IPAddress_Subnet] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Subnet_Type] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LastUpdate] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[IPAddress_Mask] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[IPAddress_Type] ******/
CREATE TABLE [dbo].[IPAddress_Type] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[IPAddress_Type_ID] [int] Default 0 ,
[Can_Edit] [int] NULL ,
[IPAddress_Type] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[User_Activity] ******/
CREATE TABLE [dbo].[User_Activity] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[UserName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Login_Date_Time] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[User_IP] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Users] ******/
CREATE TABLE [dbo].[Users] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Username] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Tree_Label] [nvarchar] (50) Default Contact_Name ,
[DisplayStyle] [int] Default 0 ,
[Password] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Full_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[EmailAddress] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CanDelete] [int] Default 1 ,
[Node_Access] [ntext] Default 0 ,
[Priv] [int] Default 3
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[settings] ******/
CREATE TABLE [dbo].[settings] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Company] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LicenseKey] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[comments] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[subnet] ******/
CREATE TABLE [dbo].[subnet] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[Subnet_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Subnet_Mask] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Parent_Subnet] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Subnet_Type] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Subnet_Comment] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Company_Division] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Node_Location] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Contact_Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Contact_Phone] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[VLAN_Info] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Created_By] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Description] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
Insert into [settings](Company, LicenseKey, comments) values('DEMO COMPANY','|95|49|47|26|253|195|170|232|71|19|151|77|188|231|23|64|87|62|215|53|169|186|27|65|218|111|185|218|238|127|2|115|187|245','Product License Key')
Insert into [subnet](Subnet_Name, Subnet_Mask, Parent_Subnet) values('Network Enterprise','000000000000','0')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(0,'Not Assigned')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(1,'PC')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(2,'Printer')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(3,'Router')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(4,'Switch')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(5,'Hub')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(6,'Web Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(7,'FTP Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(8,'Mail Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(9,'DNS Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(10,'DHCP Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(11,'Other')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(12,'Virtual Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(13,'Other Server')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(14,'VoIP Phone')
Insert into [Device_Type](Device_Type_ID, Device_Type) values(15,'SQL Server')
Insert into [IPAddress_Type](IPAddress_Type_ID, Can_Edit, IPAddress_Type) values(0,0, 'Not Assigned')
Insert into [IPAddress_Type](IPAddress_Type_ID, Can_Edit, IPAddress_Type) values(1,0, 'Static')
Insert into [IPAddress_Type](IPAddress_Type_ID, Can_Edit, IPAddress_Type) values(2,0, 'DHCP')
Insert into [IPAddress_Type](IPAddress_Type_ID, Can_Edit, IPAddress_Type) values(3,0, 'Reserved')
Insert into [Users](UserName, DisplayStyle, [Password],Full_Name, EmailAddress, CanDelete, Priv) values('Administrator',0,'admin','Administrator', 'admin@.company.com',0,1)
I keep getting error:
Msg 128, Level 15, State 1, Line 6
The name "Contact_Name" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
Any help pleae..
Thanks..
This line in the Create statement for dbo.Users is your problem: [Tree_Label] [nvarchar] (50) Default Contact_Name ,
If it is your attention to have the default value be the text string Contact_Name, then the string must be enclosed in single quotes. Like so:
[Tree_Label] [nvarchar] (50) Default ('Contact_Name') ,
If you want it to default to a value in another column, then you need to use a trigger, not a default.
|||Robert,
Thanks for the quick reply.. Just because I am new to this sql scripting thing.. how do I use a trigger and not default?
Thanks..
|||You would probably have to do something like this:
CREATE TRIGGER TRG_SOmeTrigger ON SomeTable
FOR INSERT
AS
UPDATE SomeTable
SET SomeColumnInsteadOfDefault = AnotherValueorColumn
FROM SomeTable T
INNER JOIN INSERTED I
ON T.YOuPrimaryKeyhere = I.YourPrimaryKeyHere
WHERE SomeColumnInsteadOfDefault IS NULL
Although this is not the same logic as the Default value this could be an example for a trigger.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
Monday, March 19, 2012
HELP accessing SSAS cube from distance
I recommend using Terminal Server. It is a part of Windows 2003 server and I think that up to two users are allowed to connect through the Windows XP remote PC. With more users you will have to pay a license. But check the license requirements.
Regards
Thomas Ivarsson
|||well i want to give the possibility for more than 5 personns to access the cube. can i do that by installing sslserver express edition?do i have to install managment studio to all posts? thank u for your answer|||Install Management Studio on the remote server and run Terminal Server from your own workstation. With this setup you will only need a remote desktop connection on your workstation. Windows XP have this as default.
I am talking about Terminal Server licenses. I think you have to pay for more than two simultaneous users.
Regards
Thomas Ivarsson
HELP accessing SSAS cube from distance
I recommend using Terminal Server. It is a part of Windows 2003 server and I think that up to two users are allowed to connect through the Windows XP remote PC. With more users you will have to pay a license. But check the license requirements.
Regards
Thomas Ivarsson
|||well i want to give the possibility for more than 5 personns to access the cube. can i do that by installing sslserver express edition?do i have to install managment studio to all posts? thank u for your answer|||Install Management Studio on the remote server and run Terminal Server from your own workstation. With this setup you will only need a remote desktop connection on your workstation. Windows XP have this as default.
I am talking about Terminal Server licenses. I think you have to pay for more than two simultaneous users.
Regards
Thomas Ivarsson
Help about running SQL CE on Win CE 4.2
Hi everybody,
I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)
But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.
Here is my code :
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlServerCe;
namespace UmurBS.Forms.BasimSayimForms
{
publicclass bsEkleForm : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dg;
private System.Windows.Forms.Button button1;
private System.Data.SqlServerCe.SqlCeConnection sqlceconn;
privatestring connstr = "DATA SOURCE = UmurDB.sdf";
public bsEkleForm()
{
InitializeComponent();
}
protectedoverridevoid Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
privatevoid InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.dg = new System.Windows.Forms.DataGrid();
//
// button1
//
this.button1.Location = new System.Drawing.Point(160, 264);
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dg
//
this.dg.Location = new System.Drawing.Point(8, 8);
this.dg.Size = new System.Drawing.Size(224, 200);
this.dg.Text = "dg";
//
// bsEkleForm
//
this.ClientSize = new System.Drawing.Size(237, 291);
this.Controls.Add(this.dg);
this.Controls.Add(this.button1);
this.Text = "bsEkleForm";
}
#endregion
privatevoid button1_Click(object sender, System.EventArgs e)
{
sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);
this.ekle();
}
privatevoid ekle()
{
try
{
SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);
sqlceconn.Open();
int rowsaffected = cmd.ExecuteNonQuery();
}
catch(Exception exc)
{
MessageBox.Show(exc.Message);
}
finally
{
if (sqlceconn != null)
if (sqlceconn.State == ConnectionState.Open)
sqlceconn.Close();
}
}
}
}
Any idea ?
Regards
Serkan
In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811
Hope this assists.
|||Hi Erik
Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.
When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(
Thanks for any help , suggesstions.
Regards
Serkan
|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||Hi Erik,
Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.
|||You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:
For ARMV4i-based devices
as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.
ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB
You may need to have a look at this as well: http://support.microsoft.com/kb/914829/
Help about running SQL CE on Win CE 4.2
Hi everybody,
I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)
But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.
Here is my code :
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlServerCe;
namespace UmurBS.Forms.BasimSayimForms
{
public class bsEkleForm : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dg;
private System.Windows.Forms.Button button1;
private System.Data.SqlServerCe.SqlCeConnection sqlceconn;
private string connstr = "DATA SOURCE = UmurDB.sdf";
public bsEkleForm()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.dg = new System.Windows.Forms.DataGrid();
//
// button1
//
this.button1.Location = new System.Drawing.Point(160, 264);
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dg
//
this.dg.Location = new System.Drawing.Point(8, 8);
this.dg.Size = new System.Drawing.Size(224, 200);
this.dg.Text = "dg";
//
// bsEkleForm
//
this.ClientSize = new System.Drawing.Size(237, 291);
this.Controls.Add(this.dg);
this.Controls.Add(this.button1);
this.Text = "bsEkleForm";
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);
this.ekle();
}
private void ekle()
{
try
{
SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);
sqlceconn.Open();
int rowsaffected = cmd.ExecuteNonQuery();
}
catch(Exception exc)
{
MessageBox.Show(exc.Message);
}
finally
{
if (sqlceconn != null)
if (sqlceconn.State == ConnectionState.Open)
sqlceconn.Close();
}
}
}
}
Any idea ?
Regards
Serkan
In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811
Hope this assists.
|||
Hi Erik
Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.
When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(
Thanks for any help , suggesstions.
Regards
Serkan
|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||Hi Erik,
Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.
|||You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:
For ARMV4i-based devices
as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.
ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB
You may need to have a look at this as well: http://support.microsoft.com/kb/914829/
Friday, March 9, 2012
HELP - SQL Server Crash ? Memory leak ?
Im maintaining a large intranet (approx 10000 concurrent users) running on
one IIS box and one DB box with sqlserver 2000.
Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed on
the db box.
Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to
be using it all.
Currently SQLSERVER 2000 crashes at least once a day.
Its very weird, I run performance monitor with counters on, memory, disk
usage, num users, locks and such.
There is no indications in the counters before the crashes, they just happen
very sudden.
Only indication is that sqlserver makes some huge jumps in memory usage and
mostly the sqlserver then crashes an hour or 2 later.
The only thing that peaks a lot are the locks/sec counter.
My analysis of disk usage, queues etc. tells me i got no kind of i/o
bottlenecks.
Can anybody give me a clue as to what i should do ?
Best regards, Thue"Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
news:3ffd487f$0$9746$edfadb0f@.dread14.news.tele.dk ...
> Hi everybody !
> Im maintaining a large intranet (approx 10000 concurrent users) running
on
> one IIS box and one DB box with sqlserver 2000.
> Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed
on
> the db box.
> Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to
> be using it all.
> Currently SQLSERVER 2000 crashes at least once a day.
> Its very weird, I run performance monitor with counters on, memory, disk
> usage, num users, locks and such.
> There is no indications in the counters before the crashes, they just
happen
> very sudden.
> Only indication is that sqlserver makes some huge jumps in memory usage
and
> mostly the sqlserver then crashes an hour or 2 later.
> The only thing that peaks a lot are the locks/sec counter.
> My analysis of disk usage, queues etc. tells me i got no kind of i/o
> bottlenecks.
> Can anybody give me a clue as to what i should do ?
First, make sure you've applied all the latest service packs.
Also, look at the most recent errorlog after a crash (errorlog.1 most
likely). It should have a dump of what was going on.
That might give you a clue.
Also check your event log for anything.
Finally, if this doesn't turn up anything, call Microsoft.
SQL Server does not normally crash. I have some boxes that ran for more
than a year before we had to reboot them due to a physical move.
> Best regards, Thue|||1. Check the server logs for any informative error messages.
"Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
news:3ffd487f$0$9746$edfadb0f@.dread14.news.tele.dk ...
> Hi everybody !
> Im maintaining a large intranet (approx 10000 concurrent users) running
on
> one IIS box and one DB box with sqlserver 2000.
> Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed
on
> the db box.
> Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to
> be using it all.
> Currently SQLSERVER 2000 crashes at least once a day.
> Its very weird, I run performance monitor with counters on, memory, disk
> usage, num users, locks and such.
> There is no indications in the counters before the crashes, they just
happen
> very sudden.
> Only indication is that sqlserver makes some huge jumps in memory usage
and
> mostly the sqlserver then crashes an hour or 2 later.
> The only thing that peaks a lot are the locks/sec counter.
> My analysis of disk usage, queues etc. tells me i got no kind of i/o
> bottlenecks.
> Can anybody give me a clue as to what i should do ?
> Best regards, Thue|||[posted and mailed, vnligen svara i nys]
Thue Tuxen Srensen (tuxen@.esynergy.dk) writes:
> Only indication is that sqlserver makes some huge jumps in memory usage
> and mostly the sqlserver then crashes an hour or 2 later.
The fact that the memory usage of SQL Server jumps, is perfectly normal,
and is only a sign of that someone is using the application.
By default, SQL Server grabs as much memory it can. This is because the
bigger the cache SQL Server can have, the better will the response time
be.
Possible causes for SQL Server crashes:
* Bug in SQL Server, provoked by some SQL statement.
* Access violation in a extended procedure or OLE object that is called
by SQL Server from application code.
* Hardware problems.
The error log for SQL Server should give information about the case.
If I were you, I would investigate the second point before I opened a
case with Microsoft, because this is the most likely reason.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks for all the answers !
Its running with SP3.
I think I explained the crashes a bit wrong before maybe ...
What I mean is that the sqlserver suddenly 'hangs' and that its impossible
to communicate with in any way.
The performance monitor also stops getting input and just freezes.
The only way to get the site up running again is to restart the sqlserver
service (not the server).
Theres no indication in the errorlogs, as to what happens just before the
'crash'.
Ive looked through all of them, to see if any of them had some info I could
use.
All errorlogs begin with info regarding the startup of sqlserver
initialising the listener and starting up the dbs and such.
After all the info regarding the startup there is nothing in the log.
The next piece of info in the log is the entry where it writes that
sqlserver is terminating due to 'stop' request from service control manager.
And the stop request is issued by me after the system has crashed / is
hanging.
The event viewer is also not helping with anything.
No messages regarding what could cause the error.
Im really frustrated about the problem, because I dont have a clue to
chase down.
But thanks agian for all the answers and your time.
Please do not hesitate to write ! :o) if any of you suddenly comes up with
more things I could check out before calling in a pro.
Best Regards Thue|||Hi there
I share your pain and frustration. I would like all possible causes of CPU
100% to be listed somewhere so I can check that I have taken all precautions
to avoid this. Is there such a page anywhere?!
I want to resolve the CPU 100% problem myself - I thought I had resolved
before but has come back to haunt me now with a new database server machine
with SQL Server 2000, SP 3, which apparently does not allow one to fully
remove the "named pipes" protocol. I resolved a CPU 100% issue months ago by
making sure only TCP/IP was used as the protocol, and removing Named pipes.
Removing from the Enterprise manager (button at bottom in general settings
tab), network protcol "named pipes", and from client connection settings
manager, so that only TCP/IP is allowed as a network protocol. My theory is
that these pipes become blocked, and this causes 100% CPU usage. Could
anyone confirm that this is a known symptom of the named pipes protocol ?!
I am currently having to reboot the machine every few days now since we put
in a new database server with the latest service packs (SQL Server 2000,
SP3). Removing the named-pipes protcol does not seem to have resolved this
nasty problem this time round. I have seen on some newsgroup postings, that
it is no longer possible to actually remove Named Pipes fully since SP3.
The following article thread indicates this:-
http://www.mcse.ms/message97673.html
which is kind of worrying to me, because I was fairly sure removing Named
Pipes as a protocol before, completely cured the CPU 100% symptoms.
My correspondence chess website www.chessworld.net makes heavy use of SQL
Server 2000. It has been running for over 2 years now, and sometimes has
about 200 members online or more within the space of 10 minutes. Overall SQL
Server 2000 has been great, but recently these reboots have been quite
frustrating, and I cannot seem to identify the cause. I continually monitor
any ASP pages that time out with SQL Server errors, and always keen to
ensure all queries run quick on my site. I do not think it is a bad sql
query problem. I continually make efforts to optimise all queries used on
the site. I have also made sure from a long time ago that (NO LOCK) is being
used on select statements to minimise lock escalation.
I found the following article today which is another possible cause of CPU
100%:-
http://support.microsoft.com/defaul...&NoWebContent=1
which possible attributes the Microsoft search service to CPU 100%. I have
now disabled this service from our new database server machine, and put it
to Manual on Startup.
Help needed to resolve CPU 100% issue !
Best wishes
Tryfon Gavriel
Webmaster
www.chessworld.net
"Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
news:3ffd487f$0$9746$edfadb0f@.dread14.news.tele.dk ...
> Hi everybody !
> Im maintaining a large intranet (approx 10000 concurrent users) running
on
> one IIS box and one DB box with sqlserver 2000.
> Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed
on
> the db box.
> Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to
> be using it all.
> Currently SQLSERVER 2000 crashes at least once a day.
> Its very weird, I run performance monitor with counters on, memory, disk
> usage, num users, locks and such.
> There is no indications in the counters before the crashes, they just
happen
> very sudden.
> Only indication is that sqlserver makes some huge jumps in memory usage
and
> mostly the sqlserver then crashes an hour or 2 later.
> The only thing that peaks a lot are the locks/sec counter.
> My analysis of disk usage, queues etc. tells me i got no kind of i/o
> bottlenecks.
> Can anybody give me a clue as to what i should do ?
> Best regards, Thue|||"Tryfon Gavriel" <tryfon@.gtryfon.demon.co.uk> wrote in message
news:btmms5$3n2$1$830fa78d@.news.demon.co.uk...
> Hi there
> I share your pain and frustration. I would like all possible causes of CPU
> 100% to be listed somewhere so I can check that I have taken all
precautions
> to avoid this. Is there such a page anywhere?!
> I want to resolve the CPU 100% problem myself - I thought I had resolved
> before but has come back to haunt me now with a new database server
machine
> with SQL Server 2000, SP 3, which apparently does not allow one to fully
> remove the "named pipes" protocol. I resolved a CPU 100% issue months ago
by
> making sure only TCP/IP was used as the protocol, and removing Named
pipes.
> Removing from the Enterprise manager (button at bottom in general settings
> tab), network protcol "named pipes", and from client connection settings
> manager, so that only TCP/IP is allowed as a network protocol. My theory
is
> that these pipes become blocked, and this causes 100% CPU usage. Could
> anyone confirm that this is a known symptom of the named pipes protocol ?!
Nope, never seen that happen.
> I am currently having to reboot the machine every few days now since we
put
> in a new database server with the latest service packs (SQL Server 2000,
> SP3). Removing the named-pipes protcol does not seem to have resolved this
> nasty problem this time round. I have seen on some newsgroup postings,
that
> it is no longer possible to actually remove Named Pipes fully since SP3.
> The following article thread indicates this:-
> http://www.mcse.ms/message97673.html
> which is kind of worrying to me, because I was fairly sure removing Named
> Pipes as a protocol before, completely cured the CPU 100% symptoms.
> My correspondence chess website www.chessworld.net makes heavy use of SQL
> Server 2000. It has been running for over 2 years now, and sometimes has
> about 200 members online or more within the space of 10 minutes. Overall
SQL
> Server 2000 has been great, but recently these reboots have been quite
> frustrating, and I cannot seem to identify the cause. I continually
monitor
> any ASP pages that time out with SQL Server errors, and always keen to
> ensure all queries run quick on my site. I do not think it is a bad sql
> query problem. I continually make efforts to optimise all queries used on
> the site. I have also made sure from a long time ago that (NO LOCK) is
being
> used on select statements to minimise lock escalation.
Keep in mind that is NOT always a good solution.
> I found the following article today which is another possible cause of CPU
> 100%:-
>
http://support.microsoft.com/defaul...&NoWebContent=1
> which possible attributes the Microsoft search service to CPU 100%. I have
> now disabled this service from our new database server machine, and put it
> to Manual on Startup.
> Help needed to resolve CPU 100% issue !
Best bet is probably to try to have profiler running.
There can be many reasons. Keep in mind it's perfectly possible to be using
100% of the CPU and it not be a bug etc. It could simply be you're that
busy.
We have a DB server that from time to time hits 100% CPU. And stays that
way for a few seconds or more. It hurts performance, but returns to normal.
> Best wishes
> Tryfon Gavriel
> Webmaster
> www.chessworld.net
>
>
> "Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
> news:3ffd487f$0$9746$edfadb0f@.dread14.news.tele.dk ...
> > Hi everybody !
> > Im maintaining a large intranet (approx 10000 concurrent users) running
> on
> > one IIS box and one DB box with sqlserver 2000.
> > Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2 scsi disks installed
> on
> > the db box.
> > Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem
to
> > be using it all.
> > Currently SQLSERVER 2000 crashes at least once a day.
> > Its very weird, I run performance monitor with counters on, memory, disk
> > usage, num users, locks and such.
> > There is no indications in the counters before the crashes, they just
> happen
> > very sudden.
> > Only indication is that sqlserver makes some huge jumps in memory usage
> and
> > mostly the sqlserver then crashes an hour or 2 later.
> > The only thing that peaks a lot are the locks/sec counter.
> > My analysis of disk usage, queues etc. tells me i got no kind of i/o
> > bottlenecks.
> > Can anybody give me a clue as to what i should do ?
> > Best regards, Thue|||"Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
news:3ffe994e$0$9745$edfadb0f@.dread14.news.tele.dk ...
> Thanks for all the answers !
> Its running with SP3.
Good.
> I think I explained the crashes a bit wrong before maybe ...
> What I mean is that the sqlserver suddenly 'hangs' and that its impossible
> to communicate with in any way.
You contradict this down below. Which is somewhat critical.
> The performance monitor also stops getting input and just freezes.
What metrics are you measuring.
> The only way to get the site up running again is to restart the sqlserver
> service (not the server).
> Theres no indication in the errorlogs, as to what happens just before the
> 'crash'.
> Ive looked through all of them, to see if any of them had some info I
could
> use.
> All errorlogs begin with info regarding the startup of sqlserver
> initialising the listener and starting up the dbs and such.
> After all the info regarding the startup there is nothing in the log.
> The next piece of info in the log is the entry where it writes that
> sqlserver is terminating due to 'stop' request from service control
manager.
Ok. This indicates that the server IS listening.
One thing you may want to do is issue a NET STOP SQLSERVERAGENT command
followed by NET STOP MSSQLSERVER and see which one (if either takes a long
period of time).
When starting does it start up quickly or take time? Is there anything in
the error log about recovering a DB?
Also, does your app call ANY extended stored procs (XP_fooname)
> And the stop request is issued by me after the system has crashed / is
> hanging.
Yeah. I wouldn't call this a crash. Not even sure I'd call it a hang. But
that's partly semantics.
> The event viewer is also not helping with anything.
> No messages regarding what could cause the error.
> Im really frustrated about the problem, because I dont have a clue to
> chase down.
> But thanks agian for all the answers and your time.
> Please do not hesitate to write ! :o) if any of you suddenly comes up with
> more things I could check out before calling in a pro.
Just the above.
What happens if you wait? (how long do you wait before cycling it?)
> Best Regards Thue|||Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> I am currently having to reboot the machine every few days now since we
> put in a new database server with the latest service packs (SQL Server
> 2000, SP3). Removing the named-pipes protcol does not seem to have
> resolved this nasty problem this time round. I have seen on some
> newsgroup postings, that it is no longer possible to actually remove
> Named Pipes fully since SP3.
100% CPU may not be cause for alarm. When SQL Server becomes completely
unresponsive, it certainly is.
I know of two way this can happen. Or rather, I know of one, and one
"seemingly unresponsive". The one case where it becomes unresponsive,
is error 17883. If this happens, you should see this in the error log,
where you get a load of these messages. The message only appears with
SP3 or later hotfixes.
The other case I've seen was with some poor SQL. In this particular
case I was testing performance of this poor SQL for an article on my
web site. I was surprised to see that this particular query took so
much CPU, that issuing an sp_who could have a response time on over
30 seconds.
But there are probably more possibilities than these two. But then again,
it certainly not somehing which happens all over town, so if your SQL
Server becomes unresponsive, there is something fishy on your machine,
be that hardware or poor SQL statements.
One way to track down the latter is to have a profiler trace running,
and see what you get just before the machine goes into nirvana.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi again.
Im measuring CPU, MEMORY, LOCKS and Disk Usage.
Nothing speciel in the logs about revovering.
We dont use any extended procedures.
I havent tried to wait for a long time before restarting it, because theres
a lot of users waiting for it to be up again.
Usually i wait like 5 minutes or so.
/Thue
"Greg D. Moore (Strider)" <mooregr@.greenms.com> skrev i en meddelelse
news:k2HLb.131878$JW3.4033@.twister.nyroc.rr.com...
> "Thue Tuxen Srensen" <tuxen@.esynergy.dk> wrote in message
> news:3ffe994e$0$9745$edfadb0f@.dread14.news.tele.dk ...
> > Thanks for all the answers !
> > Its running with SP3.
> Good.
>
> > I think I explained the crashes a bit wrong before maybe ...
> > What I mean is that the sqlserver suddenly 'hangs' and that its
impossible
> > to communicate with in any way.
> You contradict this down below. Which is somewhat critical.
>
> > The performance monitor also stops getting input and just freezes.
> What metrics are you measuring.
>
> > The only way to get the site up running again is to restart the
sqlserver
> > service (not the server).
> > Theres no indication in the errorlogs, as to what happens just before
the
> > 'crash'.
> > Ive looked through all of them, to see if any of them had some info I
> could
> > use.
> > All errorlogs begin with info regarding the startup of sqlserver
> > initialising the listener and starting up the dbs and such.
> > After all the info regarding the startup there is nothing in the log.
> > The next piece of info in the log is the entry where it writes that
> > sqlserver is terminating due to 'stop' request from service control
> manager.
> Ok. This indicates that the server IS listening.
> One thing you may want to do is issue a NET STOP SQLSERVERAGENT command
> followed by NET STOP MSSQLSERVER and see which one (if either takes a long
> period of time).
> When starting does it start up quickly or take time? Is there anything in
> the error log about recovering a DB?
> Also, does your app call ANY extended stored procs (XP_fooname)
>
> > And the stop request is issued by me after the system has crashed / is
> > hanging.
> Yeah. I wouldn't call this a crash. Not even sure I'd call it a hang.
But
> that's partly semantics.
> > The event viewer is also not helping with anything.
> > No messages regarding what could cause the error.
> > Im really frustrated about the problem, because I dont have a clue to
> > chase down.
> > But thanks agian for all the answers and your time.
> > Please do not hesitate to write ! :o) if any of you suddenly comes up
with
> > more things I could check out before calling in a pro.
> Just the above.
> What happens if you wait? (how long do you wait before cycling it?)
>
> > Best Regards Thue|||Thank you Greg and Erland
I ran an Event trace using SQL profiler when CPU was at 100%, generating
approaching 3200 rows within a few minutes, and interestingly, ordering by
"Duration" revealed the following entries:-
(The first six are all event type 15 - which is "Disconnect" i believe. They
have massive duration times, and massive values for Reads.)
1002 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 90
616436 2004-01-12 18:04:35.687 187793 2 3326
1474 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 58
614733 2004-01-12 18:04:44.687 212743 1 20373
3118 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 108
612796 2004-01-12 18:05:42.107 215728 0 19657
2522 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 66
600640 2004-01-12 18:05:41.810 281198 5 12674
1881 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 72
256296 2004-01-12 18:10:57.093 69592 0 375
353 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 86
126046 2004-01-12 18:12:17.403 331 0 15
974 10 declare @.P1 int set @.P1=180150025 declare @.P2 int set @.P2=8 declare
@.P3 int set @.P3=1 declare @.P4 int set @.P4=0 exec sp_cursoropen @.P1 output,
N' select (select IsNull(min(boardnumber),0) from boardsplayers a WITH
(NOLOCK), games b WITH (NOLOCK) where a NULL 1320 Microsoft(R) Windows (R)
2000 Operating System sa 62 36763 2004-01-12 18:14:14.797 19868 0 0
I am not sure how to interpret these events. What does a massive duration on
Event Type 15 mean?! Also there are a massive amount of "Reads" associated
with these.
Any help greatly appreciated!
If I order by the CPU column descending, the top 10 rows are:-
1474 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 58
614733 2004-01-12 18:04:44.687 212743 1 20373
3118 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 108
612796 2004-01-12 18:05:42.107 215728 0 19657
2522 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 66
600640 2004-01-12 18:05:41.810 281198 5 12674
1002 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 90
616436 2004-01-12 18:04:35.687 187793 2 3326
56 12 SELECT
notepadvisible,sandbagger,tournamentsummaryview,ad min,ShowRatingsofplayers,j
avascriptboardcreator,htmlemails,listcurrentgamesv iew,logincount,JavaScriptS
upportLevel,RatingPredictorStyle,MessageBoxType,La nguageID,TeamCreator,banne
rs,IsNull(CountryID,1 NULL 1320 Microsoft(R) Windows (R) 2000 Operating
System sa 102 12843 2004-01-12 18:14:00.733 11599 0 2875
954 12 SELECT
notepadvisible,sandbagger,tournamentsummaryview,ad min,ShowRatingsofplayers,j
avascriptboardcreator,htmlemails,listcurrentgamesv iew,logincount,JavaScriptS
upportLevel,RatingPredictorStyle,MessageBoxType,La nguageID,TeamCreator,banne
rs,IsNull(CountryID,1 NULL 1320 Microsoft(R) Windows (R) 2000 Operating
System sa 96 25050 2004-01-12 18:14:25.340 11599 0 2797
1817 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 85
6810 2004-01-12 18:15:02.640 3484 0 1516
1533 12 select GameNumber,TournamentID from TournamentGames WITH (NOLOCK)
where gamenumber = 349913 NULL 1320 Microsoft(R) Windows (R) 2000 Operating
System sa 58 1563 2004-01-12 18:14:59.437 755 0 1015
1553 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 58
1966 2004-01-12 18:14:59.437 765 0 1015
1881 15 NULL NULL 1320 Microsoft(R) Windows (R) 2000 Operating System sa 72
256296 2004-01-12 18:10:57.093 69592 0 375
Again any help in diagnosing the cause of this, which puts the CPU to 100%
would be greatly appreciated.
Best wishes
Tryfon
"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns946C95ED49A6Yazorman@.127.0.0.1...
> Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > I am currently having to reboot the machine every few days now since we
> > put in a new database server with the latest service packs (SQL Server
> > 2000, SP3). Removing the named-pipes protcol does not seem to have
> > resolved this nasty problem this time round. I have seen on some
> > newsgroup postings, that it is no longer possible to actually remove
> > Named Pipes fully since SP3.
> 100% CPU may not be cause for alarm. When SQL Server becomes completely
> unresponsive, it certainly is.
> I know of two way this can happen. Or rather, I know of one, and one
> "seemingly unresponsive". The one case where it becomes unresponsive,
> is error 17883. If this happens, you should see this in the error log,
> where you get a load of these messages. The message only appears with
> SP3 or later hotfixes.
> The other case I've seen was with some poor SQL. In this particular
> case I was testing performance of this poor SQL for an article on my
> web site. I was surprised to see that this particular query took so
> much CPU, that issuing an sp_who could have a response time on over
> 30 seconds.
> But there are probably more possibilities than these two. But then again,
> it certainly not somehing which happens all over town, so if your SQL
> Server becomes unresponsive, there is something fishy on your machine,
> be that hardware or poor SQL statements.
> One way to track down the latter is to have a profiler trace running,
> and see what you get just before the machine goes into nirvana.
> --
> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> (The first six are all event type 15 - which is "Disconnect" i believe.
> They have massive duration times, and massive values for Reads.)
>...
> I am not sure how to interpret these events. What does a massive
> duration on Event Type 15 mean?! Also there are a massive amount of
> "Reads" associated with these.
As you said, event 15 is disconnection. Duration is just how long the
connection was open. And Reads are just the accumulated number of
reads during that session.
In itself, not that exciting. Then again, maybe it is a clue that four
long-running processes owned by sa quits just before the machines
reaches nirvana. No, please don't ask me what that clue would mean!
It is possible that the SQL statements you see when you sort on Duration
has anything to do with the CPU hog. However, I wouid not really expect
that process to show up. I would include the Starting events in the trace,
and then investigate the uncompleted events at the end of the trace
when the CPU goes 100%.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns946EED4BB70EFYazorman@.127.0.0.1>...
> Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > (The first six are all event type 15 - which is "Disconnect" i believe.
> > They have massive duration times, and massive values for Reads.)
> >...
> > I am not sure how to interpret these events. What does a massive
> > duration on Event Type 15 mean?! Also there are a massive amount of
> > "Reads" associated with these.
> As you said, event 15 is disconnection. Duration is just how long the
> connection was open. And Reads are just the accumulated number of
> reads during that session.
> In itself, not that exciting. Then again, maybe it is a clue that four
> long-running processes owned by sa quits just before the machines
> reaches nirvana. No, please don't ask me what that clue would mean!
> It is possible that the SQL statements you see when you sort on Duration
> has anything to do with the CPU hog. However, I wouid not really expect
> that process to show up. I would include the Starting events in the trace,
> and then investigate the uncompleted events at the end of the trace
> when the CPU goes 100%.
TJI:
I have seen a similar problem (loss of connectivity, performance
grinds to a halt, etc.) when one of our servers has 3 (or more)
exchange waits active for extended periods of time. We start seeing
performance degradation at 2 exchange waits, which raises the flag for
us.
What is happening in our case is that users for some reason disconnect
their side (reboot their workstation, etc) with bad timing, just in
the middle of a network handshake before responding to the server. The
server just waits for the packet from the client that never comes.
These transactions stay alive, tying up datapages and locks, which
escalate as users log back in and retry....
(We saw this by waiting, sometimes as long as 1/2 hour, for EM to
connect, then waiting again for the Process list to present itself.)
With your large number of concurrent users, I would not be surprised
if this is not your problem.|||Hi Erland and all
The server has been standing for 2 weeks without a reboot. This has been a
great relief to me. If my solution may help others, the two things I did
were:-
a) Simplify some of the SQL - taking out some luxury sub-queries off many
pages
b) Taking off auto-grow from three of the databases - tempdb, the main
Chessworld db, and master.
I was not exactly sure if it was a) or b) but I have more evidence now it
was in fact b) that was causing massive slow-downs requiring a reboot
because CPU seems to go unrecoverably to 100%.
The reason for more evidence, is that today, I finally had a "cannot
allocate space error" being logged. I increased the size of the chessworld
db, and the tempdb, and put back the auto-grow on the chessworld db. Within
about an hour or two, the symptoms of a big slow-down came back with CPU
100%.
I rebooted the database server but have again taken off auto-grow options. I
believe for my site with many concurrent users, the auto-grow is causing
issues. I will keep you posted.
Best wishes
Tryfon
"Erland Sommarskog" <sommar@.algonet.se> wrote in message
news:Xns946EED4BB70EFYazorman@.127.0.0.1...
> Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > (The first six are all event type 15 - which is "Disconnect" i believe.
> > They have massive duration times, and massive values for Reads.)
> >...
> > I am not sure how to interpret these events. What does a massive
> > duration on Event Type 15 mean?! Also there are a massive amount of
> > "Reads" associated with these.
> As you said, event 15 is disconnection. Duration is just how long the
> connection was open. And Reads are just the accumulated number of
> reads during that session.
> In itself, not that exciting. Then again, maybe it is a clue that four
> long-running processes owned by sa quits just before the machines
> reaches nirvana. No, please don't ask me what that clue would mean!
> It is possible that the SQL statements you see when you sort on Duration
> has anything to do with the CPU hog. However, I wouid not really expect
> that process to show up. I would include the Starting events in the trace,
> and then investigate the uncompleted events at the end of the trace
> when the CPU goes 100%.
>
> --
> Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||"Tryfon Gavriel" <tryfon@.gtryfon.demon.co.uk> wrote in message
news:bvhpk1$7qm$1$8302bc10@.news.demon.co.uk...
> Hi Erland and all
> The server has been standing for 2 weeks without a reboot. This has been a
> great relief to me. If my solution may help others, the two things I did
> were:-
> a) Simplify some of the SQL - taking out some luxury sub-queries off many
> pages
> b) Taking off auto-grow from three of the databases - tempdb, the main
> Chessworld db, and master.
That'll do it right there.
Here's a typical scenario:
DB growth is set to 10%
DB is 100MB...
An insert is performed... limit gets reached. So, now the DB wants to
expand.
It starts to allocate 10MB.
During this time, deletes and updates can generally be performed, but
basically any additional inserts will be blocked while the space is
allocated. (and any updates or deletes that need to occur on those blocked
inserts obviously get blocked.)
Now, SQL Server can generally allocate 10MB pretty quick.
But now you've got 110MB. Next expansion will be 11MB. Putting you at
121MB. Next one will be 12.1 MB. And this continues.
Before you know it, you've got a 10 gig DB trying to allocate 1GB. (and the
kicker is, it probably only needs 10MB at that point. :-)
And of course during this allocation, the DB appears hung.
So, I generally try NOT to allow auto-growth, or set it to a fixed amount
(like 10MB or 100MB, etc. depending on the size and type of DB).
Also, this can occur a lot with transaction logs. Which generally means
that no transcation backups are being done. Which on a production DB is
almost always a "bad thing".
Hmm, given what yu say, I'm guessing that your tempb may be growing a lot.
(Since upon restart I believe it'll get resized back to it's original size.)
This could be a result of a bad design, or simply the result of a necessary
design.
What I'd do is check which DB is growing the most and resize it.
The master DB normally should not grow much at all.
So it's most likely the tempdb or the chessworld one. (as he states the
obvious.)
> I was not exactly sure if it was a) or b) but I have more evidence now it
> was in fact b) that was causing massive slow-downs requiring a reboot
> because CPU seems to go unrecoverably to 100%.
> The reason for more evidence, is that today, I finally had a "cannot
> allocate space error" being logged. I increased the size of the chessworld
> db, and the tempdb, and put back the auto-grow on the chessworld db.
Within
> about an hour or two, the symptoms of a big slow-down came back with CPU
> 100%.
> I rebooted the database server but have again taken off auto-grow options.
I
> believe for my site with many concurrent users, the auto-grow is causing
> issues. I will keep you posted.
Please do.
> Best wishes
> Tryfon
>
> "Erland Sommarskog" <sommar@.algonet.se> wrote in message
> news:Xns946EED4BB70EFYazorman@.127.0.0.1...
> > Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > > (The first six are all event type 15 - which is "Disconnect" i
believe.
> > > They have massive duration times, and massive values for Reads.)
> > >...
> > > > I am not sure how to interpret these events. What does a massive
> > > duration on Event Type 15 mean?! Also there are a massive amount of
> > > "Reads" associated with these.
> > As you said, event 15 is disconnection. Duration is just how long the
> > connection was open. And Reads are just the accumulated number of
> > reads during that session.
> > In itself, not that exciting. Then again, maybe it is a clue that four
> > long-running processes owned by sa quits just before the machines
> > reaches nirvana. No, please don't ask me what that clue would mean!
> > It is possible that the SQL statements you see when you sort on Duration
> > has anything to do with the CPU hog. However, I wouid not really expect
> > that process to show up. I would include the Starting events in the
trace,
> > and then investigate the uncompleted events at the end of the trace
> > when the CPU goes 100%.
> > --
> > Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> > Books Online for SQL Server SP3 at
> > http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi there
Thank you for that feedback.
I should have also mentioned the following: There was an unexpected database
server shutdown last night recorded in the w2k event viewer. I had to
request the database server to be restarted. Once it did it was working fine
for a while, but then I noticed on my ASP error log, the "cannot allocate
space" errors. It was then that I increased the size, but also put auto-grow
on. It just died within 2 hours. What I then did was take off autogrow, and
restart the database server again.
So basically:-
* I have doubled the size of the tempdb database to 2 gig for data file and
1 gig for transaction log
* I have also doubled the size of the Chessworld database (One concern here
is the time it takes the backup the database, but it still seems to be able
to back it up within a few minutes.. a relief :) )
* Auto-grow taken off both databases
If the server shuts down in 2 months time, then fine. I will request a
database server reboot and increase their sizes again. I cannot have a
background process re-allocating space, when I have tonnes of players online
playing chess moves (or trying to!), resulting in me having to reboot the
server. The "cannot allocate" space errors that occured last night have now
stopped.
The following may be useful for other ASP/SQL Server developers for general
problem diagnosis: About two weeks ago, I knocked up an ASP admin page to
monitor the sysprocesses table. This is useful to me in trying to understand
the processes with greatest CPU usage. I ordered it by CPU, but also made it
highlight in red processes which had a last batch time of more than 10
minutes ago. The idea was to highlight potential processes that could be
killed. I found the following three particularly useful web references :-
Kill documentation:
http://msdn.microsoft.com/library/d..._kf-kz_1zos.asp
Tips for handling blocking:
http://www.sql-server-performance.com/blocking.asp
Understanding and resolving blocking problems:
http://support.microsoft.com/defaul...&NoWebContent=1
Which I have put links at the top of my admin page for viewing processes :-)
It also made me paranoid about the background processes going on- hence my
intuition to turn off the auto-grow tick boxes.
Some insights include - simplification of pages, do seem to lead to
processes consuming less CPU, and generally a faster site. But also the
Background processes are highlighted. I think viewing the sysprocesses table
is very useful point of reference, and the reason I started investigating
it, is because it is mentioned in SQL Serrver 2000 programming book page
1081, where it also highlights using the following tools for analysing
problems:-
a) SHOWPLAN TEXT | ALL
b) STATISTICS IO
c) DBCC
d) Query governer
e) sp_lock
f) sysprocesses table
g) SQL Server Profiler
(should be listed because detailed): h) Perfmon
Before posting to this excellent group, I had not actually used the SQL
profiler much at all. I did have admin pages already for sp_lock and sp_who.
But I usually use sp_lock for analysing locks, and ignored the sp_who most
of the time. The view on sysprocesses is more useful to me because you can
order by cpu, etc. I now regularly look at the sp_lock page and the
"processes" page.
I also make use of the ASP error object to generate errors in a log file,
and my most frequently logged error is now SQL Server related. This means I
can immediately see any bottleneck ASP pages where there is potentially bad
SQL or other issues.
Best wishes
Tryfon
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:Ug0Tb.13391$n62.4463@.twister.nyroc.rr.com...
> "Tryfon Gavriel" <tryfon@.gtryfon.demon.co.uk> wrote in message
> news:bvhpk1$7qm$1$8302bc10@.news.demon.co.uk...
> > Hi Erland and all
> > The server has been standing for 2 weeks without a reboot. This has been
a
> > great relief to me. If my solution may help others, the two things I did
> > were:-
> > a) Simplify some of the SQL - taking out some luxury sub-queries off
many
> > pages
> > b) Taking off auto-grow from three of the databases - tempdb, the main
> > Chessworld db, and master.
> That'll do it right there.
> Here's a typical scenario:
> DB growth is set to 10%
> DB is 100MB...
> An insert is performed... limit gets reached. So, now the DB wants to
> expand.
> It starts to allocate 10MB.
> During this time, deletes and updates can generally be performed, but
> basically any additional inserts will be blocked while the space is
> allocated. (and any updates or deletes that need to occur on those blocked
> inserts obviously get blocked.)
> Now, SQL Server can generally allocate 10MB pretty quick.
> But now you've got 110MB. Next expansion will be 11MB. Putting you at
> 121MB. Next one will be 12.1 MB. And this continues.
> Before you know it, you've got a 10 gig DB trying to allocate 1GB. (and
the
> kicker is, it probably only needs 10MB at that point. :-)
> And of course during this allocation, the DB appears hung.
> So, I generally try NOT to allow auto-growth, or set it to a fixed amount
> (like 10MB or 100MB, etc. depending on the size and type of DB).
> Also, this can occur a lot with transaction logs. Which generally means
> that no transcation backups are being done. Which on a production DB is
> almost always a "bad thing".
> Hmm, given what yu say, I'm guessing that your tempb may be growing a lot.
> (Since upon restart I believe it'll get resized back to it's original
size.)
> This could be a result of a bad design, or simply the result of a
necessary
> design.
> What I'd do is check which DB is growing the most and resize it.
> The master DB normally should not grow much at all.
> So it's most likely the tempdb or the chessworld one. (as he states the
> obvious.)
>
> > I was not exactly sure if it was a) or b) but I have more evidence now i
t
> > was in fact b) that was causing massive slow-downs requiring a reboot
> > because CPU seems to go unrecoverably to 100%.
> > The reason for more evidence, is that today, I finally had a "cannot
> > allocate space error" being logged. I increased the size of the
chessworld
> > db, and the tempdb, and put back the auto-grow on the chessworld db.
> Within
> > about an hour or two, the symptoms of a big slow-down came back with CPU
> > 100%.
> > I rebooted the database server but have again taken off auto-grow
options.
> I
> > believe for my site with many concurrent users, the auto-grow is causing
> > issues. I will keep you posted.
> Please do.
>
> > Best wishes
> > Tryfon
> > "Erland Sommarskog" <sommar@.algonet.se> wrote in message
> > news:Xns946EED4BB70EFYazorman@.127.0.0.1...
> > > Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > > > (The first six are all event type 15 - which is "Disconnect" i
> believe.
> > > > They have massive duration times, and massive values for Reads.)
> > > >...
> > > > > > I am not sure how to interpret these events. What does a massive
> > > > duration on Event Type 15 mean?! Also there are a massive amount of
> > > > "Reads" associated with these.
> > > > As you said, event 15 is disconnection. Duration is just how long the
> > > connection was open. And Reads are just the accumulated number of
> > > reads during that session.
> > > > In itself, not that exciting. Then again, maybe it is a clue that four
> > > long-running processes owned by sa quits just before the machines
> > > reaches nirvana. No, please don't ask me what that clue would mean!
> > > > It is possible that the SQL statements you see when you sort on
Duration
> > > has anything to do with the CPU hog. However, I wouid not really
expect
> > > that process to show up. I would include the Starting events in the
> trace,
> > > and then investigate the uncompleted events at the end of the trace
> > > when the CPU goes 100%.
> > > > > --
> > > Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> > > > Books Online for SQL Server SP3 at
> > > http://www.microsoft.com/sql/techin.../2000/books.asp|||Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> * I have also doubled the size of the Chessworld database (One concern
> here is the time it takes the backup the database, but it still seems to
> be able to back it up within a few minutes.. a relief :) )
My experience is that the time to do a backup is related to the actual
amount of data in the database. That is, if you allocate 60 GB for a
1 GB database, then those 59 GB are cheap. (The one occassion they
cost, is when you want to restore a backup into a clone database;
then the allocation of those 59 GB will take 10-20 minutes extra.)
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Tryfon Gavriel" <tryfon@.gtryfon.demon.co.uk> wrote in message
news:bviv5o$hnf$1$8302bc10@.news.demon.co.uk...
> Hi there
> Thank you for that feedback.
> I should have also mentioned the following: There was an unexpected
database
> server shutdown last night recorded in the w2k event viewer. I had to
> request the database server to be restarted. Once it did it was working
fine
> for a while, but then I noticed on my ASP error log, the "cannot allocate
> space" errors. It was then that I increased the size, but also put
auto-grow
> on. It just died within 2 hours. What I then did was take off autogrow,
and
> restart the database server again.
> So basically:-
> * I have doubled the size of the tempdb database to 2 gig for data file
and
> 1 gig for transaction log
That's a fairly large tempdb. I'd question your design if you really need
that much. But I don't know how many users you're supporting.
But it does indicate that perhaps your transactions are lasting for two
long.
Consider this, let's say (and this is a wild guess here) you're supporting 1
million users. If each one needs 1KB of temp data stored, that would be
about 1 gig of data. However, in theory it should be unusual for all 1
million users to need that data stored at once.
But like I say, I don't know much about the design, but I'd be suspicious
about how long your transactions are being held open.
> * I have also doubled the size of the Chessworld database (One concern
here
> is the time it takes the backup the database, but it still seems to be
able
> to back it up within a few minutes.. a relief :) )
Note that a backup will not affect database performance. (or at least the
affect is extremely small because of an increased disk I/O. Note that a
backup does NOT stop processing.)
> * Auto-grow taken off both databases
> If the server shuts down in 2 months time, then fine. I will request a
> database server reboot and increase their sizes again.
Even if the SQL server locks up, simply stopping or worse killing it should
be enough. Rebooting the box should be an absolutel last resort.
> I cannot have a
> background process re-allocating space, when I have tonnes of players
online
> playing chess moves (or trying to!), resulting in me having to reboot the
> server. The "cannot allocate" space errors that occured last night have
now
> stopped.
Understandable.
> The following may be useful for other ASP/SQL Server developers for
general
> problem diagnosis: About two weeks ago, I knocked up an ASP admin page to
> monitor the sysprocesses table. This is useful to me in trying to
understand
> the processes with greatest CPU usage. I ordered it by CPU, but also made
it
> highlight in red processes which had a last batch time of more than 10
> minutes ago. The idea was to highlight potential processes that could be
> killed. I found the following three particularly useful web references :-
Hmm, can you post thse someplace? Might be interesting to use.
Just as a reference we have databases that had uptimes over over a year.
(only reason we needed to change that was due to finally being able to apply
SP3a.)
> Kill documentation:
http://msdn.microsoft.com/library/d..._kf-kz_1zos.asp
> Tips for handling blocking:
> http://www.sql-server-performance.com/blocking.asp
> Understanding and resolving blocking problems:
http://support.microsoft.com/defaul...&NoWebContent=1
> Which I have put links at the top of my admin page for viewing processes
:-)
> It also made me paranoid about the background processes going on- hence my
> intuition to turn off the auto-grow tick boxes.
> Some insights include - simplification of pages, do seem to lead to
> processes consuming less CPU, and generally a faster site. But also the
> Background processes are highlighted. I think viewing the sysprocesses
table
> is very useful point of reference, and the reason I started investigating
> it, is because it is mentioned in SQL Serrver 2000 programming book page
> 1081, where it also highlights using the following tools for analysing
> problems:-
> a) SHOWPLAN TEXT | ALL
> b) STATISTICS IO
> c) DBCC
> d) Query governer
> e) sp_lock
> f) sysprocesses table
> g) SQL Server Profiler
> (should be listed because detailed): h) Perfmon
> Before posting to this excellent group, I had not actually used the SQL
> profiler much at all. I did have admin pages already for sp_lock and
sp_who.
> But I usually use sp_lock for analysing locks, and ignored the sp_who most
> of the time. The view on sysprocesses is more useful to me because you can
> order by cpu, etc. I now regularly look at the sp_lock page and the
> "processes" page.
> I also make use of the ASP error object to generate errors in a log file,
> and my most frequently logged error is now SQL Server related. This means
I
> can immediately see any bottleneck ASP pages where there is potentially
bad
> SQL or other issues.
That's some good stuff.
> Best wishes
> Tryfon
>
> "Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in
message
> news:Ug0Tb.13391$n62.4463@.twister.nyroc.rr.com...
> > "Tryfon Gavriel" <tryfon@.gtryfon.demon.co.uk> wrote in message
> > news:bvhpk1$7qm$1$8302bc10@.news.demon.co.uk...
> > > Hi Erland and all
> > > > The server has been standing for 2 weeks without a reboot. This has
been
> a
> > > great relief to me. If my solution may help others, the two things I
did
> > > were:-
> > > > a) Simplify some of the SQL - taking out some luxury sub-queries off
> many
> > > pages
> > > b) Taking off auto-grow from three of the databases - tempdb, the main
> > > Chessworld db, and master.
> > > That'll do it right there.
> > Here's a typical scenario:
> > DB growth is set to 10%
> > DB is 100MB...
> > An insert is performed... limit gets reached. So, now the DB wants to
> > expand.
> > It starts to allocate 10MB.
> > During this time, deletes and updates can generally be performed, but
> > basically any additional inserts will be blocked while the space is
> > allocated. (and any updates or deletes that need to occur on those
blocked
> > inserts obviously get blocked.)
> > Now, SQL Server can generally allocate 10MB pretty quick.
> > But now you've got 110MB. Next expansion will be 11MB. Putting you at
> > 121MB. Next one will be 12.1 MB. And this continues.
> > Before you know it, you've got a 10 gig DB trying to allocate 1GB. (and
> the
> > kicker is, it probably only needs 10MB at that point. :-)
> > And of course during this allocation, the DB appears hung.
> > So, I generally try NOT to allow auto-growth, or set it to a fixed
amount
> > (like 10MB or 100MB, etc. depending on the size and type of DB).
> > Also, this can occur a lot with transaction logs. Which generally
means
> > that no transcation backups are being done. Which on a production DB is
> > almost always a "bad thing".
> > Hmm, given what yu say, I'm guessing that your tempb may be growing a
lot.
> > (Since upon restart I believe it'll get resized back to it's original
> size.)
> > This could be a result of a bad design, or simply the result of a
> necessary
> > design.
> > What I'd do is check which DB is growing the most and resize it.
> > The master DB normally should not grow much at all.
> > So it's most likely the tempdb or the chessworld one. (as he states the
> > obvious.)
> > > I was not exactly sure if it was a) or b) but I have more evidence now
i
> t
> > > was in fact b) that was causing massive slow-downs requiring a reboot
> > > because CPU seems to go unrecoverably to 100%.
> > > > The reason for more evidence, is that today, I finally had a "cannot
> > > allocate space error" being logged. I increased the size of the
> chessworld
> > > db, and the tempdb, and put back the auto-grow on the chessworld db.
> > Within
> > > about an hour or two, the symptoms of a big slow-down came back with
CPU
> > > 100%.
> > > > I rebooted the database server but have again taken off auto-grow
> options.
> > I
> > > believe for my site with many concurrent users, the auto-grow is
causing
> > > issues. I will keep you posted.
> > > Please do.
> > > Best wishes
> > > Tryfon
> > > > > > "Erland Sommarskog" <sommar@.algonet.se> wrote in message
> > > news:Xns946EED4BB70EFYazorman@.127.0.0.1...
> > > > Tryfon Gavriel (tryfon@.gtryfon.demon.co.uk) writes:
> > > > > (The first six are all event type 15 - which is "Disconnect" i
> > believe.
> > > > > They have massive duration times, and massive values for Reads.)
> > > > >...
> > > > > > > > I am not sure how to interpret these events. What does a massive
> > > > > duration on Event Type 15 mean?! Also there are a massive amount
of
> > > > > "Reads" associated with these.
> > > > > > As you said, event 15 is disconnection. Duration is just how long
the
> > > > connection was open. And Reads are just the accumulated number of
> > > > reads during that session.
> > > > > > In itself, not that exciting. Then again, maybe it is a clue that
four
> > > > long-running processes owned by sa quits just before the machines
> > > > reaches nirvana. No, please don't ask me what that clue would mean!
> > > > > > It is possible that the SQL statements you see when you sort on
> Duration
> > > > has anything to do with the CPU hog. However, I wouid not really
> expect
> > > > that process to show up. I would include the Starting events in the
> > trace,
> > > > and then investigate the uncompleted events at the end of the trace
> > > > when the CPU goes 100%.
> > > > > > > > --
> > > > Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
> > > > > > Books Online for SQL Server SP3 at
> > > > http://www.microsoft.com/sql/techin.../2000/books.asp
> >|||It seems time to change db :-))|||> * I have doubled the size of the tempdb database to 2 gig for data file and
> 1 gig for transaction log
Hi,
You might want to check the amount of free space, for the drives that
the TempDB and TLog are on.
Sunday, February 19, 2012
HELP
I am running SQL Server 7.0 sp4 on NT4.0 sp6a. I am
getting the following error. EVENT ID 17055.
"17066 :
SQL Server Assertion: File: <lckmgr.cpp>, line=3872
Failed Assertion = 'lockFound == TRUE'. "
Users of database are automatically disconnected for the
server.
Any hlep appreciatied.This could be a bug in sql server, try contact MS support.
>--Original Message--
>Hi Everybody,
>I am running SQL Server 7.0 sp4 on NT4.0 sp6a. I am
>getting the following error. EVENT ID 17055.
>"17066 :
>SQL Server Assertion: File: <lckmgr.cpp>, line=3872
>Failed Assertion = 'lockFound == TRUE'. "
> Users of database are automatically disconnected for the
>server.
>Any hlep appreciatied.
>
>.
>