Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Friday, March 30, 2012

Help How Make Backup and Restore ?

Hi all. I'm newbie user of sqlserver 7.

I need make Backup from specific tables of my database and my application send this file by mail to other users that restore this information in yours Database.

How i can do it (i dont know the specifics commands to backup and Restore)

Other question

if I only backup the log file and restores this in other database
I'll have the same information in all users ?

Help me please

Thanks in AdvanceCheck BOL on the syntax. You can place your specific tables on filegroups and have your users restore those filegroups after initial full db restore.|||Check BOL on the syntax. You can place your specific tables on filegroups and have your users restore those filegroups after initial full db restore.

Excuse me, but i don't understand what is BOL. ?

How i said i'm newbie.|||Books
On
Line|||Originally posted by rdjabarov
Books
On
Line

Thanks, I will Try.|||I connect like database admin and

try to make differential backup using this command

1- Back up Database Cyber to XXX With Differential

2- Back up Log Cyber to XXX

The to test the back up

I run then this restore command

1- Restore database Cyber from XXX with norecovery and

2- Restore Log Cyber from XXX with recovery.

All is perfect

I close the connection

When I try to connect to Cyber database the server send me this message

Server Msg 927, Level 14 State 2

Database Cyber Cannot Be opened. It is in the middle of restore ?

Why the database cannot be opened ?

Thank In advance

Franklin|||Are you trying to open it from Enterprise Manager? I suspect that if you right-mouse click on Databases folder and select Refresh, - you won't get this error.|||I'm trying to open from query analizer, because my application must be do it (the backup - restore) using transaq - sql.

thanks
franklin

Originally posted by rdjabarov
Are you trying to open it from Enterprise Manager? I suspect that if you right-mouse click on Databases folder and select Refresh, - you won't get this error.sql

Monday, March 26, 2012

Help finding group totals for year end

My SQLServer 2k database has the following tables:
Transaction
Customer
Employee
Every Transaction is assigned a customerId
Every Customer is assigned an employee id
All Transactions have a total
What I am trying to do is calculate the top 5 customers by total for each
employee
I have the following which gives me the top 5 customers, but how do I get
the top 5 for each employee?
WB
Syntax:
SELECT t.CustomerId, sum(t.total)
FROM tblTransaction t
WHERE Year(t.TransactionDate) = 2005
GROUP BY t.CustomerId
ORDER BY sum(t.total) DESCSELECT t.employeeid, sum(t.total)
FROM tblTransaction t INNER JOIN employee e
on t.customerid = e.customerid
WHERE Year(t.TransactionDate) = 2005
GROUP BY t.employeeid
ORDER BY sum(t.total) DESC
"WB" wrote:

> My SQLServer 2k database has the following tables:
> Transaction
> Customer
> Employee
> Every Transaction is assigned a customerId
> Every Customer is assigned an employee id
> All Transactions have a total
> What I am trying to do is calculate the top 5 customers by total for each
> employee
> I have the following which gives me the top 5 customers, but how do I get
> the top 5 for each employee?
>
> WB
> Syntax:
> SELECT t.CustomerId, sum(t.total)
> FROM tblTransaction t
> WHERE Year(t.TransactionDate) = 2005
> GROUP BY t.CustomerId
> ORDER BY sum(t.total) DESC
>
>|||Is there any uniqueness about the TransAction table like an IDENTITY
Column..? I've assumed there is :-
select * from tblTransAction t1 WHERE PK_TranID IN
(SELECT TOP 5 t2.PK_TranID
FROM tblTransAction as t2
WHERE t2.CustomerID = t1.CustomerID
GROUP BY t2.CustomerID, t2.TransactionID, t2.Total
ORDER BY SUM(t2.Total) DESC)
HTH. Ryan
"WB" <none> wrote in message news:eiqpObVFGHA.376@.TK2MSFTNGP12.phx.gbl...
> My SQLServer 2k database has the following tables:
> Transaction
> Customer
> Employee
> Every Transaction is assigned a customerId
> Every Customer is assigned an employee id
> All Transactions have a total
> What I am trying to do is calculate the top 5 customers by total for each
> employee
> I have the following which gives me the top 5 customers, but how do I get
> the top 5 for each employee?
>
> WB
> Syntax:
> SELECT t.CustomerId, sum(t.total)
> FROM tblTransaction t
> WHERE Year(t.TransactionDate) = 2005
> GROUP BY t.CustomerId
> ORDER BY sum(t.total) DESC
>
>

Friday, March 23, 2012

help exporting data to Oracle

hi,
i'm trying to export data from Sql Server to Oracle, when i try i get
a message saying that the values in a column are too large, in sql
server the column is of type ntext length 16, in Oracle its long, is
there something i can do? if i need to change Oracle's long to
something else, what should i make it blob?
Thanks.I am not an Oracle guy, but the name 'long' sounds like a numeric datatype,
not textual. I think BLOB will be more appropriate for large text data.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"soni29" <soni29@.hotmail.com> wrote in message
news:cad7a075.0402181427.31bcffc4@.posting.google.com...
hi,
i'm trying to export data from Sql Server to Oracle, when i try i get
a message saying that the values in a column are too large, in sql
server the column is of type ntext length 16, in Oracle its long, is
there something i can do? if i need to change Oracle's long to
something else, what should i make it blob?
Thanks.sql

Wednesday, March 21, 2012

HELP cannot start sqlserver.....

Help
We changed the Administrator Password, and now I cannot start Sqlserver on one of my systems.
And no password I try will apparently bring it back online
What can I do to reset password etc.What error are you getting? Is that the account used by the SQL Service? If
so, you'll have to update the password in the Services applet, for
MSSQLServer service.
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> Help
> We changed the Administrator Password, and now I cannot start Sqlserver on
one of my systems.
> And no password I try will apparently bring it back online
> What can I do to reset password etc.|||You could change the password through Enterprise manager under Security >>
Logins, right click the logins and go into Properties and change, for SQL
Logins.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Is this the sa password? Can you try logging on using a Windows NT account
taht has admin rights?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.sql

HELP cannot start sqlserver.....

Help
We changed the Administrator Password, and now I cannot start Sqlserver on one of my systems.
And no password I try will apparently bring it back online
What can I do to reset password etc.
What error are you getting? Is that the account used by the SQL Service? If
so, you'll have to update the password in the Services applet, for
MSSQLServer service.
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> Help
> We changed the Administrator Password, and now I cannot start Sqlserver on
one of my systems.
> And no password I try will apparently bring it back online
> What can I do to reset password etc.
|||The error I get is: Did not start due to logon failure.
Just where do I change the password?
regards
"Narayana Vyas Kondreddi" wrote:

> What error are you getting? Is that the account used by the SQL Service? If
> so, you'll have to update the password in the Services applet, for
> MSSQLServer service.
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
> news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> one of my systems.
>
>
|||OK that did the trick!!!!
thank you very much
I just love you 'MVP (SQL Server)'-guys
Wonderfull Job
thx
"Narayana Vyas Kondreddi" wrote:

> What error are you getting? Is that the account used by the SQL Service? If
> so, you'll have to update the password in the Services applet, for
> MSSQLServer service.
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
> news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> one of my systems.
>
>
|||You could change the password through Enterprise manager under Security >>
Logins, right click the logins and go into Properties and change, for SQL
Logins.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
|||Is this the sa password? Can you try logging on using a Windows NT account
taht has admin rights?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

HELP cannot start sqlserver.....

Help
We changed the Administrator Password, and now I cannot start Sqlserver on o
ne of my systems.
And no password I try will apparently bring it back online
What can I do to reset password etc.What error are you getting? Is that the account used by the SQL Service? If
so, you'll have to update the password in the Services applet, for
MSSQLServer service.
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> Help
> We changed the Administrator Password, and now I cannot start Sqlserver on
one of my systems.
> And no password I try will apparently bring it back online
> What can I do to reset password etc.|||The error I get is: Did not start due to logon failure.
Just where do I change the password?
regards
"Narayana Vyas Kondreddi" wrote:

> What error are you getting? Is that the account used by the SQL Service? I
f
> so, you'll have to update the password in the Services applet, for
> MSSQLServer service.
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
> news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> one of my systems.
>
>|||OK that did the trick!!!!
thank you very much
I just love you 'MVP (SQL Server)'-guys
Wonderfull Job
thx
"Narayana Vyas Kondreddi" wrote:

> What error are you getting? Is that the account used by the SQL Service? I
f
> so, you'll have to update the password in the Services applet, for
> MSSQLServer service.
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "sqlstopper" <sqlstopper@.discussions.microsoft.com> wrote in message
> news:756D0E5C-4E50-4098-8D26-9DD5ABF1490F@.microsoft.com...
> one of my systems.
>
>|||You could change the password through Enterprise manager under Security >>
Logins, right click the logins and go into Properties and change, for SQL
Logins.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.|||Is this the sa password? Can you try logging on using a Windows NT account
taht has admin rights?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Monday, March 19, 2012

HELP ....difficulty in insert of 2 tables data with id

Hello frdz,

I have two tables in sqlserver 2005.

I have created the stored procedure for insert,update data.I m creating my application in asp.net with C#


 
Table-1 CUSTOMER

Fields:

customerid int identity,
cardid int,
customername varchar(20) not null,
address varchar(20) not null,
city varchar(20) not null,
emailid varchar(20)

Table-2 CARD

Fields:

cardid int identity,
cardtype varchar(20) not null,
carddetails varchar(20) not null

INSERT INTO CUSTOMER (customername ,address,city,emailid)
VALUES (@.customername,@.address,@.city,@.emailid)
SELECT @.customerid = SCOPE_IDENTITY()

/* HELP HERE NOT ABLE TO GET DATA OF CARD */
SELECT @.cardid = cardid from CARD where customerid =@.cardid

 
 
Pls tell me how to insert the data ...
There is only one cardid for only one customerid both should be unique no duplication...
One customer can have only one and one card... 

If I understand your design correctly, you'll have to insert the CARD record first and get the new identity fieldcardid into a variable. Then you insert into CUSTOMER, using the variable to populate CUSTOMERS.cardid.

This is because cardid is a foreign key in the CUSTOMER table - so it has to be generated first. Just switch your order of inserts and you should be fine. And I advise that you put both insert statements within a transaction (BEGIN TRAN and COMMIT) - if one insert fails, then the other one shouldn't be left in the table.

If you need more on stored procedures, here's a link to a free chapter ondeveloping stored procedures for sql server.

|||

Your database to me seems odd, I would think that each customer could have many cards, while each card could only have 1 customer, but you seem to have it reversed. In any case, this is how you would insert:

DECLARE @.cardid int

INSERT INTO Card(cardtype,carddetails) VALUES (@.cardtype,@.carddetails)

SET @.cardid=SCOPE_IDENTITY()

INSERT INTO Customer(cardid,customername,address,city,emailid) VALUES (@.cardid,@.customername,@.address,@.city,@.emailid)

and optionally:

SELECT @.cardid,SCOPE_IDENTITY() to return both the generated cardid and customerid

|||

Thanxs everyone for the replies...

Motley...thanxs ... ya i want that 1 customer can have only 1 card.
and optionally:
SELECT @.cardid,SCOPE_IDENTITY() to return both the generated cardid and customerid

I have created stored procedur for card and customer.

I don't understand what is the above line and how it worksSELECT @.cardid,SCOPE_IDENTITY() ??

This should be written in which stored procedure ? I mean card or customer ?

Should a single stored procedure be created for this ?

Thanxs......waiting for reply

|||

That would return a resultset with 1 row and 2 columns. The first column would be the @.cardid variable that we set earlier in the code, and the second column would be SCOPE_IDENTITY(), which is a function that returns the value of the identity column for the row that was just inserted.

When I said optionally, I meant you could put at the end of the other code like this:

DECLARE @.cardid int

INSERT INTO Card(cardtype,carddetails) VALUES (@.cardtype,@.carddetails)

SET @.cardid=SCOPE_IDENTITY()

INSERT INTO Customer(cardid,customername,address,city,emailid) VALUES (@.cardid,@.customername,@.address,@.city,@.emailid)

SELECT @.cardid,SCOPE_IDENTITY()

|||

thanxs very much....

Monday, March 12, 2012

HELP ! Suddenly, terribly slow SQLServer Enterprise Manager

Hi,
I am using SQLServer on my development laptop, and it's running without
any problems since at least 6 or 7 months. Suddenly, since yesterday,
when I start the Entreprise Manager, it takes absolute AGES (minutes,
with a very intensive disk activity) until it shows the console root,
and each click on a table takes again ages until the rows are shown.
Even paging takes now 10 times longer as before. My DB is very snmall,
something like 50,000 rows in total max. A double click on the table
icon of the largest table (20,000 rows) takes 2 MINUTES to complete ! A
click on the "Run" icon in the tool bar takes more than 10 seconds to
complete, to show 40-50 rows !
I have reorganized the DB, but that does not help at all for the
performance.
I noticed that the log file is 76 Megabytes whereas the DB after
shrinking is only 8 Meg. I have done a backup of the log file, but it is
only a ridicule 196 KBytes, and the live log is just as big as before !
The very strange thing is that, if I log as another user on my laptop,
then I have the normal speed in Enterprise Manager. How is that possible ?
What's going on ? Why suddenly, where I can't remember having done
anything special these last days. And more importantly, how do I get
back to the previous status, where everything was real quick ? I just
can't work properly anymore if every single click is taking minutes !!!
Thanks for help.
Bernard
Sound like someone has turned on ODBC tracing.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:%230mAl35kFHA.1416@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am using SQLServer on my development laptop, and it's running without any problems since at
> least 6 or 7 months. Suddenly, since yesterday, when I start the Entreprise Manager, it takes
> absolute AGES (minutes, with a very intensive disk activity) until it shows the console root, and
> each click on a table takes again ages until the rows are shown. Even paging takes now 10 times
> longer as before. My DB is very snmall, something like 50,000 rows in total max. A double click on
> the table icon of the largest table (20,000 rows) takes 2 MINUTES to complete ! A click on the
> "Run" icon in the tool bar takes more than 10 seconds to complete, to show 40-50 rows !
> I have reorganized the DB, but that does not help at all for the performance.
> I noticed that the log file is 76 Megabytes whereas the DB after shrinking is only 8 Meg. I have
> done a backup of the log file, but it is only a ridicule 196 KBytes, and the live log is just as
> big as before !
> The very strange thing is that, if I log as another user on my laptop, then I have the normal
> speed in Enterprise Manager. How is that possible ?
> What's going on ? Why suddenly, where I can't remember having done anything special these last
> days. And more importantly, how do I get back to the previous status, where everything was real
> quick ? I just can't work properly anymore if every single click is taking minutes !!!
> Thanks for help.
> Bernard
|||THANK YOU ! I DID turn it on, and did not see any log at all coming up,
so I thought it had not worked and totally forgot about it !
Yes, now my Enterprise Manager is back to normal.
You made my day ! Sometimes, it's so simple...
Ah, what a relief it is...
And what about my <database>_Log.LDF file ? How do I get rid of/truncate
it ?
Regards, and thanks again.
Bernard
Tibor Karaszi wrote:
> Sound like someone has turned on ODBC tracing.
>
|||> And what about my <database>_Log.LDF file ? How do I get rid of/truncate it ?
The ldf file is a part of the database. You can't get rid of it. If you consider it being too large,
then you should read in Books Online about recovery model and decide whether or not you want to do
regular transaction log backups. If you have had the db in full recovery model and not been doing
regular transaction log backups and have a very large ldf file, you can shrink it using DBCC
SHRINKFILE. Also check out http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:OKNqi36kFHA.2472@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> THANK YOU ! I DID turn it on, and did not see any log at all coming up, so I thought it had not
> worked and totally forgot about it !
> Yes, now my Enterprise Manager is back to normal.
> You made my day ! Sometimes, it's so simple...
> Ah, what a relief it is...
> And what about my <database>_Log.LDF file ? How do I get rid of/truncate it ?
> Regards, and thanks again.
> Bernard
>
> Tibor Karaszi wrote:

HELP ! Suddenly, terribly slow SQLServer Enterprise Manager

Hi,
I am using SQLServer on my development laptop, and it's running without
any problems since at least 6 or 7 months. Suddenly, since yesterday,
when I start the Entreprise Manager, it takes absolute AGES (minutes,
with a very intensive disk activity) until it shows the console root,
and each click on a table takes again ages until the rows are shown.
Even paging takes now 10 times longer as before. My DB is very snmall,
something like 50,000 rows in total max. A double click on the table
icon of the largest table (20,000 rows) takes 2 MINUTES to complete ! A
click on the "Run" icon in the tool bar takes more than 10 seconds to
complete, to show 40-50 rows !
I have reorganized the DB, but that does not help at all for the
performance.
I noticed that the log file is 76 Megabytes whereas the DB after
shrinking is only 8 Meg. I have done a backup of the log file, but it is
only a ridicule 196 KBytes, and the live log is just as big as before !
The very strange thing is that, if I log as another user on my laptop,
then I have the normal speed in Enterprise Manager. How is that possible ?
What's going on ? Why suddenly, where I can't remember having done
anything special these last days. And more importantly, how do I get
back to the previous status, where everything was real quick ? I just
can't work properly anymore if every single click is taking minutes !!!
Thanks for help.
BernardSound like someone has turned on ODBC tracing.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:%230mAl35kFHA.1416@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am using SQLServer on my development laptop, and it's running without any problems since at
> least 6 or 7 months. Suddenly, since yesterday, when I start the Entreprise Manager, it takes
> absolute AGES (minutes, with a very intensive disk activity) until it shows the console root, and
> each click on a table takes again ages until the rows are shown. Even paging takes now 10 times
> longer as before. My DB is very snmall, something like 50,000 rows in total max. A double click on
> the table icon of the largest table (20,000 rows) takes 2 MINUTES to complete ! A click on the
> "Run" icon in the tool bar takes more than 10 seconds to complete, to show 40-50 rows !
> I have reorganized the DB, but that does not help at all for the performance.
> I noticed that the log file is 76 Megabytes whereas the DB after shrinking is only 8 Meg. I have
> done a backup of the log file, but it is only a ridicule 196 KBytes, and the live log is just as
> big as before !
> The very strange thing is that, if I log as another user on my laptop, then I have the normal
> speed in Enterprise Manager. How is that possible ?
> What's going on ? Why suddenly, where I can't remember having done anything special these last
> days. And more importantly, how do I get back to the previous status, where everything was real
> quick ? I just can't work properly anymore if every single click is taking minutes !!!
> Thanks for help.
> Bernard|||THANK YOU ! I DID turn it on, and did not see any log at all coming up,
so I thought it had not worked and totally forgot about it !
Yes, now my Enterprise Manager is back to normal.
You made my day ! Sometimes, it's so simple...
Ah, what a relief it is...
And what about my <database>_Log.LDF file ? How do I get rid of/truncate
it ?
Regards, and thanks again.
Bernard
Tibor Karaszi wrote:
> Sound like someone has turned on ODBC tracing.
>|||> And what about my <database>_Log.LDF file ? How do I get rid of/truncate it ?
The ldf file is a part of the database. You can't get rid of it. If you consider it being too large,
then you should read in Books Online about recovery model and decide whether or not you want to do
regular transaction log backups. If you have had the db in full recovery model and not been doing
regular transaction log backups and have a very large ldf file, you can shrink it using DBCC
SHRINKFILE. Also check out http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:OKNqi36kFHA.2472@.TK2MSFTNGP15.phx.gbl...
> THANK YOU ! I DID turn it on, and did not see any log at all coming up, so I thought it had not
> worked and totally forgot about it !
> Yes, now my Enterprise Manager is back to normal.
> You made my day ! Sometimes, it's so simple...
> Ah, what a relief it is...
> And what about my <database>_Log.LDF file ? How do I get rid of/truncate it ?
> Regards, and thanks again.
> Bernard
>
> Tibor Karaszi wrote:
>> Sound like someone has turned on ODBC tracing.

HELP ! Suddenly, terribly slow SQLServer Enterprise Manager

Hi,
I am using SQLServer on my development laptop, and it's running without
any problems since at least 6 or 7 months. Suddenly, since yesterday,
when I start the Entreprise Manager, it takes absolute AGES (minutes,
with a very intensive disk activity) until it shows the console root,
and each click on a table takes again ages until the rows are shown.
Even paging takes now 10 times longer as before. My DB is very snmall,
something like 50,000 rows in total max. A double click on the table
icon of the largest table (20,000 rows) takes 2 MINUTES to complete ! A
click on the "Run" icon in the tool bar takes more than 10 seconds to
complete, to show 40-50 rows !
I have reorganized the DB, but that does not help at all for the
performance.
I noticed that the log file is 76 Megabytes whereas the DB after
shrinking is only 8 Meg. I have done a backup of the log file, but it is
only a ridicule 196 KBytes, and the live log is just as big as before !
The very strange thing is that, if I log as another user on my laptop,
then I have the normal speed in Enterprise Manager. How is that possible ?
What's going on ? Why suddenly, where I can't remember having done
anything special these last days. And more importantly, how do I get
back to the previous status, where everything was real quick ? I just
can't work properly anymore if every single click is taking minutes !!!
Thanks for help.
BernardSound like someone has turned on ODBC tracing.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:%230mAl35kFHA.1416@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am using SQLServer on my development laptop, and it's running without an
y problems since at
> least 6 or 7 months. Suddenly, since yesterday, when I start the Entrepris
e Manager, it takes
> absolute AGES (minutes, with a very intensive disk activity) until it show
s the console root, and
> each click on a table takes again ages until the rows are shown. Even pagi
ng takes now 10 times
> longer as before. My DB is very snmall, something like 50,000 rows in tota
l max. A double click on
> the table icon of the largest table (20,000 rows) takes 2 MINUTES to compl
ete ! A click on the
> "Run" icon in the tool bar takes more than 10 seconds to complete, to show
40-50 rows !
> I have reorganized the DB, but that does not help at all for the performan
ce.
> I noticed that the log file is 76 Megabytes whereas the DB after shrinking
is only 8 Meg. I have
> done a backup of the log file, but it is only a ridicule 196 KBytes, and t
he live log is just as
> big as before !
> The very strange thing is that, if I log as another user on my laptop, the
n I have the normal
> speed in Enterprise Manager. How is that possible ?
> What's going on ? Why suddenly, where I can't remember having done anythin
g special these last
> days. And more importantly, how do I get back to the previous status, wher
e everything was real
> quick ? I just can't work properly anymore if every single click is taking
minutes !!!
> Thanks for help.
> Bernard|||THANK YOU ! I DID turn it on, and did not see any log at all coming up,
so I thought it had not worked and totally forgot about it !
Yes, now my Enterprise Manager is back to normal.
You made my day ! Sometimes, it's so simple...
Ah, what a relief it is...
And what about my <database>_Log.LDF file ? How do I get rid of/truncate
it ?
Regards, and thanks again.
Bernard
Tibor Karaszi wrote:
> Sound like someone has turned on ODBC tracing.
>|||> And what about my <database>_Log.LDF file ? How do I get rid of/truncate i
t ?
The ldf file is a part of the database. You can't get rid of it. If you cons
ider it being too large,
then you should read in Books Online about recovery model and decide whether
or not you want to do
regular transaction log backups. If you have had the db in full recovery mod
el and not been doing
regular transaction log backups and have a very large ldf file, you can shri
nk it using DBCC
SHRINKFILE. Also check out http://www.karaszi.com/SQLServer/in...ver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"bthouin" <bernard_thouin@.bluewin.com> wrote in message
news:OKNqi36kFHA.2472@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> THANK YOU ! I DID turn it on, and did not see any log at all coming up, so
I thought it had not
> worked and totally forgot about it !
> Yes, now my Enterprise Manager is back to normal.
> You made my day ! Sometimes, it's so simple...
> Ah, what a relief it is...
> And what about my <database>_Log.LDF file ? How do I get rid of/truncate i
t ?
> Regards, and thanks again.
> Bernard
>
> Tibor Karaszi wrote:

Friday, March 9, 2012

HELP - SQL Server Crash ? Memory leak ?

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: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.

Wednesday, March 7, 2012

Help - Schema provided by Microsoft NOT ONLINE anymore

Hi
we are currently using a schema referring to
http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservice
for System.Web.Services.Protocol.SoapDocumentMethodAtrribute an
referring to
http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/creat
for Subscription.RequestNamespace from Reference.cs whil
programmatically creating a subscription
However, when we check for either of these URLs, they are no
available on Microsoft's site anymore. Can anyone possibly provid
some information on how to get to these schema files? :?
Many thanks in advance
MichaeWe have the same problem for these references:
System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/Cancel"& _
"Job",
RequestNamespace:="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices",
ResponseNamespace:="http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
This is from the system provided:
Public Function CancelJob(ByVal JobID As String) As Boolean
We are having the same problem with the Web References for function
ListJobs()
Have you had any luck with this?
"mhamach" wrote:
> Hi,
> we are currently using a schema referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices
> for System.Web.Services.Protocol.SoapDocumentMethodAtrribute and
> referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/create
>
> for Subscription.RequestNamespace from Reference.cs while
> programmatically creating a subscription.
> However, when we check for either of these URLs, they are not
> available on Microsoft's site anymore. Can anyone possibly provide
> some information on how to get to these schema files? :?
> Many thanks in advance!
> Michael
>|||I'm also experiencing the same problem.
Has anybody found a sollution to this?
"mhamach" wrote:
> Hi,
> we are currently using a schema referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices
> for System.Web.Services.Protocol.SoapDocumentMethodAtrribute and
> referring to
> http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/create
>
> for Subscription.RequestNamespace from Reference.cs while
> programmatically creating a subscription.
> However, when we check for either of these URLs, they are not
> available on Microsoft's site anymore. Can anyone possibly provide
> some information on how to get to these schema files? :?
> Many thanks in advance!
> Michael
>|||Is there anything at http://schemas.microsoft.com/sqlserver/ that helps
you?|||I could'nt find anything at http://schemas.microsoft.com/sqlserver/.
Is there any other way of rendering reports, other than using Reporting
Service.vb
"timseal" wrote:
> Is there anything at http://schemas.microsoft.com/sqlserver/ that helps
> you?
>

Friday, February 24, 2012

Help - "Could not allocate space for object as the secondary group is full" error

Hello Peers,
We have a database in SqlServer 2K with a following settings:
Primary Group Size: 1024MB
Secondary Group Size: 1023 MB
Transaction Log size: 236 MB
File Growth: 10%
Recover Model: Simple
Auto Shrink: OFF
Recovery Model: Simple
We have a table "TestTable' that has 400,000 records. All the indexes
for the table is on the Secondary group.
The problem is, when we alter a size of the column and save the
changes in EnterPriseManager, we get the error "Could not allocate
space for object 'TestTable' in database 'TestDb' because the
'Secondary' filegroup is full." We get the same error when we use
"Alter Column" command in Query Analyzer as well(We have run "Dbcc
ShrinkFile" before running the alter table command).
Could anyone throw some light on altering the size of columns on a
table with 400000+records without any problems like the one above?
TIA for any help.
Regards
Pradeep.L
On May 11, 11:56 am, pradee...@.hotmail.com wrote:
> Hello Peers,
> We have a database in SqlServer 2K with a following settings:
> Primary Group Size: 1024MB
> Secondary Group Size: 1023 MB
> Transaction Log size: 236 MB
> File Growth: 10%
> Recover Model: Simple
> Auto Shrink: OFF
> Recovery Model: Simple
> We have a table "TestTable' that has 400,000 records. All the indexes
> for the table is on the Secondary group.
> The problem is, when we alter a size of the column and save the
> changes in EnterPriseManager, we get the error "Could not allocate
> space for object 'TestTable' in database 'TestDb' because the
> 'Secondary' filegroup is full." We get the same error when we use
> "Alter Column" command in Query Analyzer as well(We have run "Dbcc
> ShrinkFile" before running the alter table command).
> Could anyone throw some light on altering the size of columns on a
> table with 400000+records without any problems like the one above?
> TIA for any help.
> Regards
> Pradeep.L
Pradeep.L,
If you right click on your database in EM and select "Properties" and
"Data File tab" what do you see? Is the "restrict file growth" radio
button checked? Are you trying to make the db bigger than is allowed?
Or are you running out of disc space on the drive where this db/file
group is stored?
Kristina
|||Hello Kristina,
[vbcol=seagreen]
No. It is set to "Unrestricted File Growth" for Datafile and
Transaction log.
[vbcol=seagreen]
I'm not sure about this. The maximum db size that is permitted in our
machine is 2GB and it complains that the cumulative size should not
exceed 2048 MB due to the license policy.
[vbcol=seagreen]
group is stored?
There is 15GB free space in the partition in which sql server is
installed -
BTW, The purpose of trying out this issue is we need to increase the
size of quite a few columns in our production server.
Most of the columns are part of composite primary key/Index. We would
like to ensure that we don't land in sticky waters
when we go out with the change in our production server -
|||<pradeepln@.hotmail.com> wrote in message
news:1178942162.311166.101130@.e65g2000hsc.googlegr oups.com...
> Hello Kristina,
> No. It is set to "Unrestricted File Growth" for Datafile and
> Transaction log.
> I'm not sure about this. The maximum db size that is permitted in our
> machine is 2GB and it complains that the cumulative size should not
> exceed 2048 MB due to the license policy.
Ummm, 2048 MB IS 2GB.
Sounds like you've reached your max. Or I'm misunderstanding you.

> group is stored?
> There is 15GB free space in the partition in which sql server is
> installed -
> BTW, The purpose of trying out this issue is we need to increase the
> size of quite a few columns in our production server.
> Most of the columns are part of composite primary key/Index. We would
> like to ensure that we don't land in sticky waters
> when we go out with the change in our production server -
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html