Showing posts with label maintenance. Show all posts
Showing posts with label maintenance. Show all posts

Friday, March 30, 2012

Relay Error Using Database Mail

SQL 2005 SP1
Windows Server 2003 SP1
Exchange 2000
I am getting this error sending a Maintenance Plans report to an email
recipient. It only happens sending to an external email address.
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
Message: Cannot send mails to mail server. (Mailbox unavailable. The server
response was: 5.7.1 Unable to relay for myaddress@.domain.com).
)
This is an issue correct-able at your SMTP server; it has nothing to do with
database mail (unless you have a more open internal SMTP server available,
that you could use instead).
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:A35C82BD-00DA-414F-8071-2DD5F11EF010@.microsoft.com...
> SQL 2005 SP1
> Windows Server 2003 SP1
> Exchange 2000
> I am getting this error sending a Maintenance Plans report to an email
> recipient. It only happens sending to an external email address.
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
> Message: Cannot send mails to mail server. (Mailbox unavailable. The
> server
> response was: 5.7.1 Unable to relay for myaddress@.domain.com).
> )
|||Thanks for the reply. So what do I have to do on Exchange to correct this?
|||Well, you could open up external SMTP relay from the IP address of your SQL
Server(s). I am not an Exchange administrator. So for more specific
details, if you don't get a quick enough response here, you'll ghave better
luck in an Exchange newsgroup.
If you have a simple SMTP server running on an IIS box somewhere inside your
network, that you can use for this, I can help with specific instructions
there. Database Mail does not require Exchange, and depending on your
requirements, you may not want to mix the two.
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:D989979C-3692-4C0D-9BA9-87523863ED45@.microsoft.com...
> Thanks for the reply. So what do I have to do on Exchange to correct
> this?
sql

Relay Error Using Database Mail

SQL 2005 SP1
Windows Server 2003 SP1
Exchange 2000
I am getting this error sending a Maintenance Plans report to an email
recipient. It only happens sending to an external email address.
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
Message: Cannot send mails to mail server. (Mailbox unavailable. The server
response was: 5.7.1 Unable to relay for myaddress@.domain.com).
)This is an issue correct-able at your SMTP server; it has nothing to do with
database mail (unless you have a more open internal SMTP server available,
that you could use instead).
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:A35C82BD-00DA-414F-8071-2DD5F11EF010@.microsoft.com...
> SQL 2005 SP1
> Windows Server 2003 SP1
> Exchange 2000
> I am getting this error sending a Maintenance Plans report to an email
> recipient. It only happens sending to an external email address.
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
> Message: Cannot send mails to mail server. (Mailbox unavailable. The
> server
> response was: 5.7.1 Unable to relay for myaddress@.domain.com).
> )|||Thanks for the reply. So what do I have to do on Exchange to correct this?|||Well, you could open up external SMTP relay from the IP address of your SQL
Server(s). I am not an Exchange administrator. So for more specific
details, if you don't get a quick enough response here, you'll ghave better
luck in an Exchange newsgroup.
If you have a simple SMTP server running on an IIS box somewhere inside your
network, that you can use for this, I can help with specific instructions
there. Database Mail does not require Exchange, and depending on your
requirements, you may not want to mix the two.
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:D989979C-3692-4C0D-9BA9-87523863ED45@.microsoft.com...
> Thanks for the reply. So what do I have to do on Exchange to correct
> this?

Relay Error Using Database Mail

SQL 2005 SP1
Windows Server 2003 SP1
Exchange 2000
I am getting this error sending a Maintenance Plans report to an email
recipient. It only happens sending to an external email address.
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
Message: Cannot send mails to mail server. (Mailbox unavailable. The server
response was: 5.7.1 Unable to relay for myaddress@.domain.com).
)This is an issue correct-able at your SMTP server; it has nothing to do with
database mail (unless you have a more open internal SMTP server available,
that you could use instead).
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:A35C82BD-00DA-414F-8071-2DD5F11EF010@.microsoft.com...
> SQL 2005 SP1
> Windows Server 2003 SP1
> Exchange 2000
> I am getting this error sending a Maintenance Plans report to an email
> recipient. It only happens sending to an external email address.
> The mail could not be sent to the recipients because of the mail server
> failure. (Sending Mail using Account 2 (2007-02-06T08:01:25). Exception
> Message: Cannot send mails to mail server. (Mailbox unavailable. The
> server
> response was: 5.7.1 Unable to relay for myaddress@.domain.com).
> )|||Thanks for the reply. So what do I have to do on Exchange to correct this?|||Well, you could open up external SMTP relay from the IP address of your SQL
Server(s). I am not an Exchange administrator. So for more specific
details, if you don't get a quick enough response here, you'll ghave better
luck in an Exchange newsgroup.
If you have a simple SMTP server running on an IIS box somewhere inside your
network, that you can use for this, I can help with specific instructions
there. Database Mail does not require Exchange, and depending on your
requirements, you may not want to mix the two.
A
"John Oberlin" <JohnOberlin@.discussions.microsoft.com> wrote in message
news:D989979C-3692-4C0D-9BA9-87523863ED45@.microsoft.com...
> Thanks for the reply. So what do I have to do on Exchange to correct
> this?

Wednesday, March 21, 2012

Reinstall SQL Server 2005 Problem (cannot connect to <server>)

I had installed SQL Server 2005 for the first time in order to study for the SQL SERVER 2005 Implementation and Maintenance exam. Everything was going ok until I got to the section on Partitions. When I attempted to follow the lessons on partitions, I received an error indicating that the Enterprise Edition was needed for Partitions.

I uninstalled SQL Server and re-installed the Enterprise Edition (MSDN disk). When I re-installed, I was not promopted for a new/default instance name). The old instance that had used for the original installation is presented when I attempt to "Connect to Server." When I select that instance and click Connect, I receive the "Cannot connect to <server name>" error message.

How do I re-establish that instance name or create another default instance?

Regards - Tony

Would you check Control Panel -> Add/Remove Programs? If there is still SQL Server 2005 entry, please choose it and click change, then click Report button to get all information about SQL Server 2005. The report will tell you which components of SQL Server 2005 are still existing on your machine.

Based on your description, maybe the previous SQL Server 2005 has not been uninstalled successfully.

If you do not mind, you can type in a new instance name to install another instance as multiple instacnes are supported provided that you have enough resourses such as free disk space.

Tuesday, March 20, 2012

Reinstall

Don't know if this will help, but I always make it a
practice to install the most recent MDAC before doing any
SQL Server maintenance. When you don't have the latest
MDAC, the SQL install errors you could get are really off
the wall. Also I believe the current MDAC (version 2.8, I
think) has a security patch you should install.

>--Original Message--
>I'm trying to reinstall SQL Server without much sucess.
I did an uninstall and deleted all old databases, then did
all updates for Windows 2000 Server, tried to install SQL
Server Standard, but I'm getting a configuration failed
error. When I check the sqlstp.log the line "[Microsoft]
[ODBC SQL Server Driver][Named Pipes]Connection broken."
appears several times after cnfgsvr.exe starts. Ultimatly
it fails and sends a (-1) exit code. Do I have a conflict
with 1 or more Hotfixes? I'm not a SQL expert, so any
help would be appreciated.
>-Rick
>.
>
Scott,
Thanks for your help! That did the trick. I guess one the the updates had back leveled MDAC. Odd that it didn't work anyway...oh well. Thanks again.
-Rick
"Scott" wrote:

> Don't know if this will help, but I always make it a
> practice to install the most recent MDAC before doing any
> SQL Server maintenance. When you don't have the latest
> MDAC, the SQL install errors you could get are really off
> the wall. Also I believe the current MDAC (version 2.8, I
> think) has a security patch you should install.
>
> I did an uninstall and deleted all old databases, then did
> all updates for Windows 2000 Server, tried to install SQL
> Server Standard, but I'm getting a configuration failed
> error. When I check the sqlstp.log the line "[Microsoft]
> [ODBC SQL Server Driver][Named Pipes]Connection broken."
> appears several times after cnfgsvr.exe starts. Ultimatly
> it fails and sends a (-1) exit code. Do I have a conflict
> with 1 or more Hotfixes? I'm not a SQL expert, so any
> help would be appreciated.
>

Reinstall

Don't know if this will help, but I always make it a
practice to install the most recent MDAC before doing any
SQL Server maintenance. When you don't have the latest
MDAC, the SQL install errors you could get are really off
the wall. Also I believe the current MDAC (version 2.8, I
think) has a security patch you should install.

>--Original Message--
>I'm trying to reinstall SQL Server without much sucess.
I did an uninstall and deleted all old databases, then did
all updates for Windows 2000 Server, tried to install SQL
Server Standard, but I'm getting a configuration failed
error. When I check the sqlstp.log the line "[Microsoft]
[ODBC SQL Server Driver][Named Pipes]Connection broken."
appears several times after cnfgsvr.exe starts. Ultimatly
it fails and sends a (-1) exit code. Do I have a conflict
with 1 or more Hotfixes? I'm not a SQL expert, so any
help would be appreciated.
>-Rick
>.
>Scott,
Thanks for your help! That did the trick. I guess one the the updates had
back leveled MDAC. Odd that it didn't work anyway...oh well. Thanks again.
-Rick
"Scott" wrote:

> Don't know if this will help, but I always make it a
> practice to install the most recent MDAC before doing any
> SQL Server maintenance. When you don't have the latest
> MDAC, the SQL install errors you could get are really off
> the wall. Also I believe the current MDAC (version 2.8, I
> think) has a security patch you should install.
>
> I did an uninstall and deleted all old databases, then did
> all updates for Windows 2000 Server, tried to install SQL
> Server Standard, but I'm getting a configuration failed
> error. When I check the sqlstp.log the line "[Microsoft]
> [ODBC SQL Server Driver][Named Pipes]Connection broken."
> appears several times after cnfgsvr.exe starts. Ultimatly
> it fails and sends a (-1) exit code. Do I have a conflict
> with 1 or more Hotfixes? I'm not a SQL expert, so any
> help would be appreciated.
>

reindexing, rebuilding, etc

hi, new to sql server (2000)..in my previous database, we had to do
maintenance on a regualr basis...reindexing tables, rebuilding, etc...our
database is relatively small (8G)but the reindexing in sql server is done in
minutes, whereas in our old system it used to take up to 4 hrs...Is sql
server that fast or am I doing something wrong?
also, what routines are recommended for regular maintenance and should I do
individually or create a plan?
Thanks,
GerryUse the code found in Books Online, DBCC SHOWCONTIG for reindexing, and read
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx first.
As for the other things:
Backup schedule and types is determined by the owner of the system.
I prefer to do DBCC CHECKDB as often as I can. I prefer to do it as often as I do db backup. This
was, if I get a corruption, I can do a log backup, restore the most recent db backup and all
subsequent log backups and the corruption probably not re-introduced by restoring the log backup.
Your mileage will vary, so just put in some common sense into planning these things.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gerry M" <GerryM@.discussions.microsoft.com> wrote in message
news:8295C0D3-477A-454C-92E9-51EE95D9E435@.microsoft.com...
> hi, new to sql server (2000)..in my previous database, we had to do
> maintenance on a regualr basis...reindexing tables, rebuilding, etc...our
> database is relatively small (8G)but the reindexing in sql server is done in
> minutes, whereas in our old system it used to take up to 4 hrs...Is sql
> server that fast or am I doing something wrong?
> also, what routines are recommended for regular maintenance and should I do
> individually or create a plan?
> Thanks,
> Gerry|||Thank you very much.
"Tibor Karaszi" wrote:
> Use the code found in Books Online, DBCC SHOWCONTIG for reindexing, and read
> http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx first.
> As for the other things:
> Backup schedule and types is determined by the owner of the system.
> I prefer to do DBCC CHECKDB as often as I can. I prefer to do it as often as I do db backup. This
> was, if I get a corruption, I can do a log backup, restore the most recent db backup and all
> subsequent log backups and the corruption probably not re-introduced by restoring the log backup.
> Your mileage will vary, so just put in some common sense into planning these things.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gerry M" <GerryM@.discussions.microsoft.com> wrote in message
> news:8295C0D3-477A-454C-92E9-51EE95D9E435@.microsoft.com...
> > hi, new to sql server (2000)..in my previous database, we had to do
> > maintenance on a regualr basis...reindexing tables, rebuilding, etc...our
> > database is relatively small (8G)but the reindexing in sql server is done in
> > minutes, whereas in our old system it used to take up to 4 hrs...Is sql
> > server that fast or am I doing something wrong?
> >
> > also, what routines are recommended for regular maintenance and should I do
> > individually or create a plan?
> >
> > Thanks,
> > Gerry
>|||Gerry M wrote:
> hi, new to sql server (2000)..in my previous database, we had to do
> maintenance on a regualr basis...reindexing tables, rebuilding, etc...our
> database is relatively small (8G)but the reindexing in sql server is done in
> minutes, whereas in our old system it used to take up to 4 hrs...Is sql
> server that fast or am I doing something wrong?
> also, what routines are recommended for regular maintenance and should I do
> individually or create a plan?
> Thanks,
> Gerry
Hi Gerry... I have a script that I run that checks the fragmentation of
all my indexes, and rebuilds those that are badly fragmented. My site
is currently "in limbo", but you can obtain the script from Google's
cache. Search for
"www.realsqlguy.com/twiki/bin/view/RealSQLGuy/DefragIndexesAsNeeded"
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Monday, March 12, 2012

reindexing table with blob data type

Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advanceUnfortunately, the only way to defrag tables with BLOB columns is to rebuild
the table.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"james" <kush@.brandes.com> wrote in message
news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advance|||Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
DBREINDEX on the table.
We have this fixed in SQL Server 2005.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> Unfortunately, the only way to defrag tables with BLOB columns is to
rebuild
> the table.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "james" <kush@.brandes.com> wrote in message
> news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi! Is there a way to defrag image data type column in a table? I use dbcc
> dbreindex on the table itself during maintenance period, but I don't know
if
> that is sufficient to defrag those pages which actually stores image data
> type. We use third party application and they designed to put some
> transaction information on image data type column. Now we are experiencing
> gradual degradation on performance and wondering if it is related to image
> data type and its growth.
> Sql server 2000 sp3a
> thanks in advance
>|||Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> > Unfortunately, the only way to defrag tables with BLOB columns is to
> rebuild
> > the table.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinpub.com
> > .
> > "james" <kush@.brandes.com> wrote in message
> > news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> > Hi! Is there a way to defrag image data type column in a table? I use
dbcc
> > dbreindex on the table itself during maintenance period, but I don't
know
> if
> > that is sufficient to defrag those pages which actually stores image
data
> > type. We use third party application and they designed to put some
> > transaction information on image data type column. Now we are
experiencing
> > gradual degradation on performance and wondering if it is related to
image
> > data type and its growth.
> >
> > Sql server 2000 sp3a
> >
> > thanks in advance
> >
> >
>|||Essentially, that has the same effect. You can load the table using that
method and then add the clustered (and nonclustered) indexes.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> > Unfortunately, the only way to defrag tables with BLOB columns is to
> rebuild
> > the table.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinpub.com
> > .
> > "james" <kush@.brandes.com> wrote in message
> > news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> > Hi! Is there a way to defrag image data type column in a table? I use
dbcc
> > dbreindex on the table itself during maintenance period, but I don't
know
> if
> > that is sufficient to defrag those pages which actually stores image
data
> > type. We use third party application and they designed to put some
> > transaction information on image data type column. Now we are
experiencing
> > gradual degradation on performance and wondering if it is related to
image
> > data type and its growth.
> >
> > Sql server 2000 sp3a
> >
> > thanks in advance
> >
> >
>|||Yes, that works too. It doesn't make it worse because the two sets of text
pages (for the old and new tables) are distinct so the old ones will be
reclaimed when you drop the old table.
Nothing you can do should corrupt any of your data :-)
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"james" <kush@.brandes.com> wrote in message
news:#pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
> Thanks for the reply. How about loading the data into new table? for
> example, I create new table and load all data into it, something like
> insert into new_table
> select * from old_table
> Will the new_table have all blob pages placed contigiously?
> or will it make it worse, since essentially now there will be additional
> blob pages required under the B tree to make room for the new_table and
> old_table both?
> and finally, Can we bcp out blob data and bcp in afterwards without
> corrupting the binary data?
> I appreicate your answer
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> > Just to clarify, what Tom means is to bcp out/in the data, not to run
DBCC
> > DBREINDEX on the table.
> >
> > We have this fixed in SQL Server 2005.
> >
> > --
> > Paul Randal
> > Dev Lead, Microsoft SQL Server Storage Engine
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> > "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> > news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> > > Unfortunately, the only way to defrag tables with BLOB columns is to
> > rebuild
> > > the table.
> > >
> > > --
> > > Tom
> > >
> > > ----
> > > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > > SQL Server MVP
> > > Columnist, SQL Server Professional
> > > Toronto, ON Canada
> > > www.pinpub.com
> > > .
> > > "james" <kush@.brandes.com> wrote in message
> > > news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> > > Hi! Is there a way to defrag image data type column in a table? I use
> dbcc
> > > dbreindex on the table itself during maintenance period, but I don't
> know
> > if
> > > that is sufficient to defrag those pages which actually stores image
> data
> > > type. We use third party application and they designed to put some
> > > transaction information on image data type column. Now we are
> experiencing
> > > gradual degradation on performance and wondering if it is related to
> image
> > > data type and its growth.
> > >
> > > Sql server 2000 sp3a
> > >
> > > thanks in advance
> > >
> > >
> >
> >
>|||Just so you know, when you execute a DBCC SHRINKDATABASE and/or a DBCC
SHRINKFILE on the data files, the physical pages are relocated, just like
creating a new table, which it does. Then reindexing the clustered index
will resort the data pages themselves to be both logically and extent
defragmented.
However, if you are NOT using inline LOB segements, then there really is no
ordering to this data anyway. By having set the LOB inline, the reindex of
the cluster index will reorder to that sort.
Sincerely,
Anthony Thomas
"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> > Unfortunately, the only way to defrag tables with BLOB columns is to
> rebuild
> > the table.
> >
> > --
> > Tom
> >
> > ----
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinpub.com
> > .
> > "james" <kush@.brandes.com> wrote in message
> > news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> > Hi! Is there a way to defrag image data type column in a table? I use
dbcc
> > dbreindex on the table itself during maintenance period, but I don't
know
> if
> > that is sufficient to defrag those pages which actually stores image
data
> > type. We use third party application and they designed to put some
> > transaction information on image data type column. Now we are
experiencing
> > gradual degradation on performance and wondering if it is related to
image
> > data type and its growth.
> >
> > Sql server 2000 sp3a
> >
> > thanks in advance
> >
> >
>

reindexing table with blob data type

Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advance
Unfortunately, the only way to defrag tables with BLOB columns is to rebuild
the table.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"james" <kush@.brandes.com> wrote in message
news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advance
|||Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
DBREINDEX on the table.
We have this fixed in SQL Server 2005.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> Unfortunately, the only way to defrag tables with BLOB columns is to
rebuild
> the table.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "james" <kush@.brandes.com> wrote in message
> news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi! Is there a way to defrag image data type column in a table? I use dbcc
> dbreindex on the table itself during maintenance period, but I don't know
if
> that is sufficient to defrag those pages which actually stores image data
> type. We use third party application and they designed to put some
> transaction information on image data type column. Now we are experiencing
> gradual degradation on performance and wondering if it is related to image
> data type and its growth.
> Sql server 2000 sp3a
> thanks in advance
>
|||Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.[vbcol=seagreen]
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image
>
|||Essentially, that has the same effect. You can load the table using that
method and then add the clustered (and nonclustered) indexes.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.[vbcol=seagreen]
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image
>
|||Yes, that works too. It doesn't make it worse because the two sets of text
pages (for the old and new tables) are distinct so the old ones will be
reclaimed when you drop the old table.
Nothing you can do should corrupt any of your data :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"james" <kush@.brandes.com> wrote in message
news:#pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Thanks for the reply. How about loading the data into new table? for
> example, I create new table and load all data into it, something like
> insert into new_table
> select * from old_table
> Will the new_table have all blob pages placed contigiously?
> or will it make it worse, since essentially now there will be additional
> blob pages required under the B tree to make room for the new_table and
> old_table both?
> and finally, Can we bcp out blob data and bcp in afterwards without
> corrupting the binary data?
> I appreicate your answer
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
DBCC
> rights.
> dbcc
> know
> data
> experiencing
> image
>
|||Just so you know, when you execute a DBCC SHRINKDATABASE and/or a DBCC
SHRINKFILE on the data files, the physical pages are relocated, just like
creating a new table, which it does. Then reindexing the clustered index
will resort the data pages themselves to be both logically and extent
defragmented.
However, if you are NOT using inline LOB segements, then there really is no
ordering to this data anyway. By having set the LOB inline, the reindex of
the cluster index will reorder to that sort.
Sincerely,
Anthony Thomas

"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.[vbcol=seagreen]
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image
>

reindexing table with blob data type

Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advanceUnfortunately, the only way to defrag tables with BLOB columns is to rebuild
the table.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"james" <kush@.brandes.com> wrote in message
news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
Hi! Is there a way to defrag image data type column in a table? I use dbcc
dbreindex on the table itself during maintenance period, but I don't know if
that is sufficient to defrag those pages which actually stores image data
type. We use third party application and they designed to put some
transaction information on image data type column. Now we are experiencing
gradual degradation on performance and wondering if it is related to image
data type and its growth.
Sql server 2000 sp3a
thanks in advance|||Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
DBREINDEX on the table.
We have this fixed in SQL Server 2005.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> Unfortunately, the only way to defrag tables with BLOB columns is to
rebuild
> the table.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "james" <kush@.brandes.com> wrote in message
> news:%23mZz8vJYFHA.3712@.TK2MSFTNGP09.phx.gbl...
> Hi! Is there a way to defrag image data type column in a table? I use dbcc
> dbreindex on the table itself during maintenance period, but I don't know
if
> that is sufficient to defrag those pages which actually stores image data
> type. We use third party application and they designed to put some
> transaction information on image data type column. Now we are experiencing
> gradual degradation on performance and wondering if it is related to image
> data type and its growth.
> Sql server 2000 sp3a
> thanks in advance
>|||Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image[vbcol=seagreen]
>|||Essentially, that has the same effect. You can load the table using that
method and then add the clustered (and nonclustered) indexes.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image[vbcol=seagreen]
>|||Yes, that works too. It doesn't make it worse because the two sets of text
pages (for the old and new tables) are distinct so the old ones will be
reclaimed when you drop the old table.
Nothing you can do should corrupt any of your data :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"james" <kush@.brandes.com> wrote in message
news:#pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
> Thanks for the reply. How about loading the data into new table? for
> example, I create new table and load all data into it, something like
> insert into new_table
> select * from old_table
> Will the new_table have all blob pages placed contigiously?
> or will it make it worse, since essentially now there will be additional
> blob pages required under the B tree to make room for the new_table and
> old_table both?
> and finally, Can we bcp out blob data and bcp in afterwards without
> corrupting the binary data?
> I appreicate your answer
> "Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
> news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
DBCC[vbcol=seagreen]
> rights.
> dbcc
> know
> data
> experiencing
> image
>|||Just so you know, when you execute a DBCC SHRINKDATABASE and/or a DBCC
SHRINKFILE on the data files, the physical pages are relocated, just like
creating a new table, which it does. Then reindexing the clustered index
will resort the data pages themselves to be both logically and extent
defragmented.
However, if you are NOT using inline LOB segements, then there really is no
ordering to this data anyway. By having set the LOB inline, the reindex of
the cluster index will reorder to that sort.
Sincerely,
Anthony Thomas
"james" <kush@.brandes.com> wrote in message
news:%23pDY1UWYFHA.2796@.TK2MSFTNGP09.phx.gbl...
Thanks for the reply. How about loading the data into new table? for
example, I create new table and load all data into it, something like
insert into new_table
select * from old_table
Will the new_table have all blob pages placed contigiously?
or will it make it worse, since essentially now there will be additional
blob pages required under the B tree to make room for the new_table and
old_table both?
and finally, Can we bcp out blob data and bcp in afterwards without
corrupting the binary data?
I appreicate your answer
"Paul S Randal [MS]" <prandal@.online.microsoft.com> wrote in message
news:%23CNC7bMYFHA.3132@.TK2MSFTNGP09.phx.gbl...
> Just to clarify, what Tom means is to bcp out/in the data, not to run DBCC
> DBREINDEX on the table.
> We have this fixed in SQL Server 2005.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:#je8NBLYFHA.2348@.TK2MSFTNGP14.phx.gbl...
> rebuild
dbcc[vbcol=seagreen]
know[vbcol=seagreen]
> if
data[vbcol=seagreen]
experiencing[vbcol=seagreen]
image[vbcol=seagreen]
>

Reindexing log shipped database

Hallo
I need to setup log shipping on a DB and to create a job that would reindex
that same DB.
If I use a maintenance plan to reindex a DB that is 30 GB in size, it takes
more than 1 hour and during that time the DB is not accessible for users.
This is NOT OK so I'm planning to use a script that would use dbcc
indexdefrag.
I don't know how that would effect transaction log growth. I suspect that
log would grow very much in full-mode or in bulk-logged mode.
But that means that after i set up log shipping on that database, first log
backup after reindexation will be huge and it will take a lot of time to
transfer it over network to secondary server. During that time SQL would
probably not be accessible or time-outs would accour.
Anyone has any advice on this? Or is there any other way to reindex a
log-shipped database?
thanks
Tomyou want to Defrag the "Source" Database or the "Destination" ?
the Destination is a Standby so, essentially, read only. I dont think you
want to be defragging it.
Greg Jackson
PDX, Oregon|||I want to defrag source database. Fregmentation of destination base is not
so important to me.
Tom
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23a$pMckCFHA.1432@.tk2msftngp13.phx.gbl...
> you want to Defrag the "Source" Database or the "Destination" ?
>
> the Destination is a Standby so, essentially, read only. I dont think you
> want to be defragging it.
>
>
> Greg Jackson
> PDX, Oregon
>|||you can use IndexDefrag.
Yes the logging can be fairly extensive and it's a pain to ship the log
activity for index defrags. Defrag indexes regularly so they dont get
massively fragmented. Also monitor fill factor settings etc to reduce
fragmentation.
The database should be available...if not, what is causing it to be blocked
?
your other options are to Reseed the standby server with a full backup after
your defrag jobs.
GAJ|||You should read the whitepaper on fragmentation as it goes into details of
logging. It will also help you determine whether your query workload will
benefit from removing fragmentation regularly.
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Regards
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:OVrIHSuCFHA.2676@.TK2MSFTNGP12.phx.gbl...
> you can use IndexDefrag.
> Yes the logging can be fairly extensive and it's a pain to ship the log
> activity for index defrags. Defrag indexes regularly so they dont get
> massively fragmented. Also monitor fill factor settings etc to reduce
> fragmentation.
> The database should be available...if not, what is causing it to be
blocked
> ?
> your other options are to Reseed the standby server with a full backup
after
> your defrag jobs.
>
> GAJ
>

Reindexing log shipped database

Hallo
I need to setup log shipping on a DB and to create a job that would reindex
that same DB.
If I use a maintenance plan to reindex a DB that is 30 GB in size, it takes
more than 1 hour and during that time the DB is not accessible for users.
This is NOT OK so I'm planning to use a script that would use dbcc
indexdefrag.
I don't know how that would effect transaction log growth. I suspect that
log would grow very much in full-mode or in bulk-logged mode.
But that means that after i set up log shipping on that database, first log
backup after reindexation will be huge and it will take a lot of time to
transfer it over network to secondary server. During that time SQL would
probably not be accessible or time-outs would accour.
Anyone has any advice on this? Or is there any other way to reindex a
log-shipped database?
thanks
Tom
you want to Defrag the "Source" Database or the "Destination" ?
the Destination is a Standby so, essentially, read only. I dont think you
want to be defragging it.
Greg Jackson
PDX, Oregon
|||I want to defrag source database. Fregmentation of destination base is not
so important to me.
Tom
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23a$pMckCFHA.1432@.tk2msftngp13.phx.gbl...
> you want to Defrag the "Source" Database or the "Destination" ?
>
> the Destination is a Standby so, essentially, read only. I dont think you
> want to be defragging it.
>
>
> Greg Jackson
> PDX, Oregon
>
|||you can use IndexDefrag.
Yes the logging can be fairly extensive and it's a pain to ship the log
activity for index defrags. Defrag indexes regularly so they dont get
massively fragmented. Also monitor fill factor settings etc to reduce
fragmentation.
The database should be available...if not, what is causing it to be blocked
?
your other options are to Reseed the standby server with a full backup after
your defrag jobs.
GAJ
|||You should read the whitepaper on fragmentation as it goes into details of
logging. It will also help you determine whether your query workload will
benefit from removing fragmentation regularly.
http://www.microsoft.com/technet/pro.../ss2kidbp.mspx
Regards
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:OVrIHSuCFHA.2676@.TK2MSFTNGP12.phx.gbl...
> you can use IndexDefrag.
> Yes the logging can be fairly extensive and it's a pain to ship the log
> activity for index defrags. Defrag indexes regularly so they dont get
> massively fragmented. Also monitor fill factor settings etc to reduce
> fragmentation.
> The database should be available...if not, what is causing it to be
blocked
> ?
> your other options are to Reseed the standby server with a full backup
after
> your defrag jobs.
>
> GAJ
>

Reindexing log shipped database

Hallo
I need to setup log shipping on a DB and to create a job that would reindex
that same DB.
If I use a maintenance plan to reindex a DB that is 30 GB in size, it takes
more than 1 hour and during that time the DB is not accessible for users.
This is NOT OK so I'm planning to use a script that would use dbcc
indexdefrag.
I don't know how that would effect transaction log growth. I suspect that
log would grow very much in full-mode or in bulk-logged mode.
But that means that after i set up log shipping on that database, first log
backup after reindexation will be huge and it will take a lot of time to
transfer it over network to secondary server. During that time SQL would
probably not be accessible or time-outs would accour.
Anyone has any advice on this? Or is there any other way to reindex a
log-shipped database?
thanks
Tomyou want to Defrag the "Source" Database or the "Destination" ?
the Destination is a Standby so, essentially, read only. I dont think you
want to be defragging it.
Greg Jackson
PDX, Oregon|||I want to defrag source database. Fregmentation of destination base is not
so important to me.
Tom
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:%23a$pMckCFHA.1432@.tk2msftngp13.phx.gbl...
> you want to Defrag the "Source" Database or the "Destination" ?
>
> the Destination is a Standby so, essentially, read only. I dont think you
> want to be defragging it.
>
>
> Greg Jackson
> PDX, Oregon
>|||you can use IndexDefrag.
Yes the logging can be fairly extensive and it's a pain to ship the log
activity for index defrags. Defrag indexes regularly so they dont get
massively fragmented. Also monitor fill factor settings etc to reduce
fragmentation.
The database should be available...if not, what is causing it to be blocked
?
your other options are to Reseed the standby server with a full backup after
your defrag jobs.
GAJ|||You should read the whitepaper on fragmentation as it goes into details of
logging. It will also help you determine whether your query workload will
benefit from removing fragmentation regularly.
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Regards
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:OVrIHSuCFHA.2676@.TK2MSFTNGP12.phx.gbl...
> you can use IndexDefrag.
> Yes the logging can be fairly extensive and it's a pain to ship the log
> activity for index defrags. Defrag indexes regularly so they dont get
> massively fragmented. Also monitor fill factor settings etc to reduce
> fragmentation.
> The database should be available...if not, what is causing it to be
blocked
> ?
> your other options are to Reseed the standby server with a full backup
after
> your defrag jobs.
>
> GAJ
>

Reindexing has different behaviour in 2005

I noticed that when I use Maintenace plan wizard to create maintenance plan
to reindex a database, it runs different than it did on SQL2000.
On SQL2000, the job was running about 15 minutes on my 10GB database. During
that time there was a lot of disk activity (loging) and CPU was around 30%.
Now on SQL2005 if I run reindexing maintenance plan on the same 10 GB
database, it first utilizes CPU to maximum (one thread on hyper-threaded
CPU - 3.4GHz Xeon) and during that time there is no disk activity at all.
Profiler tells me that it selects data about database schema. That runs
about 30 minutes and after that actual reindexing begins that also couses a
lot of disk activity and lasts about 15 minutes (same as on SQL2000).
I'm a bit confused about that first 30 minutes when only CPU is doing all
the work. That part was not there in SQL2000. If it takes 30 minutes on 10GB
database, what will happen on 100GB or larger databases? Has anyone some
info if that behaviour has changed in SQL2005?
TomCan you tell us what command(s) the mp is running? You should be able to
script it out.
"Tom" wrote:

> I noticed that when I use Maintenace plan wizard to create maintenance pla
n
> to reindex a database, it runs different than it did on SQL2000.
> On SQL2000, the job was running about 15 minutes on my 10GB database. Duri
ng
> that time there was a lot of disk activity (loging) and CPU was around 30%
.
> Now on SQL2005 if I run reindexing maintenance plan on the same 10 GB
> database, it first utilizes CPU to maximum (one thread on hyper-threaded
> CPU - 3.4GHz Xeon) and during that time there is no disk activity at all.
> Profiler tells me that it selects data about database schema. That runs
> about 30 minutes and after that actual reindexing begins that also couses
a
> lot of disk activity and lasts about 15 minutes (same as on SQL2000).
> I'm a bit confused about that first 30 minutes when only CPU is doing all
> the work. That part was not there in SQL2000. If it takes 30 minutes on 10
GB
> database, what will happen on 100GB or larger databases? Has anyone some
> info if that behaviour has changed in SQL2005?
> Tom
>
>

reindex versus maintenance plan

Hi,
I would like to reindex all the tables in my database by using a job
instead of a maintenance plan. In a maintenance plan this is possible with
the checkbox: "reorganize data and index pages". How can I do the same thing
in a script without using DDBC REINDEX for every table?Can use sp_msForEachTable system procedure for the same. Like
EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Jo Segers" <segers_jo@.hotmail.com> wrote in message
news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I would like to reindex all the tables in my database by using a job
> instead of a maintenance plan. In a maintenance plan this is possible with
> the checkbox: "reorganize data and index pages". How can I do the same
thing
> in a script without using DDBC REINDEX for every table?
>
>|||Thanks,
This solved my problem.
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> schreef in bericht
news:ePhnW9eIEHA.3376@.TK2MSFTNGP09.phx.gbl...
> Can use sp_msForEachTable system procedure for the same. Like
> EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
>
> "Jo Segers" <segers_jo@.hotmail.com> wrote in message
> news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > I would like to reindex all the tables in my database by using a job
> > instead of a maintenance plan. In a maintenance plan this is possible
with
> > the checkbox: "reorganize data and index pages". How can I do the same
> thing
> > in a script without using DDBC REINDEX for every table?
> >
> >
> >
>|||Here is what I use to dbcc indexDefrag all indexes each night:
--***********************************************************************
DECLARE @.Table sysname
DECLARE @.Indid Int
DECLARE cur_tblFetch CURSOR FOR
SELECT Table_Name from information_Schema.tables where table_type = 'base
table'
OPEN cur_tblFetch
FETCH NEXT From cur_tblFetch INTO @.Table
While @.@.FETCH_STATUS = 0
BEGIN
DECLARE cur_indFetch CURSOR FOR
SELECT indid FROM SysIndexes WHERE id = Object_ID(@.Table) AND keycnt > 0
OPEN cur_indFetch
FETCH NEXT FROM cur_indFetch INTO @.Indid
WHILE @.@.FETCH_STATUS = 0
BEGIN
IF @.Indid <> 255
BEGIN
DBCC INDEXDEFRAG(Creditnet,@.Table,@.Indid) WITH NO_INFOMSGS
END
FETCH NEXT FROM cur_indFetch INTO @.Indid
END
CLOSE cur_IndFetch
DEALLOCATE cur_IndFetch
FETCH NEXT FROM cur_tblFetch INTO @.Table
END
CLOSE cur_tblFetch
DEALLOCATE cur_tblFetch
EXEC sp_updatestats
--***********************************************************************
cheers,
Greg Jackson
PDX, Oregon

reindex versus maintenance plan

Hi,
I would like to reindex all the tables in my database by using a job
instead of a maintenance plan. In a maintenance plan this is possible with
the checkbox: "reorganize data and index pages". How can I do the same thing
in a script without using DDBC REINDEX for every table?
Can use sp_msForEachTable system procedure for the same. Like
EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Jo Segers" <segers_jo@.hotmail.com> wrote in message
news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I would like to reindex all the tables in my database by using a job
> instead of a maintenance plan. In a maintenance plan this is possible with
> the checkbox: "reorganize data and index pages". How can I do the same
thing
> in a script without using DDBC REINDEX for every table?
>
>
|||Thanks,
This solved my problem.
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> schreef in bericht
news:ePhnW9eIEHA.3376@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Can use sp_msForEachTable system procedure for the same. Like
> EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinf...2000/books.asp
>
> "Jo Segers" <segers_jo@.hotmail.com> wrote in message
> news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
with
> thing
>
|||Here is what I use to dbcc indexDefrag all indexes each night:
--************************************************** *********************
DECLARE @.Table sysname
DECLARE @.Indid Int
DECLARE cur_tblFetch CURSOR FOR
SELECT Table_Name from information_Schema.tables where table_type = 'base
table'
OPEN cur_tblFetch
FETCH NEXT From cur_tblFetch INTO @.Table
While @.@.FETCH_STATUS = 0
BEGIN
DECLARE cur_indFetch CURSOR FOR
SELECT indid FROM SysIndexes WHERE id = Object_ID(@.Table) AND keycnt > 0
OPEN cur_indFetch
FETCH NEXT FROM cur_indFetch INTO @.Indid
WHILE @.@.FETCH_STATUS = 0
BEGIN
IF @.Indid <> 255
BEGIN
DBCC INDEXDEFRAG(Creditnet,@.Table,@.Indid) WITH NO_INFOMSGS
END
FETCH NEXT FROM cur_indFetch INTO @.Indid
END
CLOSE cur_IndFetch
DEALLOCATE cur_IndFetch
FETCH NEXT FROM cur_tblFetch INTO @.Table
END
CLOSE cur_tblFetch
DEALLOCATE cur_tblFetch
EXEC sp_updatestats
--************************************************** *********************
cheers,
Greg Jackson
PDX, Oregon
|||I have been looking for a resolution to this as well. Thank you for this information! I have another question - how do I write this if I need to do a fill factor of 90?
-- Vinodk wrote: --
Can use sp_msForEachTable system procedure for the same. Like
EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Jo Segers" <segers_jo@.hotmail.com> wrote in message
news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> instead of a maintenance plan. In a maintenance plan this is possible with
> the checkbox: "reorganize data and index pages". How can I do the same
thing[vbcol=seagreen]
> in a script without using DDBC REINDEX for every table?

reindex versus maintenance plan

Hi,
I would like to reindex all the tables in my database by using a job
instead of a maintenance plan. In a maintenance plan this is possible with
the checkbox: "reorganize data and index pages". How can I do the same thing
in a script without using DDBC REINDEX for every table?Can use sp_msForEachTable system procedure for the same. Like
EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Jo Segers" <segers_jo@.hotmail.com> wrote in message
news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I would like to reindex all the tables in my database by using a job
> instead of a maintenance plan. In a maintenance plan this is possible with
> the checkbox: "reorganize data and index pages". How can I do the same
thing
> in a script without using DDBC REINDEX for every table?
>
>|||Thanks,
This solved my problem.
"Vinodk" <vinodk_sct@.NO_SPAM_hotmail.com> schreef in bericht
news:ePhnW9eIEHA.3376@.TK2MSFTNGP09.phx.gbl...
> Can use sp_msForEachTable system procedure for the same. Like
> EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>
> "Jo Segers" <segers_jo@.hotmail.com> wrote in message
> news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
with
> thing
>|||Here is what I use to dbcc indexDefrag all indexes each night:
-- ****************************************
*******************************
DECLARE @.Table sysname
DECLARE @.Indid Int
DECLARE cur_tblFetch CURSOR FOR
SELECT Table_Name from information_Schema.tables where table_type = 'base
table'
OPEN cur_tblFetch
FETCH NEXT From cur_tblFetch INTO @.Table
While @.@.FETCH_STATUS = 0
BEGIN
DECLARE cur_indFetch CURSOR FOR
SELECT indid FROM SysIndexes WHERE id = Object_ID(@.Table) AND keycnt > 0
OPEN cur_indFetch
FETCH NEXT FROM cur_indFetch INTO @.Indid
WHILE @.@.FETCH_STATUS = 0
BEGIN
IF @.Indid <> 255
BEGIN
DBCC INDEXDEFRAG(Creditnet,@.Table,@.Indid) WITH NO_INFOMSGS
END
FETCH NEXT FROM cur_indFetch INTO @.Indid
END
CLOSE cur_IndFetch
DEALLOCATE cur_IndFetch
FETCH NEXT FROM cur_tblFetch INTO @.Table
END
CLOSE cur_tblFetch
DEALLOCATE cur_tblFetch
EXEC sp_updatestats
-- ****************************************
*******************************
cheers,
Greg Jackson
PDX, Oregon|||I have been looking for a resolution to this as well. Thank you for this in
formation! I have another question - how do I write this if I need to do a
fill factor of 90?
-- Vinodk wrote: --
Can use sp_msForEachTable system procedure for the same. Like
EXEC sp_msForEachTable 'DBCC DBREINDEX (''?'')'
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Jo Segers" <segers_jo@.hotmail.com> wrote in message
news:%23pu65zeIEHA.1944@.TK2MSFTNGP11.phx.gbl...
> Hi,
> instead of a maintenance plan. In a maintenance plan this is possible with
> the checkbox: "reorganize data and index pages". How can I do the same
thing[vbcol=seagreen]
> in a script without using DDBC REINDEX for every table?

Friday, March 9, 2012

Reindex Maintenance Plan starts with 15hours delay

Hey there,

on a SS2005 Build 3152 i've scheduled a mp with reindexing a 120 GB db. The mp is scheduled to start every sunday at 08.00am.

In the agents history log i can see that it start its job at 8.00am, but the first reindex starts at 11:xxpm. In the mp history log i can see that it starts at 11:xx pm.

Why do I have such a big delay? Is the job waiting because of some locks, or does the job have to check some things before reindexing? But 15 hours? Is it a bug in mp?

Any ideas?

Thanks in advance
tobiasHi,

does nobody have an idea?

regards
tobias
|||

I would like to know what options you have selected on the MP when you have scheduled this job. Also I would ask whether you have applied SP2 for SQL.

120GB database I would expect it will take some time to finish the maintenance tasks and also check what other processes are running.

|||SP2 and http://support.microsoft.com/kb/933097/en-us are applied.

Other jobs are regular transaction-protocol-backups. The workload on sundays is very low, just a view automatic tasks write to the db.

The MP has to tasks.

1. Reindex
o Connection: Local Server
o Databasese: The ERP Database
o Objects: Table & Views
o Selection:
o % Freespace per Page: 10%
o Sort in TempDB: No
o Index Online: No

2. History Cleanup
o cleans everything older than 4 Month

reindex maintenance plan

We have created a maitenance plan that reindex all our tables. Usually it
works, ocassionaly it halts the entire system moments after starting. I
assume this is a reindex issue and not a maintenance plan issue. Any
suggestions on where I can being my search for a fix?
TIA
Paul
not exactly sure what you mean by "Halts Entire System". However, the
maintenance plan wizard uses DBCC DBReindex for index maintenance. DBReindex
places exclusive table locks on tables being defragged.
You may want to consider using your own custom index maintenance routines
and implementing index maintenance via "DBCC IndexDefrag" instead.
cheers
Greg Jackson
Portland, OR
|||The MP uses DBCC DBREINDEX which will attempt to use all available
processors to do the work in as short a time as possible. It will use 100%
or close to that amount of all the processors for some period of time
throughout the process. While it is reindexing a table that particular table
is off line for the duration of the reindex process on that table. If the
use of all the processors is too much of a load you can set thee MAXDOP at
the server level to limit how many are used by any one source. Of coarse
this type of activity should be done when there is little load on the
server.
Andrew J. Kelly SQL MVP
"itchicago" <itchicago@.discussions.microsoft.com> wrote in message
news:05750327-FB10-4E25-82E6-650381C0BCDC@.microsoft.com...
> We have created a maitenance plan that reindex all our tables. Usually it
> works, ocassionaly it halts the entire system moments after starting. I
> assume this is a reindex issue and not a maintenance plan issue. Any
> suggestions on where I can being my search for a fix?
> TIA
> Paul
|||To add to Greg's reply, you should read the whitepaper below which explains
when and how to get rid of index fragmentation. Usually, rebuilding all
indexes in a database is a wasted operation and you can be much more
selective. DBREINDEX will take a X lock (i.e. unavailable for read/write) on
a table if the clustered index is being rebuilt, but only an S lock
(unavailable for write) on the table if a non-clustered index is being
rebuilt. You can use Example E that I wrote for BOL for DBCC SHOWCONTIG as a
good starting point for a custom defrag job.
http://www.microsoft.com/technet/pro.../ss2kidbp.mspx
Regards
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:#qDYI9SDFHA.2876@.TK2MSFTNGP12.phx.gbl...
> not exactly sure what you mean by "Halts Entire System". However, the
> maintenance plan wizard uses DBCC DBReindex for index maintenance.
DBReindex
> places exclusive table locks on tables being defragged.
> You may want to consider using your own custom index maintenance routines
> and implementing index maintenance via "DBCC IndexDefrag" instead.
>
> cheers
> Greg Jackson
> Portland, OR
>

reindex maintenance plan

We have created a maitenance plan that reindex all our tables. Usually it
works, ocassionaly it halts the entire system moments after starting. I
assume this is a reindex issue and not a maintenance plan issue. Any
suggestions on where I can being my search for a fix?
TIA
Paulnot exactly sure what you mean by "Halts Entire System". However, the
maintenance plan wizard uses DBCC DBReindex for index maintenance. DBReindex
places exclusive table locks on tables being defragged.
You may want to consider using your own custom index maintenance routines
and implementing index maintenance via "DBCC IndexDefrag" instead.
cheers
Greg Jackson
Portland, OR|||The MP uses DBCC DBREINDEX which will attempt to use all available
processors to do the work in as short a time as possible. It will use 100%
or close to that amount of all the processors for some period of time
throughout the process. While it is reindexing a table that particular table
is off line for the duration of the reindex process on that table. If the
use of all the processors is too much of a load you can set thee MAXDOP at
the server level to limit how many are used by any one source. Of coarse
this type of activity should be done when there is little load on the
server.
Andrew J. Kelly SQL MVP
"itchicago" <itchicago@.discussions.microsoft.com> wrote in message
news:05750327-FB10-4E25-82E6-650381C0BCDC@.microsoft.com...
> We have created a maitenance plan that reindex all our tables. Usually it
> works, ocassionaly it halts the entire system moments after starting. I
> assume this is a reindex issue and not a maintenance plan issue. Any
> suggestions on where I can being my search for a fix?
> TIA
> Paul|||To add to Greg's reply, you should read the whitepaper below which explains
when and how to get rid of index fragmentation. Usually, rebuilding all
indexes in a database is a wasted operation and you can be much more
selective. DBREINDEX will take a X lock (i.e. unavailable for read/write) on
a table if the clustered index is being rebuilt, but only an S lock
(unavailable for write) on the table if a non-clustered index is being
rebuilt. You can use Example E that I wrote for BOL for DBCC SHOWCONTIG as a
good starting point for a custom defrag job.
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
Regards
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:#qDYI9SDFHA.2876@.TK2MSFTNGP12.phx.gbl...
> not exactly sure what you mean by "Halts Entire System". However, the
> maintenance plan wizard uses DBCC DBReindex for index maintenance.
DBReindex
> places exclusive table locks on tables being defragged.
> You may want to consider using your own custom index maintenance routines
> and implementing index maintenance via "DBCC IndexDefrag" instead.
>
> cheers
> Greg Jackson
> Portland, OR
>