Showing posts with label index. Show all posts
Showing posts with label index. Show all posts

Friday, March 30, 2012

Managed index in Fuzzy Lookup Error

If we run the package with fuzzy lookup without selecting the "manage index" option it runs great and select the data and inserts data within the table as expected.

If we run the sam package after selecting the option for "manage index" it gives error:

Error: 0xC0202009 at Data Flow Task, Composite Lookup [15209]: An OLE DB error has occurred. Error code: 0x80040E14.

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_FuzzyLookupTableMaintenanceInstall':

OK this becasue there is a known issue in SQL server 2005 June CTP. Its not there in Sep CTP

Managed index in Fuzzy Lookup Error

If we run the package with fuzzy lookup without selecting the "manage index" option it runs great and select the data and inserts data within the table as expected.

If we run the sam package after selecting the option for "manage index" it gives error:

Error: 0xC0202009 at Data Flow Task, Composite Lookup [15209]: An OLE DB error has occurred. Error code: 0x80040E14.

An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E14 Description: "A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_FuzzyLookupTableMaintenanceInstall':

OK this becasue there is a known issue in SQL server 2005 June CTP. Its not there in Sep CTP

Wednesday, March 7, 2012

Maintenance Scripts

I found a cool set of maintenance scripts at the following:
http://blog.hundhausen.com/CoolDBAAutomationJobs.aspx
I am only using the Index maintenance jobs
SQLIndexDefragAll
SQLUpdateStatistics
SqlUpdateUsageAll
SQLDBCCAll
I am running SQL 2000 enterprise, currently sp3a. Some of my servers
are heavy used production boxes and I need to be able to manage the
indexes in a systematic way.
My questions are:
If I run this nightly
1: Should I update all statistics or just on the tables I have
defragged?
2: If only on the Defragged tables, should I make another job to
update statisics for all user databases Weekly/monthly/not at all?
3: How often should I update usage
4: How often should I run CheckDB, and with what options?
Thanks!
> http://blog.hundhausen.com/CoolDBAAutomationJobs.aspx
interesting stuff... good for a lazy dba's. please do not get me wrong , a
good dba is a lazy dba, does not do a lot of stuff manually , I like lazy
dba's very much.

> I am only using the Index maintenance jobs
> SQLIndexDefragAll
> SQLUpdateStatistics
> SqlUpdateUsageAll
> SQLDBCCAll
>
> I am running SQL 2000 enterprise, currently sp3a. Some of my servers
go to sp4 if you can and your applications can handle it. Watch out for
index scans when you have not the same data type in your where clauses in
your maintenance plans so.

> are heavy used production boxes and I need to be able to manage the
> indexes in a systematic way.
> My questions are:
> If I run this nightly
> 1: Should I update all statistics or just on the tables I have
> defragged?
the question begins at should I defrag, what and when. when is actually very
important.
the procs has DBCC SHOWCONTIG call to suggest what needs to be deframented
... but it does not use any of the output of the call as far as I can see for
sql 2000.
SQLDBIndexDefragExclusions allows you to exclude entire database, not a
table from what I can see... I did not understand how to implement defrag of
particular subset of tables with the jobs to be hones, did not the
functionality in the sp code that would allow me to do that.
After all the sp will run DBCC INDEXDEFRAG. Pretty much, if you run this at
a wrong time you end up with bunch of data in your t logs but will not
accomplish anything. This is a low priority thing, online de-fragmentation,
if the page it is trying to access is locked used it will live it alone. That
means running this when your data are modified is not going to do you good.
It will not move data between the files either, that means if you have a
process that modifies the data in big chunks and the index is not in one
file, you may consider a different maintenance if you have one file busy,
another empty. can be plenty of examples. The strategy depends on how do your
data look like, how are they accessed and what are your workload patterns.
An plenty depends on your database configuration (auto update statistics
that is for example). Right now there is more unknown about your system for
an advice then known, nothing pretty much exept of heavily used (what can
mean many different things, aka oltp/olap/dss difference for example etc.)

> 2: If only on the Defragged tables, should I make another job to
> update statistics for all user databases Weekly/monthly/not at all?
Same thing here. depends on the workload on your databases first of all. It
can be that a database is heavily used, but it is mostly for reports and the
data are loaded in there let's say once every 2 weeks, what is the point of
maintain the statistic and do defrag there every day? correct, it does not
make sense. My point is, the maintenance is defined by the particular
database/system and the environment it is (business rules/requirements are
included in the consideration).

> 3: How often should I update usage
Depends on your maintenance schedule and what can you afford to do.
and depends on how exactly are you going to to use this statistic data. what
for do you need it?

> 4: How often should I run CheckDB, and with what options?
I'd say daily if your maintenance window is big enough to allow it, then do
it.
It is production, sooner you know that your data are bad, better chance you
have to correct it if possible indeed.
Can you afford it - another big question. It may be that you actually can not.
Your memory pool is going to suffer (I/O will be high, granted, and whatever
was in memory before dbcc can be not there anymore, so it will hit your
performance, question is how fast can your system recover and perform to your
liking). so you need to decide can you run such a thing. VLDB's are a
different story, a lot of data flies into memory, literally. what ever it is,
it is the last maintenance task for the given database, because you want to
find your that your data are corrupted after your reindex defrag etc, not
before that... no vendor is perfect
Thanks, Liliya

Maintenance Scripts

I found a cool set of maintenance scripts at the following:
http://blog.hundhausen.com/CoolDBAAutomationJobs.aspx
I am only using the Index maintenance jobs
SQLIndexDefragAll
SQLUpdateStatistics
SqlUpdateUsageAll
SQLDBCCAll
I am running SQL 2000 enterprise, currently sp3a. Some of my servers
are heavy used production boxes and I need to be able to manage the
indexes in a systematic way.
My questions are:
If I run this nightly
1: Should I update all statistics or just on the tables I have
defragged?
2: If only on the Defragged tables, should I make another job to
update statisics for all user databases Weekly/monthly/not at all?
3: How often should I update usage
4: How often should I run CheckDB, and with what options?
Thanks!> http://blog.hundhausen.com/CoolDBAAutomationJobs.aspx
interesting stuff... good for a lazy dba's. please do not get me wrong :), a
good dba is a lazy dba, does not do a lot of stuff manually :), I like lazy
dba's very much.
> I am only using the Index maintenance jobs
> SQLIndexDefragAll
> SQLUpdateStatistics
> SqlUpdateUsageAll
> SQLDBCCAll
>
> I am running SQL 2000 enterprise, currently sp3a. Some of my servers
go to sp4 if you can and your applications can handle it. Watch out for
index scans when you have not the same data type in your where clauses in
your maintenance plans so.
> are heavy used production boxes and I need to be able to manage the
> indexes in a systematic way.
> My questions are:
> If I run this nightly
> 1: Should I update all statistics or just on the tables I have
> defragged?
the question begins at should I defrag, what and when. when is actually very
important.
the procs has DBCC SHOWCONTIG call to suggest what needs to be deframented
... but it does not use any of the output of the call as far as I can see for
sql 2000.
SQLDBIndexDefragExclusions allows you to exclude entire database, not a
table from what I can see... I did not understand how to implement defrag of
particular subset of tables with the jobs to be hones, did not the
functionality in the sp code that would allow me to do that.
After all the sp will run DBCC INDEXDEFRAG. Pretty much, if you run this at
a wrong time you end up with bunch of data in your t logs but will not
accomplish anything. This is a low priority thing, online de-fragmentation,
if the page it is trying to access is locked used it will live it alone. That
means running this when your data are modified is not going to do you good.
It will not move data between the files either, that means if you have a
process that modifies the data in big chunks and the index is not in one
file, you may consider a different maintenance if you have one file busy,
another empty. can be plenty of examples. The strategy depends on how do your
data look like, how are they accessed and what are your workload patterns.
An plenty depends on your database configuration (auto update statistics
that is for example). Right now there is more unknown about your system for
an advice then known, nothing pretty much exept of heavily used (what can
mean many different things, aka oltp/olap/dss difference for example etc.)
> 2: If only on the Defragged tables, should I make another job to
> update statistics for all user databases Weekly/monthly/not at all?
Same thing here. depends on the workload on your databases first of all. It
can be that a database is heavily used, but it is mostly for reports and the
data are loaded in there let's say once every 2 weeks, what is the point of
maintain the statistic and do defrag there every day? correct, it does not
make sense. My point is, the maintenance is defined by the particular
database/system and the environment it is (business rules/requirements are
included in the consideration).
> 3: How often should I update usage
Depends on your maintenance schedule and what can you afford to do.
and depends on how exactly are you going to to use this statistic data. what
for do you need it?
> 4: How often should I run CheckDB, and with what options?
I'd say daily if your maintenance window is big enough to allow it, then do
it.
It is production, sooner you know that your data are bad, better chance you
have to correct it if possible indeed.
Can you afford it - another big question. It may be that you actually can not.
Your memory pool is going to suffer (I/O will be high, granted, and whatever
was in memory before dbcc can be not there anymore, so it will hit your
performance, question is how fast can your system recover and perform to your
liking). so you need to decide can you run such a thing. VLDB's are a
different story, a lot of data flies into memory, literally. what ever it is,
it is the last maintenance task for the given database, because you want to
find your that your data are corrupted after your reindex defrag etc, not
before that... no vendor is perfect :)
--
Thanks, Liliya

Maintenance plans: online rebuilding of indexes...

I'm using SQL Server 2005 SP1 Standard.

On the Rebuild Index Task there is a checkbox at the bottom that says 'Keep index online while reindexing'.

Great I thought, I'll check that.

Later, when I tested the job, I got this error:

'Online index operations can only be performed in Enterprise edition of SQL Server.'

Why have that checkbox available to check, if I'm running a version that doesn't allow it? Where's the bug?

Thanks

Ed

I've entered a bug in our tracking database.

Thanks,

Mark

Saturday, February 25, 2012

Maintenance Plans

1) Is it a good practice to use the Maintenance Plans to back up the
database, trans logs, and organize the index, and verify the data?
2) How often would it be good practice to run the recreating of index and
verifying the data?
3) Or it's better just create one jobs to backup database etc?
4) Are there any negative to using Maintenance Plans
Thank You
There are no one size fits all answer for these types of questions. If you have responsibility for
these things, then you have responsibility to understand how backup etc work in SQL Server, learn
how the maint wizard work and based on that make decisions whether maint wiz is good for your
organization. Regarding reindexing, I suggest you read
http://www.microsoft.com/technet/pro...ss2kidbp.mspx.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in message
news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
> 1) Is it a good practice to use the Maintenance Plans to back up the
> database, trans logs, and organize the index, and verify the data?
> 2) How often would it be good practice to run the recreating of index and
> verifying the data?
> 3) Or it's better just create one jobs to backup database etc?
> 4) Are there any negative to using Maintenance Plans
> Thank You
|||"Tibor Karaszi" wrote:

> There are no one size fits all answer for these types of questions. If you have responsibility for
> these things, then you have responsibility to understand how backup etc work in SQL Server, learn
> how the maint wizard work and based on that make decisions whether maint wiz is good for your
> organization. Regarding reindexing, I suggest you read
> http://www.microsoft.com/technet/pro...ss2kidbp.mspx.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in message
> news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
>
>

Maintenance Plans

1) Is it a good practice to use the Maintenance Plans to back up the
database, trans logs, and organize the index, and verify the data?
2) How often would it be good practice to run the recreating of index and
verifying the data?
3) Or it's better just create one jobs to backup database etc?
4) Are there any negative to using Maintenance Plans
Thank YouThere are no one size fits all answer for these types of questions. If you have responsibility for
these things, then you have responsibility to understand how backup etc work in SQL Server, learn
how the maint wizard work and based on that make decisions whether maint wiz is good for your
organization. Regarding reindexing, I suggest you read
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in message
news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
> 1) Is it a good practice to use the Maintenance Plans to back up the
> database, trans logs, and organize the index, and verify the data?
> 2) How often would it be good practice to run the recreating of index and
> verifying the data?
> 3) Or it's better just create one jobs to backup database etc?
> 4) Are there any negative to using Maintenance Plans
> Thank You|||"Tibor Karaszi" wrote:
> There are no one size fits all answer for these types of questions. If you have responsibility for
> these things, then you have responsibility to understand how backup etc work in SQL Server, learn
> how the maint wizard work and based on that make decisions whether maint wiz is good for your
> organization. Regarding reindexing, I suggest you read
> http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in message
> news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
> > 1) Is it a good practice to use the Maintenance Plans to back up the
> > database, trans logs, and organize the index, and verify the data?
> >
> > 2) How often would it be good practice to run the recreating of index and
> > verifying the data?
> >
> > 3) Or it's better just create one jobs to backup database etc?
> >
> > 4) Are there any negative to using Maintenance Plans
> >
> > Thank You
>
>

Maintenance Plans

1) Is it a good practice to use the Maintenance Plans to back up the
database, trans logs, and organize the index, and verify the data?
2) How often would it be good practice to run the recreating of index and
verifying the data?
3) Or it's better just create one jobs to backup database etc?
4) Are there any negative to using Maintenance Plans
Thank YouThere are no one size fits all answer for these types of questions. If you h
ave responsibility for
these things, then you have responsibility to understand how backup etc work
in SQL Server, learn
how the maint wizard work and based on that make decisions whether maint wiz
is good for your
organization. Regarding reindexing, I suggest you read
http://www.microsoft.com/technet/pr...ver/default.asp
http://www.solidqualitylearning.com/
"Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in m
essage
news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
> 1) Is it a good practice to use the Maintenance Plans to back up the
> database, trans logs, and organize the index, and verify the data?
> 2) How often would it be good practice to run the recreating of index and
> verifying the data?
> 3) Or it's better just create one jobs to backup database etc?
> 4) Are there any negative to using Maintenance Plans
> Thank You|||"Tibor Karaszi" wrote:

> There are no one size fits all answer for these types of questions. If you
have responsibility for
> these things, then you have responsibility to understand how backup etc wo
rk in SQL Server, learn
> how the maint wizard work and based on that make decisions whether maint w
iz is good for your
> organization. Regarding reindexing, I suggest you read
> http://www.microsoft.com/technet/pr...ver/default.asp
> http://www.solidqualitylearning.com/
>
> "Victoria Morrison" <Victoria Morrison@.discussions.microsoft.com> wrote in
message
> news:CCA01C5B-D86A-4846-8682-50DBA0B24C37@.microsoft.com...
>
>

Monday, February 20, 2012

Maintenance Plan...what is it doing exactly?

I would like to know exactly what commands the "Maintenance Plan" is
executing behind the scenes when the checkbox Reorganize data and index
pages is checked on the Optimizations tab on the Maintenance plan. My
thought is that it is executing some DBCC DBREINDEX commands across the
entire set of databases selected.
SpencerWhat it does depends on the version of SQL Server you are using. In 2005, you can clock in the
"display SQL" (or whatever it is called) button. But to be sure, use Profiler to see what SQL maint
plan submits. In 2000, it uses DBCC DBREINDEX for all tables in the database (regardless of
fragmentation level :-( ).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"stabbert" <spencer@.tabbert.net> wrote in message
news:1144850383.926367.95100@.z34g2000cwc.googlegroups.com...
>I would like to know exactly what commands the "Maintenance Plan" is
> executing behind the scenes when the checkbox Reorganize data and index
> pages is checked on the Optimizations tab on the Maintenance plan. My
> thought is that it is executing some DBCC DBREINDEX commands across the
> entire set of databases selected.
> Spencer
>