CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN — Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved. — Purpose: To search all columns of all tables for a given search string — Written by: Narayana Vyas Kondreddi — Site: http://vyaskn.tripod.com — Tested on: SQL Server 7.0 and SQL Server 2000 — Date modified: [...]
Missing ldf file Solution You can attach a database without the logfile by attaching, then clicking the logfile location, and click the remove button. After you click OK a new logfile will be created for your database
DBCC statememnts act as Database Console commands. You can use the below listed queries, sprcifically the DBCC ones to shrink your transaction log. – To GET the name of the log and data files select name from dbo.sysfiles – SEE the active transactions as well as the File ID dbcc loginfo(‘db_Name’) – Mark transactions inactive [...]
Reference EXEC sp_MSforeachtable @command1 = “DELETE FROM ?” EXEC sp_MSforeachtable @command1 = “TRUNCATE TABLE ?” —— You won’t be able to run TRUNCATE against all tables if you have foreign keys references Here is one way to circumvent that – First disable referential integrity EXEC sp_MSForEachTable ‘ALTER TABLE ? NOCHECK CONSTRAINT ALL’ GO EXEC sp_MSForEachTable [...]
Error: Failed to open malformed assembly ‘mscorlib’ with HRESULT 0×80070008. If you are sure your SQL query is correct trying having your webhost restart the SQL server engine. This error could mean the SQL process does not have enough memory to process your request.. other error: There is insufficient system memory in resource pool to [...]