Click here to Skip to main content
14,841,473 members
Home / Discussions / Database
   

Database

 
QuestionDB2: Create primary key on partition table? Pin
cuong-nm7-Aug-11 21:02
Membercuong-nm7-Aug-11 21:02 
AnswerRe: DB2: Create primary key on partition table? Pin
Herman<T>.Instance9-Aug-11 2:29
MemberHerman<T>.Instance9-Aug-11 2:29 
GeneralRe: DB2: Create primary key on partition table? Pin
cuong-nm9-Aug-11 16:30
Membercuong-nm9-Aug-11 16:30 
AnswerRe: DB2: Create primary key on partition table? Pin
Wendelius12-Aug-11 7:01
mveWendelius12-Aug-11 7:01 
GeneralRe: DB2: Create primary key on partition table? Pin
cuong-nm14-Aug-11 17:19
Membercuong-nm14-Aug-11 17:19 
QuestionCube processing confirmation? Pin
current19996-Aug-11 1:01
Membercurrent19996-Aug-11 1:01 
AnswerRe: Cube processing confirmation? Pin
Mycroft Holmes6-Aug-11 2:52
professionalMycroft Holmes6-Aug-11 2:52 
AnswerRe: Cube processing confirmation? Pin
S Douglas11-Aug-11 9:20
professionalS Douglas11-Aug-11 9:20 
current1999 wrote:
After processing your ETL package which loads data into the cube, how do you
ensure that your cube has been processed?


Well it depends on what you are looking for in confirmation.

1: Confirmation of last successful processing
1.1: If the SQL Server agent is processing your cubes, then you can set the agent up to send out an email on completion. This will tell you if the process completed successfully or failed. The only caveat is if you run the job as a SQL Server Analysis command, then the agent wont know if the command failed or was successful. Just make sure to run your commands as a SSIS package and there wont be any issues.

1.2: In addition to agent notifications I use a modified version of the Microsoft SSAS example, AMO Display Object Names. I modified it to read the structure and send me an email with last processing date / times of the cubes and dimensions.
Info: http://technet.microsoft.com/en-us/library/ms160876(SQL.90).aspx

Had to remove some of the code as it contained company info in it, but here is the juxed of it
   try
    {
        //--------------------------------------------------------------------------------
        // For each database on the server, we'll display its name and other objects names.
        //--------------------------------------------------------------------------------
        foreach (Database db in server.Databases)
        {
            Console.WriteLine("{0}", db.Name);

            // Display Dimensions
            Console.WriteLine("\tDimensions:");
            foreach (Dimension dimension in db.Dimensions)
                Console.WriteLine("\t\t{0}", dimension.Name);

            // Display Cubes
            Console.WriteLine("\tCubes:");
            foreach (Cube cube in db.Cubes)
            {
                Console.WriteLine("\t\t{0}", cube.Name);

                // Display Measure Groups
                Console.WriteLine("\t\tMeasure Groups:");
                foreach (MeasureGroup group in cube.MeasureGroups)
                {/**/
                    Console.WriteLine("\t\t\tGroup Name: \t{0}", group.Name);
                    Console.WriteLine("\t\t\t\tSource: \t{0}", group.Source);
                    Console.WriteLine("\t\t\t\tCreated: \t{0}", group.CreatedTimestamp);
                    Console.WriteLine("\t\t\t\tLast Proc: \t{0} ", group.LastProcessed);
                    Console.WriteLine("\t\t\t\tEstimatedSize: \t{0} ", group.EstimatedSize);
                    Console.WriteLine("\t\t\t\tStorageLocation: \t{0} ", group.StorageLocation);
                    string sState = "None";
                    switch (group.State)
                    {
                        case AnalysisState.Processed:
                            sState = "Processed";
                            break;
                        case AnalysisState.PartiallyProcessed:
                            sState = "PartiallyProcessed";
                            break;
                        case AnalysisState.Unprocessed:
                            sState = "Unprocessed";
                            break;
                    }
                    Console.WriteLine("\t\t\t State: \t{0}", sState);
                    Console.WriteLine("\t\t\t\t Type: \t{0}", group.Type);

                    foreach (Measure meas in group.Measures)
                    {
                        Console.WriteLine("\t\t\t\t\t Name: \t{0}", meas.Name);
                        Console.WriteLine("\t\t\t\t\t\t Expression: \t{0}", meas.MeasureExpression);
                        Console.WriteLine("\t\t\t\t\t\t Aggregate: \t{0}", meas.AggregateFunction);
                        Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0}", meas.DisplayFolder);
                        Console.WriteLine("\t\t\t\t\t\t Source: \t{0}", meas.Source);
                        Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0} ", meas.DisplayFolder);
                        //Console.WriteLine("\t\t\t\t\t{0}", meas.);
                    }
                   foreach (MdxScript mdx in cube.MdxScripts)
                   {

                            string MeasureName = mdx.Name.Replace("[MEASURES].[", "");
                            MeasureName = MeasureName.Replace("]", "");

                            Console.WriteLine("\t\t\t\t\t Name: \t{0}", MeasureName);
                            Console.WriteLine("\t\t\t\t\t\t DisplayFolder: \t{0} ", mdx.Annotations);

                    }
                }


            }

            // Display Mining Structures
            Console.WriteLine("\tMining Structures:");
            foreach (MiningStructure miningStructure in db.MiningStructures)
                Console.WriteLine("\t\t{0}", miningStructure.Name);
        }
    }
    finally
    {
        server.Disconnect();
        server.Dispose();
    }
}
catch (AmoException e)
{
    Console.WriteLine(e.ToString());
}


2: Validating the data, that’s a whole task all unto it self. I used to do this with a SSIS package that would run a MDX query and send the results from that. However, I found that just making sure everything processed correct really solved this issues we where having.

Common sense is admitting there is cause and effect and that you can exert some control over what you understand.


QuestionDisplaying SSRS Reports Pin
Aptiva Dave4-Aug-11 6:28
MemberAptiva Dave4-Aug-11 6:28 
AnswerRe: Displaying SSRS Reports Pin
Mycroft Holmes4-Aug-11 14:38
professionalMycroft Holmes4-Aug-11 14:38 
AnswerRe: Displaying SSRS Reports Pin
Pradeep Shukla8-Aug-11 8:33
professionalPradeep Shukla8-Aug-11 8:33 
GeneralRe: Displaying SSRS Reports Pin
Aptiva Dave8-Aug-11 8:50
MemberAptiva Dave8-Aug-11 8:50 
GeneralRe: Displaying SSRS Reports Pin
Pradeep Shukla8-Aug-11 9:25
professionalPradeep Shukla8-Aug-11 9:25 
GeneralRe: Displaying SSRS Reports Pin
Aptiva Dave8-Aug-11 9:26
MemberAptiva Dave8-Aug-11 9:26 
GeneralRe: Displaying SSRS Reports [modified] Pin
Pradeep Shukla8-Aug-11 9:50
professionalPradeep Shukla8-Aug-11 9:50 
GeneralRe: Displaying SSRS Reports Pin
Pradeep Shukla8-Aug-11 10:01
professionalPradeep Shukla8-Aug-11 10:01 
GeneralRe: Displaying SSRS Reports Pin
Chris Meech8-Aug-11 10:07
MemberChris Meech8-Aug-11 10:07 
GeneralRe: Displaying SSRS Reports Pin
Pradeep Shukla8-Aug-11 10:29
professionalPradeep Shukla8-Aug-11 10:29 
QuestionAlphanumerical sorting for SQL Server CE [modified] Pin
jtpaa3-Aug-11 23:55
Memberjtpaa3-Aug-11 23:55 
AnswerRe: Alphanumerical sorting for SQL Server CE Pin
Blue_Boy4-Aug-11 2:49
MemberBlue_Boy4-Aug-11 2:49 
GeneralRe: Alphanumerical sorting for SQL Server CE Pin
jtpaa4-Aug-11 4:31
Memberjtpaa4-Aug-11 4:31 
Questionsql command error [modified] Pin
khosnur3-Aug-11 21:30
Memberkhosnur3-Aug-11 21:30 
AnswerRe: sql command error Pin
Simon_Whale3-Aug-11 22:44
professionalSimon_Whale3-Aug-11 22:44 
AnswerRe: sql command error Pin
Shameel3-Aug-11 23:07
professionalShameel3-Aug-11 23:07 
GeneralRe: sql command error Pin
Tim Carmichael4-Aug-11 1:19
MemberTim Carmichael4-Aug-11 1:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.