Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-09-08 : 09:01:15
|
| Matt writes "-- sqlservr.exe Mem Usage creep each time code such as following polls a table using ODBC timestamp escape clause. ????? // during init open the DB //CDatabase m_DB; //m_DB.Open("SOME DB", FALSE, FALSE, "ODBC;", TRUE); // Run following code once per second and watch // what happens to sqlservr.exe CTime ctNOW(time(NULL)); CString sTime = ctNOW.FormatGmt("%Y-%m-%d %H:%M:%S"); CString sqlcmd; sqlcmd.Format("select SomeTable.Some_col from SomeTable WHERE SomeTable.Date_time >= {ts '%s'}", sTime); CRecordset rs(&m_DB); rs.Open(CRecordset::forwardOnly, sqlcmd); rs.Close();" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-09-08 : 13:48:39
|
| SQL Server is designed to consume a lot of memory. The fact that it doesn't release it does not mean that there is a memory leak. That's just how it was designed. SQL Server will not release the memory unless it doesn't need it anymore AND another process is asking for it.Tara |
 |
|
|
|
|
|