sql-server

What are named pipes?

I know a little bit about this but wanted some more information. What are they and how do they work? Context happens to be SQL Server ...

Script all stored procedures in Management Studio 2005

In Enterprise Manager you could script all SPs in a database through the right click menu, is there a way to do it in Management Studio? ...

SQL Server Express 2008 Install Side-by-side w/ SQL 2005 Express Fails

When I try to install a new instance of SQL Server 2008 Express on a development machine with SQL 2005 Express already up and running, the install validation fails because the "SQL 2005 Express tools" are installed and I'm told to remove them. What exactly does that mean? After reading this article: http://www.asql.biz/Articoli/SQLX...

"Favorites" or "macros" in SQL Server Management studio?

I have a few databases that I always use SQL Server Management Studio with. I'd like to be able to create a toolbar button or keyboard shortcut that automatically opens a new query window (in the current SSMS instance) and connects to a given (registered, perhaps) database. That's it. That's all I need. And this ashtray, and the paddl...

Compare tools to generate update script for SQL server

I would like to make the update of the web application as automated as possible. I'm looking for a tool that can compare two instances of a database and generate an update script for me. As part of the build process create a instance of the last version of the database (ie currently in production) and compare that to what has been change...

customer-configurable asp.net web site security for fine-grained control of page and button access

I have an ASP.NET 2.0 [no ajax...yet] web site that will be deployed in compiled form on multiple customer sites. Typically the site will be intranet only. Some customers trust all of their people and don't care about limiting access to the site and/or page functions, others trust no one and want only certain people and/or groups to be a...

Determine SQL Server Database Size

SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As far as I known the database engine considers data only, thus excluding log files, unused space, and index size. Getting the length of the MDF file should not give the correct database size in terms of SQL Server limitation. My question is how to get the dat...

What is the difference between nchar(10) and varchar(10) in MSSQL?

What is the difference between nchar and varchar in MSSQL? What does nvarchar mean? Cheers! ...

Installation problem sql server 2008

I should probably take this for a forum but figured someone here might know the answer. I'm trying to install sql server 2008 on a home vista machine but it keeps telling 'Restart computer failed' everytime it does a check to make sure pre-reqs are met. I've restarted my computer and even uinstalled/installed .net 3.5 sp1. only thread ...

select top 10 records for each category.

I want to return top 10 records from each section in the one query. Can anyone help how to do it. Section is one of the column in the table. Database is sql server 2005. Top 10 by date entered. Sections are business, local and feature For one particular date I want only top(10) business rows (most recent entry), top (10 ) local rows and...

Identity and primary key

c# + sql server: I have to import a few tables from Access into sql server. The new sql server tables are already defined and created. The Access tables have primary key - foreign key relationships that have to be maintained. I would like to have the new sql tables use identity values for the primary keys, but I can't easily load the leg...

how to read the last row with SQL Server

What is the most efficient way to read the last row with SQL? The table is indexed on a unique key--the "bottom" key values represent the last row. Edit: This is for SQL Server. Thank you rp ...

How to show SQL server 2000 server roles through an SQL query

what sql query will i need to show the activated server roles in a specific user? ...

Size of varchar columns

In sql server does it make a difference if I define a varchar column to be of length 32 or 128? ...

SQL Server 2005 - Rowsize effect on query performance?

Im trying to squeeze some extra performance from searching through a table with many rows. My current reasoning is that if I can throw away some of the seldom used member from the searched table thereby reducing rowsize the amount of pagesplits and hence IO should drop giving a benefit when data start to spill from memory. Any good res...

How do I estimate SQL Server index sizes

While estimating straight row and table sizes are fairly simple math, we find it challenging to guess just how much space each index will occupy (for a given table size). What areas can we learn to calculate a better estimate and growth rate for indexes? ...

SQL server 2005 Connection Error: Cannot generate SSPI context

Provide Used: Microsoft OLE DB Provider for SQL Server. Can anyone help me with this.. I was trying to connect with LLBLgen ...

Updating client SQL Server database structure from text file

We have a "master database structure", and need a routine to keep the database structure on client sites up-to-date. A number of suggestions have been given to a related question, but I am looking for a more specific solution, along these lines: I would like to generate a text file (XML or other readable format) which describes the en...

Boolean 'NOT' in T-SQL not working on 'bit' datatype?

Trying to perform a single boolean NOT operation, it appears that under MS SQL Server 2005, the following block does not work DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = NOT @MyBoolean; SELECT @MyBoolean; Instead, I am getting more successful with DECLARE @MyBoolean bit; SET @MyBoolean = 0; SET @MyBoolean = 1 - @MyBo...

Questions about exporting and importing flatfiles (txt, csv) in SQL Server 2005

What's the best delimiter to use when exporting data? What's the best way to work with NULL data if you have an INT field in the table? ...