Showing posts with label levels. Show all posts
Showing posts with label levels. Show all posts

Monday, March 19, 2012

Is this a 'dirty read'?

Hello,

trying to understand the concepts of isolation levels not understanding it completely this is my question:

Client A and client B both are querying the same database.
Situation:
- client B starts a transactional operation
- client A executes a non-transactional read operation
- client B rolls back his transactional operation

Is the non-transactional read operation executed by client A called
a 'dirty read'? Or do isolation levels always apply to at least two
clients executing BOTH transactional operations?

regards,
HenkProbably not...depending on if you are using the READUNCOMMITTED isolation level. A dirty read occurs when transactionA starts, updates data, and TransactionB issues a read against a what transactionA is modifiying and transactionB does not issue shared locks against that table when reading it. If transA rolls it work back, transB has read dirty data. Here is an example:

TransA:
BEGIN TRAN
INSERT INTO TableA VALUES('A')

TransB:
SELECT * FROM TableA WITH(NOLOCK)

TransA:
ROLLBACK TRAN

TransB will have read the row that was rolled back from the database, and thus a dirty read.

Hope this helps,
Tim

Monday, March 12, 2012

Is there Simple way to get all dimension & Hierarchy levels from a database?

I need to extract a list of all dimensions and their levels from all dimensions and hierarchies in a cube.

Im assuming that an XMLA query would do the trick...

The reason is that in converting from SAS 2000 to SAS2005, most of our virtual dimensions became member hierarchies in existing dimension, and now we have a large number of saved MDX queries that need to be updated to have the new dimension names. It will be a simple process if I can start from the known dimension and level names

For example the virtual dimension [Product Class] is now referenced as [Item].[Product Class], so now it and all levels of it's hierarchies need to be updated in all saved queries that used it. I have the search/replace but need to build a from/to list quickly

Any suggestions? sample scripts?

Thanks in advance,

Hi Clayton,

You can try this Discover XML/A query, which returns all levels in the AW cube:

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">

<RequestType>MDSCHEMA_LEVELS</RequestType>

<Restrictions>

<RestrictionList>

<CATALOG_NAME>Adventure Works DW</CATALOG_NAME>

<CUBE_NAME>Adventure Works</CUBE_NAME>

</RestrictionList>

</Restrictions>

<Properties>

<PropertyList>

<Catalog>Adventure Works DW</Catalog>

<Format>Tabular</Format>

</PropertyList>

</Properties>

</Discover>