Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Database Rebuild

Status
Not open for further replies.

michelle305

Technical User
Apr 7, 2010
56
US
Is there any harm to performing a REBUILD if not needed? Would it be better insert a column that is missing via sql?

Rebuild to resolve an issue like that is overkill? Thoughts???

Thanks.

 
Can you explain a little more as to why you would want to do this and also what system you are running?
 
RES 5.2
They MAY be on SQL16?
stored procedure for purgehistory failed with sp_0 error.
solution says to insert missing column "R_dtl_seq with an attached sql statement.
Someone ran a rebuild of db which resolved. I have 2 issues with that:
-no .bad or db errors - why rush to rebuild
-would more issues arise w/rebuild either fix is good

 
Rebuilding your db won't hurt anything, and was the right way to go in my opinion. I generally run a rebuild on all of our Micros servers at least once a year. There are strange things that happen within databases - orphaned records, bloated empty space, etc... Rebuilding fixes a lot of that. All it does is basically extract all of your data, create database shell, and dump your valid data back into it. Anything that was corrupted gets tossed.

Micros is very picky about database objects. If you added it in and missed a foreign key relationship there's always a chance that a future upgrade may fail, or that the data from that view may be inaccurate or missing altogether.


That R_dtl_seq column is actually in the vta_RefDtl view:

Code:
create view micros.vta_RefDtl( R_trans_seq,
  R_dtl_seq,
  R_ref ) 
  as(select R.parent_trans_seq,
    R.parent_dtl_seq,
    R.ref
    from micros.ref_dtl as R)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top