Still I have problem with the DBCC DBReindex which results in large size transaction log equivalent to the backup even after I tried the checkpoint command after this job doesn't change anything.
(as we cannot change to DBCC INDEXDEFRAG for all the indexes. )
Is that Ok if we have a truncate log on checkpoint set to true when this job runs and make the truncate log on checkpoint to false after the job
I had to reinstall my local copy of SQL a few weeks ago, which naturally overwrote the
msdb.dbo.sysmanagement_shared_server_groups_internal and msdb.dbo.sysmanagement_shared_registered_servers_internal tables.
However I still have the local XML file that SSMS reads so I can still access the groups, I just get weird errors when trying to re-register my install as the new CMS. How to rebuilt those tables from the XML file or know of a way to repopulate?
I'm quite new to SQL 2000 and I've been trying to find an easy way to truncate a number of tables in a script. The table names are all prefixed with 'RESULTS_' so they are easy enough to identify. Is this fairly straightforward?
I am attempting to how to truncate list of tables using STP. That is decalre a cursor for a list table names and then to truncate the table names one by one.
The code below shows what I want to achieve. I want to truncate all the tables with names beginning with ZZ but this is failing. I have tried using both delete and truncate.
DECLARE ZZtablenames_cursor CURSOR FOR select [name] from sysobjects WHERE [xtype] = 'U' and name like 'ZZ %'
OPEN ZZtablenames_cursor
FETCH NEXT FROM ZZtablenames_cursor into @tablename WHILE @@FETCH_STATUS = 0 BEGIN set @localname = '[' + @tablename + ']' TRUNCATE + @localname FETCH NEXT FROM ZZtablenames_cursor END
CLOSE ZZtablenames_cursor DEALLOCATE ZZtablenames_cursor
GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
I was just looking at an SSIS package someone else set up and I went into one of the execute SQL tasks and it is calling a stored procedure to truncate a table. There are a lot of places that tables are truncated within this SSIS package. But each one the 'database', 'owner', and 'table' name are hard coded.
Like this: exec dbo.uspTruncateTable 'dbname', 'dbo', 'tblname'
Of course there are different names, just changed for an example.
I have 600 tables in my database, out of which 40 tables are look up value tables. I want generate truncate scripts which truncates all the tables in order of Parent child relationship excluding lookup tables. Is there any way to do this apart from figuring out Parent Child relationship and then writing the truncate statements for each of the table.
For example
EmployeeDetail table references Employee table DepartmentDetail table references Department table Department table references Employee table
I have 600 tables in my database, out of which 40 tables are look up value tables. I want generate truncate scripts which truncates all the tables in order of Parent child relationship excluding lookup tables. Is there any way to do this apart from figuring out Parent Child relationship and then writing the truncate statements for each of the table.
For example
EmployeeDetail table references Employee table DepartmentDetail table references Department table Department table references Employee table
With a database size of almost 2 GB, I run the 'truncate table eventlog command' which completes successfully, but the database size only decreases by about 10 MB so stays too large - indeed the number of rows in the eventlog table is minimal, but the otehr tables in this database don't show such an amount of tables large enough to cause the size issue either. What could be the reason and how can I reduce it (possibly truncating another table but then which one, how could I determine which is too large and needs truncating?).
I have a requirement to only rebuild the Clustered Indexes in the table ignoring the non clustered indexes as those are taken care of by the Clustered indexes.
In order to do that, I have taken the records based on the fragmentation %.
But unable to come up with a logic to only consider rebuilding the clustered indexes in the table.
Please forgive the elementary nature of my question, but could someone please explain the differences between these two database backup types:
1. Log backup 2. Log backup no truncate
From what I understand and have read, the "no truncate" backup method keeps the entire transaction log indefinitely. Using the truncation method, the transaction log is either 1) compressed or 2) cleaned up so that any completed transactions are removed from the log. Which one of these is true?
And, for the big question: is it better to run a backup of the transaction log with truncation or not? Our current backup scheme is similar to the following:
Full backup every 24 hours transaction log backup every hour with no truncation
Should we insert a truncation backup somewhere in here? What is the danger of removing (or compressing) parts of the transaction log? Will this affect the restore process?
Can anyone advise on issues arising from a complete format & rebuild of a SQL server. The machine exists in a small domain and contains 1 small 30 MB production database which I would want to back up and restore to the newly built server. What are the issues with maintaining permissions? etc.
I had to reinstall sql 6.5 on my server. However I am not sure of the correct sequence to resetup my databases. I have all of my original database devices and backups. However when reinstalling I no longer see the database devices or databases( excepected). How do I recreate my database devices using the devices that I have on an existing device. I need sql to recognize these devices then I can recreate my databases and do my restores. Please help!
I have a SQL Server 7 box that is shortly to be rebuilt completely (still on NT4, but with new RAID system), does anyone have any advice on how I can make the transition as painless as possible? Particularly, I want to maintain the backup, security and DTS structures as much as possible.
Hi All, SQL 7 REQUIRES THE DBA TO MANAGE THE INDEXES AND IN PARTICULAR THE FILL FACTOR AVAILABILITY. DOES SQL SERVER 2000 AUTOMATICALLY ADDRESS THIS OR DO WE STILL HAVE TO PERIODICALLY RUN,
I understand the difference between REBUILD and REORGANIZE. Just wondering if you can do both in the same script or do you have to rebuild the index first and later reorganize?
In the maintance plans there is a Rebuild Index choice. If u choose tables and views the plan executes ALTER INDEX <index> ON <table> ;REBUILD for all indexes in the datebase. I am currently using this plan on our production DB, scheduled for every Saturday night. I wonder if there is a downside of using maintance plans. Because it seems to be doing the job. Any comments?
I am upgrading from SQL2000 to SQL2005. I have restored my 2000 db to 2005. I have changed the Compatiblilty level to 90. Now I need to reindex. How do I reindex all the tables at once? Thanks for ALL your help r/p
Rebuild Index job for user db's is failing, one user db is a huge size 120 GB. The job scheduled to run every sunday 1 AM
I found the below error in log report
Rebuild Index Task (server name) Rebuild index on Local server connection Databases: All user databases Object: Tables and views Original amount of free space Task start: 01/13/2008 1:26 AM. Task end: 01/13/2008 2:38 AM. Failed-1073548784) Executing the query "ALTER INDEX [Idx_CISCO_WLC_EVENTID] ON [dbo].[CISCO_WLC_200711262137] REBUILD WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, SORT_IN_TEMPDB = OFF, ONLINE = OFF ) " failed with the following error: "Cannot find the object "dbo.CISCO_WLC_200711262137" because it does not exist or you do not have permissions.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
will maintenance tasks like rebuilding and reorganizing indexes be replicated in transactional replication, or do i have to setup these management tasks on the subscribers as well?
Is there a "generic" script I may run to delete the tables and stored procedures to a SqlServer 2000 database.I would really like to delete every table and stored procedure I have created as quickly and efficiently as possible.
I have a table with over 60 million rows (approx 20GB) which has an indexed column. I have tried using DBC DBReindex to rebuild the index, but after kicking it off on a friday, it is still running the following wednesday. Since managers and other finicky types access this database, that's not acceptable (it slows down their reporting).
Is there a way to speed up the reindexing process? Perhaps by adding space to the tempdb (it's 500MB) or putting it in RAM temporarily? I haven't seen any articles that specifically state that TEMPDB is used during an index rebuild, but it seems logical that it would be.
Any suggestions to speed up the process would be most appreciated!
I am performing a Rebiuld of the Master database using the REBUILDM utility on a SQL 2000 SP3 database which is clustered. The utility starts off correclty, copying the correct MDF and LDF files to the hard drive, and the configuration bar goes across the screen 4 times, before giving the following error "Rebuild master failed with error -1".
I can't find anything on microsoft. I followed KB-298568 to perform this process, but the SQL Service will now not start as it cannot find the master, as it did not get rebuilt properly.
I have included screen shots of the error, in the zipped up word doc.
I did Index defragmentation a week ago . for 1 database only , In the middle of rebuild I kill the process twice cause It takes more than 1 hour so I killed it and wonder how many high level fragmented indexes left ...