MSSQL 2000 Memory Leaks
May 16, 2006
Hi,
I have one application in two different companies with MSSQL2000 running on Windows2000 Server and Windows2003 Server.
It seems that memory needed for MSSQL2000 as displayed in task manager is increased every day.
Does anybody knows anything regarding memory leaks in MSSQL2000?
How can I find what version of service pack have I installed in a MSSQL2000 server machine?
Regards,
Manolis
View 3 Replies
ADVERTISEMENT
Sep 24, 1998
Folks
I have gotten two 614 error messages over the past two weeks. I also have a known memory leak problem on my production server. After I have identified the data on the page, I have gone back to requery that page and have not had a problem. I am unable to run checkdb on the db, because it is to big, and I am 24x7. My question/assumption is, the data on this page gets loaded into cache, and because of the memory leaks I am getting glitches like this, has anybody out there, had this type of problem?
From BOL Error 614 is as follows:
Message Text
A row on page %Id was accessed that has an illegal length of %d in database `%.*s`.
Explanation
This error occurs when an attempt is made to access a row on a page and the actual length of the row is greater than expected. The error indicates that there is a structural problem on the database page accessed during a read or write operation, and it involves a specific row from that page.
This structural problem can occur as a result of the following:
·Hardware problem related to but not limited to the hard drive, controller, or the controller`s implementation of write caching
·A structural problem determined when loading a database dump; it may indicate a integrity problem with the database dump file
Thanks,
Doug Snyder
View 2 Replies
View Related
Oct 22, 2007
We have created a multithreaded application that reads result sets from MS SQL Server (both 2000 and 2005). The MS SQL Server app and our app reside on the same machine. We are using the latest version of ODBC32.DLL (3.526.1830.0) and SQLSRV32.DLL (2000.86.1830). Our application is written in C++ using the Visual C++ 6.0 compiler and libraries. Our app runs as a service, therefore the apparent memory leak is a real problem. Our app needs to run on a server in a closet without human intervention.
We are kicking off many user threads that each can read from the database tables. Each of the reads from the database occurs within a critical section to minimize the threads stepping on each other. The ODBC interface class follows all the steps defined in the ODBC application developers documention (see code below).
We see or app memory steadily increasing over time (we used PerfMon to monitor Private Bytes and Virtual Bytes, per ODBC documentation). If we terminate the threads which are retreiving the result sets, the memory drops back to the level noted prior to starting the threads.
The code below is admittedly inefficient, however, it should not leak memory when accessing the database. Note that it works very well, returns the result sets that we expect exactly.
SQLHENV henv = SQL_NULL_HENV;
SQLHDBC hdbc = SQL_NULL_HDBC;
SQLHSTMT hstmt1 = SQL_NULL_HSTMT;
SQLRETURN retCode;
SQLSMALLINT sColCount = 0;
CODBCInterfaceColumnList lColumnList;
CString strDSN;
CString strUID = _T("AccountName");
CString strPWD = _T("Password");
CString strServer;
CString strDatabase;
CString strDebugMsg;
if(!CreateDSN( pRecordList->m_strDefaultODBCConnect,
strDSN,
strDatabase,
strUID,
strPWD,
strServer))
{
strExceptionMsg.Format( _T("Cannot create DSN from connect string %s"),
pRecordList->m_strDefaultODBCConnect);
bReturn = true;
return bReturn;
}
if(pRecordList->m_strDefaultODBCConnect.IsEmpty())
{
bReturn = true;
return bReturn;
}
// Allocate the environment handle
retCode = SQLAllocHandle(SQL_HANDLE_ENV,NULL, &henv);
if(retCode != SQL_ERROR && retCode != SQL_INVALID_HANDLE)
{
// Set the environment to ODBC Version 3.0
retCode = SQLSetEnvAttr(henv,
SQL_ATTR_ODBC_VERSION,
(SQLPOINTER)SQL_OV_ODBC3,
SQL_IS_INTEGER);
if(retCode != SQL_SUCCESS)
{
GetErrorMsgs(hdbc, SQL_HANDLE_ENV, strDebugMsg);
}
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
// Allocate a ODBC connection handle handle
retCode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
retCode = SQLConnect( hdbc,
(UCHAR*)(LPCTSTR)strDSN,
SQL_NTS,
(UCHAR*)(LPCTSTR)strUID,
SQL_NTS,
(UCHAR*)(LPCTSTR)strPWD,
SQL_NTS);
if(retCode != SQL_SUCCESS)
{
GetErrorMsgs(hdbc, SQL_HANDLE_DBC, strDebugMsg);
OutputDebugString(strDebugMsg);
}
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
// Allocate a statement handle
retCode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt1);
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
// Fixup the select statement
retCode = SQLPrepare( hstmt1,
(UCHAR*)(LPCTSTR)pRecordList->m_strSelectStatement,
pRecordList->m_strSelectStatement.GetLength());
if(retCode == SQL_SUCCESS)
{
retCode = SQLExecute(hstmt1);
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
retCode = SQLNumResultCols(hstmt1,&sColCount);
if(retCode == SQL_SUCCESS || retCode == SQL_SUCCESS_WITH_INFO)
{
if(sColCount > 0)
{
if(lColumnList.DescribeColumns(hstmt1, strExceptionMsg))
{
if(lColumnList.BindColumns(hstmt1, strExceptionMsg))
{
int i = 0;
while((retCode = SQLFetch(hstmt1)) != SQL_NO_DATA)
{
if(retCode != SQL_SUCCESS)
{
GetErrorMsgs(hstmt1, SQL_HANDLE_STMT, strExceptionMsg);
break;
}
else
{
// Class to hold the result set.
CTableColumnList* pColList = new CTableColumnList();
lColumnList.PopulateColumnListObject(pColList);
pRecordList->AddColumnListRecord(pColList);
}
}
}
}
}
}
}
else
{
GetErrorMsgs(hstmt1, SQL_HANDLE_STMT, strExceptionMsg);
}
}
else
{
GetErrorMsgs(hstmt1, SQL_HANDLE_STMT, strExceptionMsg);
}
retCode = SQLFreeHandle(SQL_HANDLE_STMT, hstmt1);
}
else
{
GetErrorMsgs(hstmt1, SQL_HANDLE_STMT, strExceptionMsg);
}
retCode = SQLDisconnect(hdbc);
}
else
{
GetErrorMsgs(hstmt1, SQL_HANDLE_STMT, strExceptionMsg);
}
}
retCode = SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
}
}
retCode = SQLFreeHandle(SQL_HANDLE_ENV, henv);
We are at our wits end, not sure what to do next. Any help in sorting this out will be very, VERY much appreciated.
View 3 Replies
View Related
Oct 5, 2005
Greetings all!
On one of our intranet SQL servers running under Windows 2000 SP 3,
MSsql 2000 SP4 seems to gradually "eat" away all available memory (with no obvious reason for it) until a certain limit is reached, forcing the server to slow down substantially since the OS has to SWAP continuously.
I would appreciate any suggestions at this point on how to tackle this problem :)
Thank you!
VincentJS
View 2 Replies
View Related
Sep 6, 2006
Does enabling/disabling Data Execution Prevention have a performanceimpact on SQL 2000 or SQL 2005?For SQL best performance - how should I configure for:Processor Scheduling:Programs or Background servicesMemory Usage:Programs or System Cache
View 9 Replies
View Related
Mar 24, 2008
Hi,
I am a bit new to the MSSQL server. In our application, we use so many SQL queries. To imporve the performance, we used the Database enigine Tuning tool to create the indexes. The older version of the application supports MSSQL 2000 also. To re-create these new indexes, I have an issue in running these "CREATE INDEX" commands as the statements generated for index creation are done in MSSQL 2005. The statements include "INCLUDES" keyword which is supported in MSSQL 2005 but not in MSSQL 2000.
Ex:-
CREATE INDEX IND_001_PPM_PA ON PPM_PROCESS_ACTIVITY
(ACTIVITY_NAME ASC, PROCESS_NAME ASC, START_TIME ASC, ISMONITORED ASC)
INCLUDE
(INSTANCE_ID, ACTIVITY_TYPE, STATUS, END_TIME, ORGANIZATION);
Any help in creating such indexes in 2000 version is welcome.
Thanks,
Suresh.
View 2 Replies
View Related
May 3, 2008
Hello
We are using SQL 2005 and now we are planning to use SQL 2000. what are the ways to do the process.
We taken the script spcificall for 2000 and run it in SQL 200. But we are getting the error in SCRIPT?
Could you please give me the step to do?
Thanks,
Sankar R
View 6 Replies
View Related
Aug 22, 2007
sql server 2000 is running on windows server 2003 ... 4gb of memory on server .... 2003 was allocated 2.3gb nd sql server was allocated (and using all of it) 1.6gb for total of approx 4gb based on idera monitor software ... all memory allocated betweeen the OS and sql server .... then 4 more gb of memory added for total now of 8g ... now idera monitor shows 1.7gb for OS and 1.0 gb for sql server ..... 'system' info shows 8gb memory with PAE ... so I assume that the full 8gb can now be addressed .... why are less resources being used now with more total memory .... especially sql server ..... i thought about specifying a minimum memmry for sql server but i amnot convinced that would even work since it seems that this 1gb limit is artificial .... it it used 1.6 gb before why would it not use at least that much now ??
thank you
View 4 Replies
View Related
Jun 15, 2006
Ben writes "I have a sql script that doesn't function very well when it's executed on a SQL 2000 server.
The scrpt looks like this:
---------------------------------------------------------------------------------------------------
USE [master]
GO
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
EXEC sp_addlogin N'SSDBUSERNAME', N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
If EXISTS (Select * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
ALTER LOGIN [SSDBUSERNAME] WITH PASSWORD=N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
IF EXISTS (select * from dbo.sysdatabases where name = 'ISIZ')
DROP DATABASE [ISIZ]
GO
USE [SurveyData]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
GO
USE [SurveyManagement]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
---------------------------------------------------------------
I need to be converted to a script that can be executed on both MSSQL 2000 and MSSQL 2005.
I was wondering if somebody there could help me with this problem?!
Thanks,
Ben"
View 1 Replies
View Related
Nov 17, 2007
I've been tasked to move our production databases on MSSQL 2000 to 2005. I've supported MSSQL since version 6.5 and performed migrations to successor versions.
Current Environment is MSSQL 2000 32-bit with current Service Packs.
I've performed mock migrations on Test servers upgrading all Production instances simultaneously from MSSQL 2000 to 2005 32-bit. The Test environment is identical to Production minus server name, IP etc. Also I have a separate server with MSSQL 2005 installed where I use the DETACH / ATTACH and BACKUP / RESTORE method for migration / acceptance testing. There are approximately 30 databases totaling 70 GB. This has gone as expected and fairly successful. Vendors have been coordinated with to update code and staff for acceptance testing.
I'd prefer going directly to MSSQL 2005 64-bit instead if possible due to memory benefits etc. This is where I'd like some feedback prior to borrowing a 64-bit server for testing.
Upgrade options:
1. Is it better to migrate from MSSQL 2000 32-bit to 2005 64-bit via:
a. DETACH / ATTACH
b. BACKUP / RESTORE
c. Is one method more advantageous relating to the end result?
2. Regarding XP clients, have issues been experienced with the default SQL Server driver or is an alternate recommended for XP clients to connect to a MSSQL 64-bit server databases?
3. If you have performed this migration and have relevant experience please pass them along.
View 3 Replies
View Related
Sep 24, 2004
Recently here at work we have been having a lot of our web applications time out after a couple minutes. Really doing just basic things like counting the number of records in the database, etc.
I went on to the machine itself (win2k) and looked at what MSSQL server was doing in the process list... and it was taking up a mind boggling 851 megabytes of memory. Out of a gig of RAM on that machine there was only 13mb available.
We restarted it last night and when I checked it today it has already grown back up to 460mb.
Is this normal?? I've never heard of applications taking up this much ram... especially since its not like anyone, or anything, is pulling down 850mb every second from the database.
Is there some kind of known memory leak in MSSQL server (8.00.760 SP3)? Or is there some other reason our web apps are now timing out, when previously they never did ...
View 1 Replies
View Related
Mar 3, 2006
Here is our problem...We are doing a lot of selects against a table that has one large fieldin it.If we do a select against all the fields except for description, thequery comes back relatively quickly. If we add that last field (768chars) to the query, our query takes 10x longer (5 seconds vs 56seconds.)When we run the one without the description column, we can watchperfmon and see a very quick spike to physical disk. If we add in thedescription field we can see that the server becomes I/O bound - thedisk sits at 100% until the query is complete.We have tweaked the min query memory setting for the server but itseems to have had no effect no matter how high we set it. Is theresome point at which MSSQL decides it cannot perform the transaction inmemory? What would I increase to cure this problem?For example:TMZDIFF int410WRITETIMEcharno 16System_Namecharno 64Timestampcharno16Name charno32Mount_Pointcharno32Size intno4 10Space_Usedintno410Space_Availableintno410Inode_Sizeintno410Inodes_Usedintno410Inodes_Freeintno410Space_Used_Percentintno410Inodes_Used_Percentintno410FS_Type charno8Space_Available_Percentintno410Name_U ncharno32Descriptionncharno768
View 2 Replies
View Related
Sep 12, 2007
Howdy folks!
I'm trying the VS2005 addon Deleaker for the first time, and noticed I got about 40 "heap" memory leaks after the following m_pICmdText->Execute() call. Both m_pICmdText and m_pICmdPrepare are released before exiting the program. What else could cause these leaks? I've narrowed it down to only occuring if the execute statment is called. m_ulNumExecutions is 1 and a_pwszQuery is a CREATE TABLE statement:
// Set command sql query
hr = m_pICmdText->SetCommandText(DBGUID_SQL, a_pwszQuery);
CHKHR(hr, L"Failed to set command text", _ExitExeSql);
// Prepare command text for execution
hr = m_pICmdPrepare->Prepare(a_ulNumExecutions);
CHKHR(hr, L"Failed to prepare command text - Invalid Query", _ExitExeSql);
for(ULONG i=0;i<a_ulNumExecutions;i++)
{
//Execute query and place results in m_pIRowset
hr = m_pICmdText->Execute(NULL, IID_IRowset, NULL, NULL, (IUnknown **) &m_pIRowset);
CHKHR(hr, L"Failed to execute SQL", _ExitExeSql);
}
Thanks!
Jeff
View 4 Replies
View Related
Jan 15, 2004
I, just like others, am experiencing problems with data leaks. I was wondering if anyone knows of a tool out there that can help pinpoint the pages with problems? I basically want to find the culprits!
Thanks,
--
Yonah
View 2 Replies
View Related
Jan 18, 2008
How to convert a database in MSSQL 2000 to MSSQL 2005 database.Is there any tool or documentation available for this?
View 3 Replies
View Related
Feb 28, 2004
Hi,
How does one install MSSQL 2000 on a machine that's already running MSDE 2000? Do i need to unintstall MSDE, or both can be installed seperately??
Is there a way to simply upgrade MSDE into MSSQL 2000?
Thanks!
View 1 Replies
View Related
Oct 22, 2007
helo guys,
can someone send me the script/procedure in performing bcp on ms sql 2000? pls help me, i badly need it.. thank u so much!:)
View 5 Replies
View Related
Mar 25, 2007
HelloI watchet some posts but did not find answer to my question : how toimport data from xml into mssql 2000 using t-sql?i tried:USE Northwindif(object_id('dbo.test_xml') is not null)drop table dbo.test_xmlgocreate table dbo.test_xml (Id int identity(1,1), col1 text)goinsert into test_xml(col1) values('')godeclare @cmd varchar(512)set @cmd = 'D:Progra~1Micros~3MSSQLBinnTextCopy.exe /S /U[user] /P [password] /D Northwind /F c:pobierz.xml /Ttest_xml /C col1 /I /W "where Id = 1"'exec master..xp_cmdshell @cmd, 'no_output'godeclare@hdoc int, @doc varchar(1000)select @doc = col1 from dbo.test_xmlexec sp_xml_preparedocument @hdoc out, @docselect @hdoc as hdoc-- ...select * from openxml(@hdoc, ...--...exec sp_xml_removedocument @hdocBut my documet have more than 1000characters and more than max varchar. Sohow to do that?Best regardsAJA
View 4 Replies
View Related
Apr 20, 2007
MSSQL 2000 Replication between two servers on a workgroup
Is it possible? How do you set it up?
View 4 Replies
View Related
May 30, 2007
I am using Visual Studio 2005 and MSSql-2005 Server. But i also want to add MSSql-2000 Server Database.
Both the servers are running but when i provide the connection string of MSSql-2000 in SqlConnection to access data base, i get an error. It says like MSSql-2005 is not allowing to access.
So, How can i add MSSql-2000 to Visual Studio-2005???
View 1 Replies
View Related
Oct 3, 2007
Does anyone know how or where to adjust Ram Memory usage for SQL 2000.
I've just added Changed the 512 MB Ram that came with the Server and Exchanged it with 4 GIG Ram . Is it a good Idea to allow only 2GiG for SQL . I 've heard that SQL will take/use all Ram that you install if you let. If this is true
Can anyone advise on how/where to make adjustments. Thank You...
View 2 Replies
View Related
Apr 16, 2003
I am looking for recommandations regarding the memory distribution for SQL 2000 server. In the memory tab of the server properties you can define use a fixed memory size or dynamically configure SQL server or even reserve physical memory for SQL server.
Are there any hints available or must it be handled according trial and error?
Thanks for any info
mipo
View 2 Replies
View Related
Aug 16, 2004
Running sqlserver 2000 on a w2k server with 1gb of memory. After a reboot the memory usage is around 500m but quickly climbs. At 1 point it was up to 1.5gb so it must have been swapping. Are there any good docs about this or any recommendations on how to limit sqlserver from using all the memory. It is the only application on the server so it isn't affecting anything else so maybe it isn't a problem. I just wanted to get people's inpit on this.
View 2 Replies
View Related
May 3, 2004
We have a SQL server that has a failover cluster on our network. We are looking to updrade the memory by adding a couple gigs of ram.
We don't need to upgrade the failover cluster to have the exact amount of memory as the primary do we?
DotNetJunkie
View 3 Replies
View Related
Sep 13, 2007
I would like to ask regarding the memory allocation fo SQL Server 2000. For example if my Data Server have 8GB physical memory installed how much memory can SQL Server 2000 utilize? Based on my research and understing SQL 2000 Server can only utilize 3GB memory? But using the AWE you can set the memory to a maximum server memory?
View 8 Replies
View Related
May 17, 2007
I recently changed the max. memory option in SQL from 24 GB to 30GB but the perfmon counters still only show 24 GB. Any ideas on why it is not recognizing the change? The server has Win 2003 EE and 32 GB of RAM.
View 5 Replies
View Related
Feb 12, 2007
I have SQL Server 2000 STD installed on a Windows Server 2003 STD machine. It's essentially the only app on this box. I have 4GB of RAM installed. SQL is configured to dynamically allocate memory. I run a batch file daily to restart the SQL services as SQL does not seem to release memory once it's got it. I don't think this is a problem because, like I said, it's basically the only app. But I want to make sure my OS memory settings and SQL's memory settings are optimized. Will adding the /3gb switch to the boot.ini file make a difference? Also, can someone educate me a little on PAE and AWE?
Thanks
View 1 Replies
View Related
Feb 8, 2007
Hi,I have app with file selection field. Users can shoose xml file from their local hard disk and click Save. When they click save, content of xml file should be inserted into mssql 2000.What is the most efficient way to do this using C#2005 and mssql2000?Any good article or tutorial?
View 2 Replies
View Related
Feb 26, 2008
:confused:
I have a single table "amount" which has only three columns such as memberid referenceid and AMOUNT with following data ........
memberid referenceid AMOUNT
L001 L001
L004 L003
L003 L002
L002 L001
and so on
my needed query willbe if i choose L003 from referenceid the query should select the column where it was a memberid and again it choose the same row refernceid of(L003) as L002 where L002 was a memberid and choose L002s referenceid which is L001
Finally i should REACH the memberid(L001) and
the other one i need is i should return the count of no of rows crossed ,
and my biq question is everytime the query gets into new row i should add some data in amount (50,25,12.5,10,7.5,5,4,3,2,1)for (immediate row,next row,next row and so on)
how can i do this in MSSQL2000??
I have crossed accross many forums pls help im stuck up
:(
View 3 Replies
View Related
Mar 25, 2004
Hi,
I am now trying to configure Log Shipping in my compeny but I have encountered some difficulties. The destination site and the source site are far from each other and the transaction logs are too big, this situation causes an huge overload on our private network (we use WAN which is complitly disconnected from the internet). Is there any way to compress the transacion logs with zip or rar and combine it in the log shipping mechanizem?
Is there another way for making this files smaller?
I would be greatful for any ideas in this matter.
Thanks in advance,
Zvi Gilinsky
View 3 Replies
View Related
Jul 28, 2007
Dear Community,
I have recently downloaded the MSSQL 2000 Evaluation package from microsoft website,but i can't get it to install.I run the autorun normally,but when i select the option install database server nothing happens.I am trying to install it on Windows XP Service Pack 2 Edition 5.1....As this would help,in 3-4 hours of computer inactivity,i see the setup loader but nothing happens,it says not responding.
Thanks in advance,
Dimitris.
View 1 Replies
View Related
Aug 23, 2007
Every day or two I have to restart my SQL Server because users are receiving timeouts and very slow page loads. My mem usage in Task Manager show that SQL Server is at 1,200,000k compared to 400,000k when I restart it. Performance Monitor also shows that Buffer Manager/Target Pages and Total pages are maxed out. Any advice? Thanks!
View 1 Replies
View Related
Sep 14, 2005
Hello!
We have a SQL Server 2000 that has been working nice
without any issues. Lately we noticed the fact that the amount of memory that
it is using has increased and once it took down the web server as the total
amount of memory used was 2G. Due to this fact I have set Memory Max to 500MB.
Now as I look in Task Manager the Memory usage is at 530396k which is 518MB.
Any reason why would it exceed the 500MB?
What we did before was to stop the SQL Server and restart it, and it takes about
2 days until it gets back to +500MB.
What can I do to stop this behavior?
Thanks.
View 3 Replies
View Related