Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Commands in DSO eats up memory

Status
Not open for further replies.

pint

Programmer
Aug 15, 2002
1
DE
I'm adding a bunch of calculated members to a cube using DSO in Visual Basic. It has a very seriuos memory leak, and I couldn't figure out, why. The memory leak affects the real memory usage as well, but the more serious problem is that it eats very much virtual memory, so much that the paging file grows to the size of the available maximum, and the system is slowed down, and the program fails.

the routine is something like this:

Do Until Recs.EOF
MeasureName = Recs.Fields(0).Value
MDXStatement = Recs.Fields(1).Value
SolveOrder = Recs.Fields(4).Value
FormatStr = Recs.Fields(2).Value
Parent = Recs.Fields(3).Value
VisibleFlag = Recs.Fields(5).Value

Set Command = Cube.Commands.AddNew(MeasureName)
Command.CommandType = cmdCreateMember
Command.Name = MeasureName
Command.Statement = _
"CREATE MEMBER CURRENTCUBE." + Parent + ".[" + MeasureName + "] AS '" + _
MDXStatement + "', SOLVE_ORDER=" + Str(SolveOrder) + ", FORMAT_STRING='" + _
FormatStr + "', VISIBLE=" + VisibleFlag
Set Command = Nothing // test
Recs.MoveNext
Loop
Recs.Close
Set Recs = Nothing // test
Cube.Update
Set Cube = Nothing // test

the lines marked with "//test" are inserted later to try if they help, but they doesn't.

what can be the reason of this memory leak? how to work around it?

many thanks in advance
Krisztian Pinter
 
Have you looked at the hotfix for this:

Hotfix build 8.00.0601 ftp://ftp.microsoft.com/bussys/sql/transfer/sql80/olap/s80601i.exe

Password: 8.00.0601

Please follow the setup instructions in readme.txt
Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top