SQL Server 2008 lets you copy database with data: turn on Script Data in the Generate Scripts wizard to get INSERT statements for the rows in your tables.
Full-Text Search Basics
Full-text search basics explains catalogs, full-text indexes, CONTAINS, and LIKE so SQL Server searches match the question and the data.
SQL SERVER – Puzzle – Write Script to Generate Primary Key and Foreign Key
A puzzle from a migration project: SSMS cannot script every Primary Key and Foreign Key at once. Can you write a script that generates them all?
geometry STBoundary: A Polygon Edge Is a Different Shape
geometry STBoundary returns the edge of a shape as another geometry instance. I inspect that result independently from the source. A polygon’s boundary is not another filled polygon with the same area.
SQL SERVER – Get Last Running Query Based on SPID
How to see the last running query of another session based on its SPID, using @@SPID to find session IDs and DBCC INPUTBUFFER to read the query.
SQL SERVER – Two Methods to Retrieve List of Primary Keys and Foreign Keys of Database
There are two different methods to retrieve the list of Primary Keys and Foreign Keys from the database.
SQL SERVER – Four Different Ways to Find Recovery Model for Database
Four ways to find the recovery model of a database: database properties, Object Explorer Details, sys.databases and DATABASEPROPERTYEX.







