Showing posts with label transaction. Show all posts
Showing posts with label transaction. Show all posts

Wednesday, March 28, 2012

New Time Dimension Role after cube wizard

If I have a data source view consisting of two tables - a fact table and a time dimension table. The fact table has three date columns - transaction begin date, transaction end date, and updated date. When I initially designed the data source view my requirements only called for the trans begin and end dates so I made two joins to the time table from the sales table. I then ran the cube wizard which correctly detected that I intended to use the time table twice for two different Time hierarchies (Roles) on a single time dimension.

I have recently been asked to add the updated date but I cannot figure out how to add a new hierarchy (Role) on the time dimension. Any Ideas?

You should be able to go to the Dimension Usage tab in the cube designer and click on the Add Cube Dimension button on the toolbar (the third button from the left). When the list of dimensions comes up, simply select your Time dimension and add it again. You'll then see the dimension added within the list of dimensions down the left side of the tab, likely with a name like Time (Time 1) or something similar. Now, simply highlight the newly added role-playing dimension, hit F2, and rename it whatever you want. Then, of course, set the appropriate relationship between this new dimension and the measure group(s) within the cube...

HTH,

Dave Fackler

sql

Monday, March 19, 2012

New request is not allowed to start because it should come with valid transaction des

I have a C# windows service that uses MSMQ, DTC Transactions, SQL server
2005 and Notification services.
I am doing the following in the service:
OnStart
Create the queue
set the P Complete event
call Begin P
PComplete
WaitHandle[] waitHandle = new WaitHandle[] { new
AutoResetEvent(false) };
ThreadPool.QueueUserWorkItem(ProcessMessage, waitHandle[0])
Call End P
WaitHandle.WaiteAll(waitHandle)
queue.BeginP
ProcessMessage(object stateInfo)
AutoResetEvent are = (AutoResetEvent)stateInfo;
Create DTC Transaction
try
Message msg =
callResultQueue.Receive(MessageQueueTransactionType.Automatic);
are.Set();
retreive Message Body
Using (SQLConnection conn = new SQLConnection(connectionString))
conn.open
Write Message Body to database
If Messagebody.Status = 20
Update Notification Services
Commit DTC transaction
catch
Roll Back DTC Transaction
Quite often I am receiving the above message, I've googled it and all I've
come up with is people asking how to solve the error. Any information would
be greatly appreciated. I know the above is mixed psudeo code with code, if
additional code is required please let me know, I'll provide what I can.
Thanks
WayneIt would be helpful if you could post working code...
Noel
Wayne Sepega wrote:
> I have a C# windows service that uses MSMQ, DTC Transactions, SQL server
> 2005 and Notification services.
> I am doing the following in the service:
> OnStart
> Create the queue
> set the P Complete event
> call Begin P
> PComplete
> WaitHandle[] waitHandle = new WaitHandle[] { new
> AutoResetEvent(false) };
> ThreadPool.QueueUserWorkItem(ProcessMessage, waitHandle[0])
> Call End P
> WaitHandle.WaiteAll(waitHandle)
> queue.BeginP
> ProcessMessage(object stateInfo)
> AutoResetEvent are = (AutoResetEvent)stateInfo;
> Create DTC Transaction
> try
> Message msg =
> callResultQueue.Receive(MessageQueueTransactionType.Automatic);
> are.Set();
> retreive Message Body
> Using (SQLConnection conn = new SQLConnection(connectionString))
> conn.open
> Write Message Body to database
> If Messagebody.Status = 20
> Update Notification Services
> Commit DTC transaction
> catch
> Roll Back DTC Transaction
>
> Quite often I am receiving the above message, I've googled it and all I've
> come up with is people asking how to solve the error. Any information woul
d
> be greatly appreciated. I know the above is mixed psudeo code with code, i
f
> additional code is required please let me know, I'll provide what I can.
> Thanks
> Wayne

Monday, March 12, 2012

New Pull Subscription - Trans Repli - Use old snapshot...

How do I created a new Pull subscription from a transaction replication
publisher without having to run the Sanpshot again?
When I create a new Pull Subscription, it says "Snapshot not ready". After I
run Sanpshot, then it starts.
Running the snapshot forces me to take the production server down for 2
hours, and can not always do this.
Thanks and God Bless,
ThomBeaux
use the concurrent snapshot option. God bless u2.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"ThomBeaux" <ThomBeaux@.NoSpam.Com> wrote in message
news:60B3F87F-ED59-4030-B30B-E61B145754C5@.microsoft.com...
> How do I created a new Pull subscription from a transaction replication
> publisher without having to run the Sanpshot again?
> When I create a new Pull Subscription, it says "Snapshot not ready". After
> I
> run Sanpshot, then it starts.
> Running the snapshot forces me to take the production server down for 2
> hours, and can not always do this.
> --
> Thanks and God Bless,
> ThomBeaux
|||What part on the Wizard asks for for the concurrent snapshot optin
Thanks and God Bless,
ThomBeaux
"Hilary Cotter" wrote:

> use the concurrent snapshot option. God bless u2.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "ThomBeaux" <ThomBeaux@.NoSpam.Com> wrote in message
> news:60B3F87F-ED59-4030-B30B-E61B145754C5@.microsoft.com...
>
>
|||As well as Hilary's advice, if you are using SQL Server 2005 there is the
option to "initialize with backup". In the CTP SP2 there is also the option
of 'database snapshot' for the sync type AFAIR.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||after creating your publication right click on it and go to the snapshot
tab, you should find it there. Its something about minimize locking during
snapshot generation.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"ThomBeaux" <ThomBeaux@.NoSpam.Com> wrote in message
news:EDD53985-2C00-4151-8902-C08AAC5CEE52@.microsoft.com...[vbcol=seagreen]
> What part on the Wizard asks for for the concurrent snapshot optin
> --
> Thanks and God Bless,
> ThomBeaux
>
> "Hilary Cotter" wrote: