Microsoft SQL Server tables should never contain duplicate rows, nor non-unique primary keys. For brevity, we will sometimes refer to primary keys as "key" or "PK" in this article, but this will always denote "primary key." Duplicate PKs are a violation of entity integrity, and should be disallowed in a relational system. SQL Server has … Continue reading Find Duplicate Records in SQL Server
Author: Shadab Mohammad
Automate and Improve Your Database Maintenance Using Ola Hallengren’s Free Script
One of the most amazing SQL Server script available for maintenance tasks on SQL Server 2005 and onwards. The scripts are much better than the maintaince task wizard which comes along with SQL Server 2005. A must have for novice as well as experienced DBA's. Read More..
Managing Transaction Logs
What is the Transaction Log? At its simplest, the transaction log is a log of all transactions run against a database and all database modifications made by those transactions. The transaction log is a critical part of the database’s architecture. The transaction log is not an audit log. It’s not there so that the DBA … Continue reading Managing Transaction Logs
Microsoft SQL Server for Oracle Professionals.
Database Architecture In Oracle, a database refers to the entire Oracle RDBMS environment and includes the following components: • Oracle database processes and buffers (instance). • SYSTEM tablespace containing one centralized system catalog, which is made up of one or more datafiles. • Other optional tablespaces as defined by the database administrator (DBA), each made … Continue reading Microsoft SQL Server for Oracle Professionals.
A connection was succesfully established with the server but then an error occured during pre-login handshake(provider SSL ,error:0)
You get an error in SQL Server 2005 like: A connection was succesfully established with the server but then an error occurred during pre-login handshake(provider SSL ,error:0).................. Most likely you cant connect to management studio. In this scenario sometimes you can make remote connections from another client. The easiest solution is to run "cliconfg.exe" network … Continue reading A connection was succesfully established with the server but then an error occured during pre-login handshake(provider SSL ,error:0)
Trucate Transaction Log in SQL Server 2000/2005
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
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)
