Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I perform maintenance on my CAREWare database?

0
Posted

How can I perform maintenance on my CAREWare database?

0

The SQL Server database occasionally needs maintenance particularly if you have a large amount of data. In a future build, we will have some maintenance features built into CAREWare, but for now here is a way to manually do this maintenance. NOTE: As always, before beginning you should make a backup of the database. Never do any significant operations without first making a good backup. NOTE – This may take a long time (like hours) and you will not be able to use the database during that time! 1) Stop the CAREWare business tier, to ensure that no one will try to access the database during this time. 2)Open Enterprise Manager or Craig’s SQL Manager paste this into a query window: USE cw_data DECLARE @TableName varchar(255) DECLARE TableCursor CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_type = ‘BASE TABLE’ OPEN TableCursor FETCH NEXT FROM TableCursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN DBCC DBREINDEX(@TableName,”,90) FETCH NEXT FROM TableCursor INT

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123