Re: Error when rebuild table index



Hi Andrew,
You are right, and The table has a computed column. Since my SQL Server is
SP4. I followed the instruction in the article and added -CkDB
-SupportComputedColumn' in the job command. The job command is as follows.

EXECUTE master.dbo.xp_sqlmaint N'-PlanID
AC13D3D2-F803-49E4-A562-2B4C25B7C77D -Rpt "C:\Program Files\Microsoft SQL
Server\myservername\LOG\DB Maintenance Plan-correction0.txt" -DelTxtRpt
4WEEKS -WriteHistory -RebldIdx 10 -RmUnusedSpace 50 10 -CkDB
-SupportComputedColumn'

Now I got another error, and says.

Microsoft (R) SQLMaint Utility (Unicode), Version [Microsoft SQL-DMO (ODBC
SQLState: 08001)] Error 0: [Microsoft][ODBC SQL Server Driver][Shared
Memory]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).

The original command is as follows.

EXECUTE master.dbo.xp_sqlmaint N'-PlanID
AC13D3D2-F803-49E4-A562-2B4C25B7C77D -Rpt "C:\Program Files\Microsoft SQL
Server\ myservername \LOG\DB Maintenance Plan-correction0.txt" -DelTxtRpt
4WEEKS -WriteHistory -RebldIdx 10 -RmUnusedSpace 50 10 '

By the way, is there way to directly add SupportComputedColumn' parameter in
the property of maintenance plan wizard instead of command line?

Thanks for your help.

Charts


"Andrew J. Kelly" wrote:

> Sounds like you have a computed column in the table. The maintenance wizard
> can not properly handle those. If you have SP4 then try this:
> http://support.microsoft.com/?kbid=902388
>
> Otherwise the solution is to create your own scheduled job that issues a
> DBCC DBREINDEX for that table (or all of them) and set the proper SET
> settings there.
>
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Charts" <Acharts@xxxxxxxxxxxxxxxx> wrote in message
> news:6752D209-A390-44C7-95EC-28B2B6BBF135@xxxxxxxxxxxxxxxx
> >I ran maintenance plan trying to rebuild index for the database tables, and
> >I
> > got following error.
> >
> > [22] Database CmpData: Index Rebuild (leaving 10%% free space)...
> >
> > Rebuilding indexes for table 'cliStores'
> > Rebuilding indexes for table 'cmpItems'
> > Rebuilding indexes for table 'cmpStores'
> > [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC
> > SQL
> > Server Driver][SQL Server]DBCC failed because the following SET options
> > have
> > incorrect settings: 'QUOTED_IDENTIFIER, ARITHABORT'.
> >
> > I run following set command.
> > SET ANSI_DEFAULTS ON
> > But error remains. Please help. Thanks,
> > Charts
> >
>
>
>
.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: Can I get Consultancy advice on SQL/Fox in the UK (South East)
    ... My problem is the two Sequel Server tables within one database with which I ... Don't ask me why but the SQL designers have NOT ... command that I can initiate with SQLCONNECT, ... > While you're in the View Designer, right-click and view the SQL code. ...
    (microsoft.public.fox.helpwanted)
  • Re: Optimistic Concurrency on UpdateCommand...
    ... client device, I update that column with a non-null datetime and then try to ... 1!!!If I copy and paste the command ... With the 4th column not allowing nulls, the optimistic concurrency code ... Can I have a nullable datetime column in my Sql ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Select - SQL vs. SUM
    ... If you have to use an earlier version of VFP earlier than 9, ... >> also force VFP to read from the buffer with a new clause in the SQL ... >> The SELECT command doesn't move the record pointer in the grid's record ... >>> I have a grid whose recordsource is a table named _payments. ...
    (microsoft.public.fox.programmer.exchange)