Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL STMT for Maintaining

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-21 : 22:29:44
Alex writes "I have a document management system sitting on a sql server. I have found a script wich says it should run daily and is part of maintaining the database. I ran the script but it fails and does not give a reason. We have SQL 7.0 on an NT4.0 server and the script is as follows:

use master
go
sp_dboption dbname, 'single', true
go use dbname
go
checkpoint
go
use master
go
dbcc checkalloc (dbname) with no_infomsgs
go
dbcc checkdb (dbname) with no_infomsgs
go
dbcc checkcatalog (dbname) with no_infomsgs
go
sp_dboption sbname, 'single', false
go use dbname
go
checkpoint
go"

dsdeming

479 Posts

Posted - 2002-04-22 : 08:06:17
When I try to run 'go use pubs' in Query Analyzer it tells me

Could not find stored procedure 'go'.

You statement contains similar syntax: go use dbname. Try putting a carriage return between 'go' and 'use'.

Go to Top of Page
   

- Advertisement -