SQL Server – Insert same value multiple time in SQL table

  Here is an example:  Inserting same value multiple time in SQL table USE testdb GO CREATE TABLE table1 ( id INT IDENTITY(1,1), name VARCHAR(255), address VARCHAR(255) ) SELECT * FROM testdb..table1 INSERT INTO testdb..table1 VALUES (‘Varinder’,’ABC Street’) go 5 Result :  

» Read more

SQL Server – Understanding of Replication

The primary purpose of replication is to distribute data from a master database to one or more secondary databases. Because Replication maintains a duplicate copy of data in synchronization with the master copy, the technology can be used to provide availability for application. Type of Replication Snapshot Transactional Merge Snapshot Replication Snapshot Replication takes the entire set of data and sends it during the each cycle of replication. This is full copy of data that is sent by Publisher to

» Read more

SQL Server Azure

Microsoft Webcast topic: “Introduction to SQL Azure (Level 100)” Sharing with brief introduction and difference between SQL Servers and SQL Azure SQL Azure is a highly available and scalable cloud database service built on SQL Server technologies. With SQL Azure, developers do not have to install, setup, and patch or manage any software. High availability and fault tolerance is built-in and no physical administration is required. Additionally, developers can get productive on SQL Azure quickly by using the same familiar

» Read more

SQL Server – Distributing and Partitioning

Key Points of Distributing and Partitioning Partition allow you to divide a table or index into multiple filegroups. Table and index are partition horizontally, based on rows by specifying a partitioning column. To create a portioned table or index you need to perform the following actions: Create a partition function Create a partition schema mapped to partition function Create a table or index on the partition schema SPLIT function to add a new boundary point and hence partition. MERGE function

» Read more

SQL Server – Understanding the System Databases of SQL Server

We all know there are some system databases available in SQL Server. But we should have understanding about system databases. Here just try to give you understanding of system databases very briefly. There are four system databases available in SQL Server 2008 Master Model msdb tempdb Master Database The master database records all the system-level information for a SQL Server system. The master is the database that records the existence of all other databases and the location of those database

» Read more

Add the value into an Identity Column in SQL Server

Identity columns are commonly used as primary keys in database tables. These columns automatically assign a value for each new row inserted. But sometime Identity columns  missed the value, we want to insert missed value into the column. For that we need to enable IDENTITY_INSERT for the table. USE mytempDB GO CREATE TABLE myTable ( myIdentity INT NOT NULL IDENTITY(1,1) PRIMARY KEY, myValue NVARCHAR(30) NOT NULL ) GO INSERT myTable(myIdentity, myValue) VALUES (5, ‘Varinder Sandhu’) –Result =  Error because IDENTITY

» Read more

Find EDITION, VERSION and SERVICEPACK information of SQL Server

Hello Friends Generally, we choose the  @@VERSION to get the version information for SQL Server, but using this function we can’t get the Service Pack information installed… Alternative way Get Editions of SQL Server SELECT SERVERPROPERTY(‘EDITION‘) AS EDITION Get Version Detail of SQL Server SELECT SERVERPROPERTY(‘PRODUCTVERSION‘) AS VERSION Get the Service Pack installed on SQL Server SELECT SERVERPROPERTY(‘PRODUCTLEVEL‘) AS SERVICEPACK

» Read more

SCOPE_IDENTITY, IDENT_CURRENT, and @@IDENTITY not working with Linked Server or Remote server ???

Hello Friends, I have faced a problem using SCOPE_IDENTITY, IDENT_CURRENT, and @@IDENTITY with Linked server Let me explain with example as below Question: We have set of applications which are running on SQL 2000, due to some reason we need to migrate sub set of applications to SQL 2008. Now the few applications running on SQL 2008 and few on SQL 2000, applications running on SQL 2008 using some of databases which lie on SQL 2000 with Linked server Now

» Read more

SQL SERVER 2008 – Enable xp_cmdshell

—  To allow advanced options to be changed EXEC sp_configure ‘show advanced options’, 1 GO —- To update the currently configured value for advanced options. RECONFIGURE GO —- To enable the feature. EXEC sp_configure ‘xp_cmdshell’, 1 GO —- To update the currently configured value for this feature. RECONFIGURE GO Alternative way 1. Click the Start button. 2. Select All Programs. 3. Navigate to the Microsoft SQL Server 2008 folder. 4. Right Click on Server name then click facets options 5. In the Facets Option choose Surface Area Configuration in dropdown 6. At the bottom of the window, mark True for xp_cmdshell. 7. Click OK.

» Read more

SQL – Index

UNIQUE Creates a unique index on a table or view. A unique index is one in which no two rows are permitted to have the same index key value. A clustered index on a view must be unique. The Database Engine does not allow creating a unique index on columns that already include duplicate values, whether or not IGNORE_DUP_KEY is set to ON. If this is tried, the Database Engine displays an error message. Duplicate values must be removed before

» Read more

SQL Server 2011-Denali

SQL Server code-named “Denali” Microsoft SQL Server code-named “Denali” empowers organizations to be more agile in today’s competitive market. Customers can efficiently deliver mission-critical solutions through a highly scalable and available platform. Industry-leading tools help developers quickly build innovative applications while data integration and management tools help deliver credible data reliably to the right users and new user experiences expand the reach of BI to enable meaningful insights. With SQL Server code-named “Denali” customers will benefit from the following added

» Read more
1 2 3 4