Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Friday, March 23, 2012

Media Family ... Is Incorrectly Formed

I am using SQL Server 2000 SP 3a enterprise. We do a nightly backup to
a
network location and then in the middle of the night the files are
written to
tape from the network. We have verified our backup plan will work by
choosing a backup and restoring it to the database. We have done this
many
times without problems. However, there is a backup that when I try to
restore it I get the Error:
Server: Msg 3241, Level 16, State 37, Line 1 The media family on device
'UNC
Path.bak' is incorrectly formed. SQL Server cannot process this media
family.
I have run the command: RESTORE HEADERONLY FROM DISK='UNC Path.BAK'.
The
backupName from this says *** INCOMPLETE ***; Position = 1; the rest of
the
fields are NULL.
What would happen to make the backup INCOMPLETE? Maybe this would
happen if
an error was encountered part way throught backing up the file? The
file has
almost 800 MB of data in it. I would like to restore this file and get
out a
specific set of records if possible. Even if I can't get everything,
if I
could get at least some of it then that would be better than a complete
loss.
Is there anyway to get the data that is contained in the file back?
Thank you
KalvinHi
A bad backup is a bad backup, not much you can do with it. Maybe opening a
call with Microsoft PSS might help as they may have tools to read partial
backups.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Kalvin" wrote:

> I am using SQL Server 2000 SP 3a enterprise. We do a nightly backup to
> a
> network location and then in the middle of the night the files are
> written to
> tape from the network. We have verified our backup plan will work by
> choosing a backup and restoring it to the database. We have done this
> many
> times without problems. However, there is a backup that when I try to
> restore it I get the Error:
> Server: Msg 3241, Level 16, State 37, Line 1 The media family on device
> 'UNC
> Path.bak' is incorrectly formed. SQL Server cannot process this media
> family.
> I have run the command: RESTORE HEADERONLY FROM DISK='UNC Path.BAK'.
> The
> backupName from this says *** INCOMPLETE ***; Position = 1; the rest of
> the
> fields are NULL.
> What would happen to make the backup INCOMPLETE? Maybe this would
> happen if
> an error was encountered part way throught backing up the file? The
> file has
> almost 800 MB of data in it. I would like to restore this file and get
> out a
> specific set of records if possible. Even if I can't get everything,
> if I
> could get at least some of it then that would be better than a complete
> loss.
>
> Is there anyway to get the data that is contained in the file back?
>
> --
> Thank you
> Kalvin
>

Wednesday, March 7, 2012

MDX query with filter clause

Hi,

I have the following MDX query which is supposed to return the number of records with Actual time > TargetTime

for each customer, location and editor. Actual Time and Target Time are measures on the Fact table defined in minutes and represented by integer values.

The hierarchy I have created is

Customer Name

Location Name

Editor Name

The MDX query I have written is:

Count(filter(Descendants([DimCustomer].[Customer_Hierarchy].CurrentMember,[DimCustomer].[Customer_Hierarchy].[EditorName]), [Measures].[ActualTime]>[Measures].[TargetTime] ))

But this query gives me the number of customers rather than the number of records with ActualTime > TargetTime

for each customer, location, editor.

Any help would be appreciated.

The best approach here in my opinion would be to create calculated column in DSV returns 1 when ActualTime > TargetTime and 0 otherwise, and then define a new measure on top of this column with Aggregation Type as SUM.|||

I have implemeneted a dsv for the above with a measure named turnaroundtime to get the count of records with ActualTime > TargetTime

I also need to get the count of documents for each customer -> location -> editor where actual time > target time and edit type = Voice

Documents is the fact table. For each document in the fact table, the edit type field specifies if its 'voice' or 'other'

I was trying to get the filter clause to work for this.

|||

Can you create another dimension for Edit Type? If you did this, then you'd be able to filter a query using the new dimension, selecting the member [Voice].

HTH,

Dave Fackler

|||

I created another dimension for edit type but not sure how to write the calculated member.

I need the count of documents where Edit type = Voice and ActualTime > TargetTime

documents is the fatc table.

How do I write the query to get the number of documents for each customer -> location->editor.

I am new to MDX and not able to figure it out

|||

Assuming you want this as an additional calculated measure (and not just doing the filtering within a given query), you could add a calculated member named something like [Measures].[VoiceTurnAroundTime] with a calculation of "([Measures].[TurnAroundTime], [Edit Type].[Voice]")...

HTH,

Dave Fackler

|||I tried that but that displays an error.|||Can you provide the exact calculation as you have it typed in and the error being displayed?

Dave F.|||It worked...thanks a lot.