sql-server

What columns can be used in OUTPUT INTO clause?

I'm trying to build a mapping table to associate the IDs of new rows in a table with those that they're copied from. The OUTPUT INTO clause seems perfect for that, but it doesn't seem to behave according to the documentation. My code: DECLARE @Missing TABLE (SrcContentID INT PRIMARY KEY ) INSERT INTO @Missing ( SrcContentID ) SE...

Does Oracle have something like Change Data Capture in SQL Server 2008?

Change Data Capture is a new feature in SQL Server 2008. From MSDN: Change data capture provides historical change information for a user table by capturing both the fact that DML changes were made and the actual data that was changed. Changes are captured by using an asynchronous process that reads the transaction log ...

globally unique integer based ID (sequential) for a given location

Hi, I need to create a unique ID for a given location, and the location's ID must be sequential. So its basically like a primary key, except that it is also tied to the locationID. So 3 different locations will all have ID's like 1,2,3,4,5,...,n What is the best way to do this? I also need a safe way of getting the nextID for a give...

Is there a difference between (local), '.' and localhost?

I've used all three of these when making local programmatic connections to databases. Is there any real difference between them? ...

Getting an error when filling a datatable from a data adapter

I am getting this error but only very occasionally. 99.9% of the time it works fine: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. Does anyone have any idea on what the cause could be? I only use that datatable for viewing and not updating so is it possible to ea...

Is it possible to rename an SQL Server 2005 instance

I would like to change the name of my SQL Server instance. Is there a simple way of doing this or is a significant effort required? Note, this is a named instance - not the default instance. ...

How to import a SQL Server .bak file into MySQL?

The title is self explanatory. Is there a way of directly doing such kind of importing? ...

Hooking up Reporting Services 2005SP2 to SQL Server 2008

I am trying to configure Reporting Services 2005SP2 on a machine with SQL 2008 on another hosting the ReportServer DB. When I create the ReportServerDB the DB is created as version C.0.9.45: When, afterwards, I try to initialise Reporting Services, I get an error about an incorrect version number. Reporting Services created a ReportSer...

can I configure hibernate properties to connect without using an instance name to sql server 2005?

Hi, Can I configure hibernate properties to connect without using an instance name to sql server 2005? I need to force it to use localhost as the hostname and not specify the instance (same as you can do with the sql server enterprise manager). Ta! T ...

Search for words in SQL Server index

I need something in between a full text search and an index search: I want to search for text in one column of my table (probably there will be an index on the column, too, if that matters). Problem is, I want to search for words in the column, but I don't want to match parts. For example, my column might contain business names: Mi...

Creating SQL Server Management Studio 2005 Plugins

I've read that plug-ins aren't support for SQL Server Management Studio 2005. But it can be done though. Anyone have any ideas how to do thist? Here is a company that does it now: http://www.red-gate.com/products/SQL_Refactor/index.htm ...

Data generators for SQL server?

I would like to receive suggestions on the data generators that are available, for SQL server. If posting a response, please provide any features that you think are important. I have never used a application like this, so I am looking to be educated on the topic. Thank you. (My goal is to fill a database with 10,000+ records in each t...

Unfamiliar character in SQL statement

This is sort of SQL newbie question, I think, but here goes. I have a SQL Query (SQL Server 2005) that I've put together based on an example user-defined function: SELECT CASEID, GetNoteText(CASEID) FROM ( SELECT CASEID FROM ATTACHMENTS GROUP BY CASEID ) i GO the UDF works great (i...

Is there a way to make SQL Management Studio never generate USE [database-name] in scripts?

Is there a way to turn this 'feature' off? ...

Synchronize DataSet

What is the best approach to synchronizing a DataSet with data in a database? Here are the parameters: We can't simply reload the data because it's bound to a UI control which a user may have configured (it's a tree grid that they may expand/collapse) We can't use a changeflag (like a UpdatedTimeStamp) in the database because changes ...

What types should I use to represent percentages in C# and SQL Server?

I'm thinking floats. For the record I'm also using NHibernate. ...

Can foreign key constraints be temporarily disabled using TSQL?

Are disabling and enabling FK constraints supported in SQL Server? Or is my only option to 'drop and then re-'create' the constraints? ...

Sql 05 express management studio versus standard

What are the differences between the free sql express 05 management studio and the licensed version? ...

Pivot Table and Concatenate Columns - SQL Problem

I have a database in the following format: ID TYPE SUBTYPE COUNT MONTH 1 A Z 1 7/1/2008 1 A Z 3 7/1/2008 2 B C 2 7/2/2008 1 A Z 3 7/2/2008 Can I use SQL to convert it into this: ID A_Z B_C MONTH 1 4 0 ...

How to get SQL Profiler to monitor trigger execution

I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a trace to monito...