Showing posts with label behavior. Show all posts
Showing posts with label behavior. Show all posts

Monday, March 19, 2012

Bug regarding identity columns?

I'm seeing some weird behavior regarding identity columns in MSSQL 2000.

In a specific client database we have this table:

ID Name SecLevDG Flags
-- -- -- --
1029528 xxx 0 0
1029529 xxx 0 0
1049676 xxx 0 0

While upgrading this database to a later version of our product, some schema changes are necessary. For this particular table, the changes are

alter table Authority drop constraint apkAuthorityId
alter table Authority drop column SecLevDg
alter table Authority add new_id integer identity

This code has worked perfectly for years, and even in this particular database, there are no error messages. However, the result isn't quite the expected:

ID Name Flags new_id
-- - -- --
1029528 xxx 0 16777220
1029529 xxx 0 16777220
1049676 xxx 0 16777220

Notice that the new column did NOT get unique values 1, 2, 3, etc... In other tests I manage to get different values, but still not the expected ones. Is this a bug in MSSQL 2000?

DBCC CHECKIDENT returns:
Checking identity information: current identity value '1', current column value '1'.

DBCC CHECKDB returns no errors before running the above statement. Afterwards it returns this (only relevant messages included):
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:277), row ID 0. Column 'new_id' was created NOT NULL, but is NULL in the row.
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:277), row ID 1. Column 'new_id' was created NOT NULL, but is NULL in the row.
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:1145), row ID 0. Column 'new_id' was created NOT NULL, but is NULL in the row.
[...]
CHECKDB found 0 allocation errors and 3 consistency errors in table 'Authority' (object ID 293576084).

Regards,
Oskar Berggren

WHen I'm creating a new identity column, I use this:

columnName int IDENTITY (1,1)

Perhaps it is balking because you aren't providing a seed value?

Or, if there are consistency errors, there's an issue with the table itself...

|||Also, although I can not find it now, I seem to remember reading that 2005 likes things to be specifically defined as NULL or NOT NULL.|||

I encountered an issue like this in SQL Server 2005 RTM (I think SP1 fixed it). I was able to work around it by setting Max Degree of Parallelism (MAXDOP) to 1 for the transaction and then back to 0 afterwards.

My theory on this is that multiple processors are working to set the identity and the processors somehow end up with the same value. By having it done with a single processor it might run a bit slower but it resolved the issue for me.

I've never seen this issue in 2000, though. I assume you have the latest service packs?

Regards,

Jared

Bug regarding identity columns?

I'm seeing some weird behavior regarding identity columns in MSSQL 2000.

In a specific client database we have this table:

ID Name SecLevDG Flags
-- -- -- --
1029528 xxx 0 0
1029529 xxx 0 0
1049676 xxx 0 0

While upgrading this database to a later version of our product, some schema changes are necessary. For this particular table, the changes are

alter table Authority drop constraint apkAuthorityId
alter table Authority drop column SecLevDg
alter table Authority add new_id integer identity

This code has worked perfectly for years, and even in this particular database, there are no error messages. However, the result isn't quite the expected:

ID Name Flags new_id
-- - -- --
1029528 xxx 0 16777220
1029529 xxx 0 16777220
1049676 xxx 0 16777220

Notice that the new column did NOT get unique values 1, 2, 3, etc... In other tests I manage to get different values, but still not the expected ones. Is this a bug in MSSQL 2000?

DBCC CHECKIDENT returns:
Checking identity information: current identity value '1', current column value '1'.

DBCC CHECKDB returns no errors before running the above statement. Afterwards it returns this (only relevant messages included):
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:277), row ID 0. Column 'new_id' was created NOT NULL, but is NULL in the row.
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:277), row ID 1. Column 'new_id' was created NOT NULL, but is NULL in the row.
Server: Msg 8970, Level 16, State 1, Line 1
Row error: Object ID 293576084, index ID 0, page ID (1:1145), row ID 0. Column 'new_id' was created NOT NULL, but is NULL in the row.
[...]
CHECKDB found 0 allocation errors and 3 consistency errors in table 'Authority' (object ID 293576084).

Regards,
Oskar Berggren

WHen I'm creating a new identity column, I use this:

columnName int IDENTITY (1,1)

Perhaps it is balking because you aren't providing a seed value?

Or, if there are consistency errors, there's an issue with the table itself...

|||Also, although I can not find it now, I seem to remember reading that 2005 likes things to be specifically defined as NULL or NOT NULL.|||

I encountered an issue like this in SQL Server 2005 RTM (I think SP1 fixed it). I was able to work around it by setting Max Degree of Parallelism (MAXDOP) to 1 for the transaction and then back to 0 afterwards.

My theory on this is that multiple processors are working to set the identity and the processors somehow end up with the same value. By having it done with a single processor it might run a bit slower but it resolved the issue for me.

I've never seen this issue in 2000, though. I assume you have the latest service packs?

Regards,

Jared

Sunday, March 11, 2012

bug in string processing if the GO keyword is inside the string

I encoutered a strange behavior using the exec command and I could repreduce
the behavior with the print command:
the command:
print '1
2
3'
is doing it's jub, but if i add go inside the string I get the floowing
error:
print '1
2
go
3'
Server: Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark before the character string '1
2
'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '1
2
'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '3'.
Server: Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark before the character string '
'.
can someone explain that or point me to a fix I'm using SQL 2000 SP4 on
windows 2003 server with service pack 1
this problem also occurs is the string is sent as a parameter to a stored
procedure using the exec command.
please helpMartin,
This is not a bug. Go is a command that tells SQL Server that this is the
end of a batch of T-SQL statements. If you execute some code in Query
Analyzer and one line has the go word alone, SQL Server will take this as th
e
Go command. For example, try this
print '1
2
go 3
4'
Anyway, I would avoid the go word at the beginning of a line, if possible.
Ben Nevarez, MCDBA, OCP
Database Administrator
"martin" wrote:

> I encoutered a strange behavior using the exec command and I could repredu
ce
> the behavior with the print command:
> the command:
> print '1
> 2
> 3'
> is doing it's jub, but if i add go inside the string I get the floowing
> error:
> print '1
> 2
> go
> 3'
> Server: Msg 105, Level 15, State 1, Line 1
> Unclosed quotation mark before the character string '1
> 2
> '.
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near '1
> 2
> '.
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near '3'.
> Server: Msg 105, Level 15, State 1, Line 1
> Unclosed quotation mark before the character string '
> '.
>
> can someone explain that or point me to a fix I'm using SQL 2000 SP4 on
> windows 2003 server with service pack 1
> this problem also occurs is the string is sent as a parameter to a stored
> procedure using the exec command.
> please help
>
>|||well, ben,
of course it's a bug
if I get a string as input from a user of a web application, and encode the
string as required like replacing a single apostrophe ' with 2 '' in order
to not break the SQL syntax the same goes with the GO keyword or other
keyword like SELECT.
what exactly should I do in order to pass this kind of a parameter to a
stored procedure? encode it with some way to it's numric ascii
representation?
just image that I will ask you to avoid the END keyword in the beggining of
a sentence in your reply to me, would that not be considered as a bug?
not all string passes as a parameter to a stored procedure are in my control
at all. most of them are not.
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:968CB5C7-A808-4767-BAAC-C2F59114E390@.microsoft.com...
> Martin,
> This is not a bug. Go is a command that tells SQL Server that this is the
> end of a batch of T-SQL statements. If you execute some code in Query
> Analyzer and one line has the go word alone, SQL Server will take this as
> the
> Go command. For example, try this
> print '1
> 2
> go 3
> 4'
> Anyway, I would avoid the go word at the beginning of a line, if possible.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "martin" wrote:
>|||martin wrote:
> well, ben,
> of course it's a bug
> if I get a string as input from a user of a web application, and encode th
e
> string as required like replacing a single apostrophe ' with 2 '' in order
> to not break the SQL syntax the same goes with the GO keyword or other
> keyword like SELECT.
>
If you accept string input in that manner and use it for dynamic SQL
then your web application is buggy, dangerous and insecure. This
problem is called SQL Injection and is one important reason why you
should never create dynamic strings out of unverified,
non-parameterized user input. The proper and safe way to do it is to
use parameters in your client code (the ADO parameters collection if
you are using ADO for example).
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||martin
> what exactly should I do in order to pass this kind of a parameter to a
> stored procedure? encode it with some way to it's numric ascii
> representation?
It is not a bug, please post exactly what are you doing in order to help
you?
"martin" <news.microsoft.com> wrote in message
news:eAcI3PCbGHA.3812@.TK2MSFTNGP04.phx.gbl...
> well, ben,
> of course it's a bug
> if I get a string as input from a user of a web application, and encode
> the string as required like replacing a single apostrophe ' with 2 '' in
> order to not break the SQL syntax the same goes with the GO keyword or
> other keyword like SELECT.
> what exactly should I do in order to pass this kind of a parameter to a
> stored procedure? encode it with some way to it's numric ascii
> representation?
> just image that I will ask you to avoid the END keyword in the beggining
> of a sentence in your reply to me, would that not be considered as a bug?
> not all string passes as a parameter to a stored procedure are in my
> control at all. most of them are not.
>
>
>
>
>
> "Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
> news:968CB5C7-A808-4767-BAAC-C2F59114E390@.microsoft.com...
>|||well,
so please explain that:
my app does uses ADO.NET and ado.net succeedes to execute SQL statements
that fails to execute in query analyzer.
is there some magic here?
after executing stored procedure with command object, adding a string
parameter
in the profiler I see the following SQL statement executed from ADO.NET:
declare @.P1 int
set @.P1=33
exec sp_insert_string '748F4655-9106-4D45-A0A2-1AA95C4C8912', 2, N'test',
N'--test
go
-- test
', N'asd', N'James', NULL, @.P1 output
select @.P1
the same stored procedure fails to execute from query analyzer.
I thought the answer will be in some changes to the default behavior of
ADO.NET so I also executed the line performed by ADO.NET to set default
execution variables, with no help:
-- network protocol: TCP/IP
set quoted_identifier on
set implicit_transactions off
set cursor_close_on_commit off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set language us_english
set dateformat mdy
set datefirst 7
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1146383014.820122.76100@.j33g2000cwa.googlegroups.com...
> martin wrote:
> If you accept string input in that manner and use it for dynamic SQL
> then your web application is buggy, dangerous and insecure. This
> problem is called SQL Injection and is one important reason why you
> should never create dynamic strings out of unverified,
> non-parameterized user input. The proper and safe way to do it is to
> use parameters in your client code (the ADO parameters collection if
> you are using ADO for example).
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --
>|||I've just checked this out on SSMS the SQL 2005 replacement for Query
Analyser.
The problem has been fixed as the print command works perfectly.
The are problems with the Query Analyser SQL interpreter. In a nutshell,
avoid placing Go on it's own at the begginning of the line.
You could change your calling code to do something like
Print '1
2
' + 'Go
3
4'
It's a bodge I know, but it should work ok.
To "Fix" the problem you should upgrade to SQL2005, as I doubt that there
will be another SP for SQL2000.
As mentioned by one of the other posters, you need to make sure that you are
not suseptable to a SQL Injection attack.
OK, you might say that all user input must go through your front end, and
that's 100% secure. But consider the what if scenario.
The simplest way to avoid injection attacks is to use Parameterized queries,
or stored procedures.
The important thing is that any Dynamic SQL uses the sp_executesql command
and uses the parameters properly. i.e. Do not build your query like it's
adhoc sql.
Colin.
"martin" <news.microsoft.com> wrote in message
news:%23GW81yBbGHA.3916@.TK2MSFTNGP03.phx.gbl...
>I encoutered a strange behavior using the exec command and I could
>repreduce the behavior with the print command:
> the command:
> print '1
> 2
> 3'
> is doing it's jub, but if i add go inside the string I get the floowing
> error:
> print '1
> 2
> go
> 3'
> Server: Msg 105, Level 15, State 1, Line 1
> Unclosed quotation mark before the character string '1
> 2
> '.
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near '1
> 2
> '.
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near '3'.
> Server: Msg 105, Level 15, State 1, Line 1
> Unclosed quotation mark before the character string '
> '.
>
> can someone explain that or point me to a fix I'm using SQL 2000 SP4 on
> windows 2003 server with service pack 1
> this problem also occurs is the string is sent as a parameter to a stored
> procedure using the exec command.
> please help
>|||martin wrote:
> well,
> so please explain that:
> my app does uses ADO.NET and ado.net succeedes to execute SQL statements
> that fails to execute in query analyzer.
> is there some magic here?
> after executing stored procedure with command object, adding a string
> parameter
> in the profiler I see the following SQL statement executed from ADO.NET:
> declare @.P1 int
> set @.P1=33
> exec sp_insert_string '748F4655-9106-4D45-A0A2-1AA95C4C8912', 2, N'test',
> N'--test
> go
> -- test
> ', N'asd', N'James', NULL, @.P1 output
> select @.P1
> the same stored procedure fails to execute from query analyzer.
>
GO is not a T-SQL statement. It is a batch separator used by Query
Analyzer and the other client utilities so this behaviour is correct.
BTW you sould not use the sp_ prefix for user procs. sp_ is reserved
for system procs and may adversely affect performance and reliability
if used in databases other than Master.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Ben Nevarez (BenNevarez@.discussions.microsoft.com) writes:
> This is not a bug. Go is a command that tells SQL Server that this is the
> end of a batch of T-SQL statements.
No. GO is just an identifier as far as SQL Server is concerned. That is,
it is not a command or anything.
However, it is a command that is used by many client-tools to signify
the end of batch, that's true.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Sunday, February 19, 2012

Browse Cube Causes CPU Spike & Unresponsive SSAS

Hello,

I'm interested to see if anyone else has seen the behavior I have experienced. I could have missed a KB article, however, hoping that someone will help with some advice anyhow.

I have a cube (it is around 400 mb). Every morning I execute a SSIS package to process the cube (full process). This works every morning without any failures. When I came in this morning, I opened Management Studio, connected to SSAS, went to the cube, right clicked, and chose browse.

In Task Manager, the Mem Usage by msmdsrv.exe started around 411,000. Once I chose browse, the cpu jumped to 40-60 percent. It has been almost 30 minutes now, and the cpu is still in that range. The mem usage has risen to 530,000, but I expected this.

The problem is the CPU. I can't see any reason for such heavy cpu usage for 30 minutes +. If I restart the SSAS service, and browse the cube again, it seems to work fine. I have seen this happne 4-5 times now.

We are using SQL Server 2005 enterprise (no SP) on Windows Server 2003 SP 1. The machine has 1.5 gig of ram.

Any suggestions or direction is greatly appreciated.

Regards,


Dan

This is strange.

It is hard to say what is going on.
Try and run Profiler connect to Analysis Server and see what it is doing during these 30 min. See what kind of activity reported.

Try and run ActivityViewer sample application and see which sessions are active and what is getting executed.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thanks for your response Edward. I followed your suggestions, but I'm not sure it yielded any useful results. Below is what I have typed up & pasted as I was looking through things.

I’ll start from the ActivityViewer.While I got a few errors from the JIT compiler getting it to run, I managed to hit continue each time and saw some interesting information.While I’m not 100% on how to interpret the findings, this is what I found:

Under Sessions, I found 25295. It is on the same cube/database that I tried to “Browse”.It appears that all the times show something around 12pm (although it is 8am… I’m going to ignore this for the time being) and under last command it has MDSCHEMA_CUBES.

If find this under “Transactions”

TRANSACTION_ID

TRANSACTION_SESSION_ID

TRANSACTION_START_TIME

TRANSACTION_ELAPSED_TIME_MS

TRANSACTION_CPU_TIME_MS

96EC1996-B252-4F80-A0FA-330EE37476BB

25A40F0E-A6FD-4FBA-A6FD-17DFFC0F2340

7/6/2006 12:36 PM

4176799

31

And this under “Locks”.The same Transaction ID above is causing the Lock.

SPID

LOCK_ID

LOCK_TRANSACTION_ID

LOCK_OBJECT_ID

LOCK_STATUS

LOCK_TYPE

LOCK_CREATION_TIME

LOCK_GRANT_TIME

25295

c6eceba6-19bc-480b-96fb-989273e4eade

96ec1996-b252-4f80-a0fa-330ee37476bb

<Object xmlns="urn:schemas-microsoft-com:xml-analysis:rowset"><DatabaseID>dw_prep_archive_PROD</DatabaseID></Object>

1

8

7/6/2006 12:36 PM

7/6/2006 12:36 PM

The time shown under the “lock creation time” is the time that I tried to browse the cube this morning.The profiler trace now shows 13:48 so this whole process has been occurring for over an hour (and my cpu is still above 45%).

This first set of data (below) from the profiler might show something useful, but I'm not sure what it means.

The second set below (seperated by a line) shows the set of commands that loop over and over again every 2 minutes or so. I know below is incredibly messy, but it basically shows “Flight recorder begin” followed by “discover locks”, “discover transactions”, “discover locks”, and then “Flight Recorder Snapshot End”.

Although I am relatively new to SSAS, I don’t think I see anything that could be causing this.Does anyone have any insight on what is happening here?

I really don't expect anyone to try to decipher below completely, but if anyone sees any unusual commands, I would appreciate it.

The only thing I can see is that my initial connection to browse the cube is trying to do something and in a transaction and is blocking everything else.

Regards,


Dan



Upon Connection

Discover Begin 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>ProviderVersion</PropertyName>
</RestrictionList> 101 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:20.000 2006-07-06 12:35:20.000 3572 25267 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover End 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>ProviderVersion</PropertyName>
</RestrictionList> 101 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:20.000 2006-07-06 12:35:20.000 0 0 3572 25267 0 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover Begin 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><ObjectExpansion>ExpandFull</ObjectExpansion></RestrictionList> 99 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:22.000 2006-07-06 12:35:22.000 25271 QG
Discover End 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><ObjectExpansion>ExpandFull</ObjectExpansion></RestrictionList> 99 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:22.000 2006-07-06 12:35:37.000 15107 0 25271 2625 QG
Discover Begin 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>DBMSVersion</PropertyName>
</RestrictionList> 101 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:39.000 2006-07-06 12:35:39.000 3572 25267 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover End 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>DBMSVersion</PropertyName>
</RestrictionList> 101 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:39.000 2006-07-06 12:35:39.000 0 0 3572 25267 0 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover Begin 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><ObjectExpansion>ExpandObject</ObjectExpansion></RestrictionList> 103 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:44.000 2006-07-06 12:35:44.000 25280 QG
Discover End 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><ObjectExpansion>ExpandObject</ObjectExpansion></RestrictionList> 103 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:44.000 2006-07-06 12:35:44.000 47 0 25280 47 QG
Discover Begin 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><DatabaseID>dw_prep_archive_PROD</DatabaseID><ObjectExpansion>ExpandObject</ObjectExpansion></RestrictionList> 102 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:48.000 2006-07-06 12:35:48.000 25284 QG
Discover End 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis"><DatabaseID>dw_prep_archive_PROD</DatabaseID><ObjectExpansion>ExpandObject</ObjectExpansion></RestrictionList> 102 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:48.000 2006-07-06 12:35:48.000 31 0 25284 31 QG
Discover Begin 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<ObjectExpansion>ExpandObject</ObjectExpansion>
</RestrictionList> 105 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:50.000 2006-07-06 12:35:50.000 3572 25289 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover End 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<ObjectExpansion>ExpandObject</ObjectExpansion>
</RestrictionList> 105 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:50.000 2006-07-06 12:35:50.000 47 0 3572 25289 47 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover Begin 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<DatabaseID>dw_prep_archive_PROD</DatabaseID>
<ObjectExpansion>ExpandObject</ObjectExpansion>
</RestrictionList> 105 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:52.000 2006-07-06 12:35:52.000 3572 25289 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover End 31 - DISCOVER_XML_METADATA <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<DatabaseID>dw_prep_archive_PROD</DatabaseID>
<ObjectExpansion>ExpandObject</ObjectExpansion>
</RestrictionList> 105 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:35:52.000 2006-07-06 12:35:52.000 31 0 3572 25289 31 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Timeout>0</Timeout> <SspropInitAppName>Micros
Discover Begin 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>DBMSVersion</PropertyName>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:04.000 2006-07-06 12:36:04.000 3572 25295 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover End 26 - DISCOVER_PROPERTIES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<PropertyName>DBMSVersion</PropertyName>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:04.000 2006-07-06 12:36:04.000 0 0 3572 25295 0 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover Begin 4 - MDSCHEMA_CUBES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<CATALOG_NAME>dw_prep_archive_PROD</CATALOG_NAME>
<CUBE_NAME>DW PREP ARCHIVE</CUBE_NAME>
<CUBE_SOURCE>3</CUBE_SOURCE>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:04.000 2006-07-06 12:36:04.000 3572 25295 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover End 4 - MDSCHEMA_CUBES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<CATALOG_NAME>dw_prep_archive_PROD</CATALOG_NAME>
<CUBE_NAME>DW PREP ARCHIVE</CUBE_NAME>
<CUBE_SOURCE>3</CUBE_SOURCE>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:04.000 2006-07-06 12:36:04.000 78 0 3572 25295 16 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover Begin 4 - MDSCHEMA_CUBES 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:09.000 2006-07-06 12:36:09.000 3572 25295 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover End 4 - MDSCHEMA_CUBES 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:09.000 2006-07-06 12:36:09.000 0 0 3572 25295 0 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover Begin 4 - MDSCHEMA_CUBES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<CUBE_SOURCE>3</CUBE_SOURCE>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:09.000 2006-07-06 12:36:09.000 3572 25295 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover End 4 - MDSCHEMA_CUBES <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<CUBE_SOURCE>3</CUBE_SOURCE>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:09.000 2006-07-06 12:36:09.000 16 0 3572 25295 16 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Discover Begin 5 - MDSCHEMA_DIMENSIONS <RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<CUBE_NAME>DW PREP ARCHIVE</CUBE_NAME>
<CUBE_SOURCE>3</CUBE_SOURCE>
</RestrictionList> 106 DMLENZ Microsoft SQL Server Management Studio 2006-07-06 12:36:10.000 2006-07-06 12:36:10.000 3572 25295 QG <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"> <Catalog>dw_prep_archive_PROD</Catalog> <ShowH
Query Subcube 2 - Non-cache data 00000000,000000000000000000000000,0000000,00,00000000,00000000,00000000 0 2006-07-06 12:36:10.000 2006-07-06 12:36:10.000 797 dw_prep_archive_PROD 25307 531
Query Subcube 2 - Non-cache data 00000000,000000000100100000011000,0000000,00,00000000,00000000,00000000 0 2006-07-06 12:36:10.000 2006-07-06 12:36:11.000 219 dw_prep_archive_PROD 25307 1156
Query Subcube 2 - Non-cache data 00000000,000000000100100000011000,0000000,00,00000000,00000000,00000000 0 2006-07-06 12:36:19.000 2006-07-06 12:36:19.000 406 dw_prep_archive_PROD 25307 9656


Profiler that "loops"

Notification11 - Flight Recorder Snapshot Begin0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000 25544

Server State Discover Begin8 - DISCOVER_LOCKS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

<LOCK_MIN_TOTAL_MS>0</LOCK_MIN_TOTAL_MS>

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000 25545 <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"></PropertyList>

Server State Discover End8 - DISCOVER_LOCKS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

<LOCK_MIN_TOTAL_MS>0</LOCK_MIN_TOTAL_MS>

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.0000255450

Server State Discover Begin7 - DISCOVER_JOBS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

<JOB_MIN_TOTAL_TIME_MS>0</JOB_MIN_TOTAL_TIME_MS>

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000 25546 <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"></PropertyList>

Server State Discover End7 - DISCOVER_JOBS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

<JOB_MIN_TOTAL_TIME_MS>0</JOB_MIN_TOTAL_TIME_MS>

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.0000255460

Server State Discover Begin2 - DISCOVER_SESSIONS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000 25547 <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"></PropertyList>

Server State Discover End2 - DISCOVER_SESSIONS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.0000255470

Server State Discover Begin1 - DISCOVER_CONNECTIONS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000 25548 <PropertyList xmlns="urn:schemas-microsoft-com:xml-analysis"></PropertyList>

Server State Discover End1 - DISCOVER_CONNECTIONS<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">

</RestrictionList>0 2006-07-06 12:52:29.0002006-07-06 12:52:29.0000255480

Notification12 - Flight Recorder Snapshot End0 2006-07-06 12:52:29.0002006-07-06 12:52:29.000025544

|||

This is great investigation you've done!

Unfortunately, I think the situation probably indicates problem with Analysis Services.
Dont see anything you should be doing differently.

Before you go and log your case with Customer Support Services can you please try and find a machine you can install Analysis Services SP1 into.
And see if your situaion is solved in SP1.

Feel free to contact me if you get stuck with your efforts.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thanks for your suggestions Edward.

I'm pretty sure I found the culprit. Whether it is a bug in SSAS (or bad mdx), the person who created the cube has calculations and named sets using the calculations. I'm not entirely sure what the purpose of them were, however when I removed the named sets. the problem was solved. The cube allows me to click "Browse" without any hangups.

I am in the process of utilizing a support contract we have to determine if this is a problem.

Thanks again.

Regards,


Dan

Sunday, February 12, 2012

Bound control timing issues in Visual Basic

It is just me or...
I have two appications in very different environments that have
suddenly shown very similar behavior, after a fashion.
One application is simple desktop. I've been working on the development
off and on for a number of months. It uses controls bound to an Access
database. As a for instance, I have two list boxes where items are
copied from left to right and deleted from the left, a fairly standard
practice. After the delete from the left, the repaint should eliminate
the deleted item, which worked fine until just recently.
The client became very upset when the the control repainted with the
deleted item still displayed. And this was also happening with two grid
controls. It was making me quite nuts. I dug around until I found a
reference to 'sleep' and implemented it. The problem was resolved.
Therefore, the cursor in memory was not being overwritten in time to
keep up with the repaint.
I also have an application in a Citirx/Softricity environment that is
working just fine on several servers (it produces reports using the VB6
data report designer) but is failing on one. I have not yet seen the
results, but I've added the same 'Sleep' methodology to this
application. My current working assumption is that the application
(data report dll) does not have enough time to locate the remote
network printer in time to produce a display when requested by the
application. It's just a working assumption.
What I'm wondering is whether or not anyone else out there in VB land
particularly VB6 land has recently encountered any timing related
errors. I want to document this, if I'm not the only one encountering
the issues.
I'm bringing this up because of something I read around the time of the
emergency patch related to the possibility of viruses or trojans being
embbedded in graphic files. It suggested that the underlayment
(operating environment) was being adversly affected, that is it was
significantly slower to respond to certain requests, as a result of the
patch.
Thanks for your attention...Hello,
If you are using an Access database and you do not have a single
connection for the entire application, you may be running into this
issue:
http://support.microsoft.com/kb/q200300
Razvan