In SQL Server, it is important to keep the size of the transaction log at a decent size. If the transaction log fills up your disk drive. It can hang up the database. T-log is like archived redo log files in oracle database. Instead of storing multiple files, SQL server stores the t-log as a … Continue reading Trucate Transaction Log in SQL Server 2000/2005
Month: May 2010
Backup SQL Server 2005 Script
1) Create a text file and name it Backup_All_Databases.sql (or what ever you want). 2) Paste the below script in it: Code: DECLARE @BackupFile varchar(255), @DB varchar(30), @Description varchar(255), @LogFile varchar(50) DECLARE @Name varchar(30), @MediaName varchar(30), @BackupDirectory nvarchar(200) SET @BackupDirectory = 'C:\Backuped_SQL_DB\' --Add a list of all databases you don't want to backup to this. … Continue reading Backup SQL Server 2005 Script
SQL Server for Oracle Professionals.
Download : SQLServer2008forOracleDba.docx
Restore SQL Server 2005 to a new server.
Download : Restore SQl Server 2005.docx
Create new table from old table and rebuild its indexes
osql -U sa password: ***** 1. Insert into already created table. use <name-of-database> insert into EQcust (*) select * from EQCUSTTemp; go 2. Insert into a new table ( replicate a table) use <name-of-database> SELECT * INTO EQtest FROM EQCUSTTemp 3. Rebuild index online use <name-of-database> ALTER INDEX ALL ON EQCUSTTemp REBUILD WITH(ONLINE = ON)