sql-server-2008

SQL nvarchar Performance

I'm storing localized strings in a single datatable using MS Sql (2008 or whatever). Most of the strings are short and can be represented with varchar(200), while about 10% are much longer require something like varchar(5000). My question is, is there a performance advantage when retrieving shorter strings if I break this into two tables...

can we use packages in ms sql server 2008

can we use packages in ms sql server 2008...i m new to sql server ... if yes how it can be created and used.... ...

how to take backup to a network share?

when i tried to back up the database to a shared network i am getting the following error can any one help me? *Msg 3201, Level 16, State 1, Procedure Full_BCK, Line 21 Cannot open backup device '\prabha\Rajniprabha\SivaBaba2008_Full.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 15105). Msg 3013, Level...

SQL Server 2008 Rows to 1 CSV field

We're on SQL Server 2008 and I'm trying to figure out if there's a way to have a stored procedure return my results in 1 CSV field for example: SELECT TOP 4 carModels FROM dbo.Models would return Jeep Honda Mitsubishi Ford I would like this returned in 1 field like so: Jeep,Honda,Mitsubishi,Ford I know we can do this with an asse...

UPSERT in SSIS

I am writing an SSIS package to run on SQL Server 2008. How do you do an UPSERT in SSIS? IF KEY NOT EXISTS INSERT ELSE IF DATA CHANGED UPDATE ENDIF ENDIF ...

Backup Through LAN network

I tried to take a SQL Server 2008 database backup from the server which has the following features: server: windows server 2008 os to the client which has the following features: client:windows xp service pack 3 os through lan network, but I couldn't achieve it and i am getting the following error: **Msg 3201, Level 16, State 1, Lin...

Transfer Database from SQL-Server 2005 to SQL-Server 2008

I have an existing application that transfers a Database from a source server to a target server via SMO "Transfer". We transfer only the data. Both SQL-Servers are 2005. Now we upgrade the target server to SQL-Server 2008. Will the transfer via SMO still work? ...

Understanding Update and Delete Rules for Relationships in SSMS 2008

Hello everyone, I am confused about what means the update and delete rule in SQL Server 2008 Management Studio when we define foreign key constraints. I also did not find related help documents (e.g. F1 help). Here is the screen snapshot. Appreciate if anyone could describe what do they mean and recommend some related documents to read...

How to handle a fact table with more than 16 keys in ms sql server

I have a fact table that has 17 keys. Normally I have been designating the primary key as all of my dimensional keys. MS SQL server 2008 has a limitation of 16 columns in a primary key or unique constraint. Are there any work arounds? ...

How to create 20 databases at a time in sqlserver?

Hi, I have written the following procedure to create a series of 20 databases. But it is not creating them. The database is not created even when I go to my H: drive and didnot find the ldf and mdf named bharath1 bharath2 like... What did I do wrong with this? USE master GO DECLARE @command varchar(1000), @i int while @i < 5 SET @...

What is the difference between drop table and delete table in SQL Server?

Hi In SQL Server, what is the difference between the following two- Right click on a database object (table/view) and opt for Drop table (i.e. Script table as -> DROP To -> New Query Editor Window) Right click on a database object (table/view) and opt for Delete. I tried them both and both perform the same action. Any reason for hav...

SSRS Report Custom Prompt Layout

Is it possible with business intelligence development studio to create an SSRS report and easily customize the way that the prompt fields are laid out (mainly the location)? It looked like it defaults to grouping them horizontally, I would want to perhaps group the prompts into section. I'm just getting into using SSRS so my knowledge i...

How to scan/search for active SQL Server instances with Java?

Is there an easy way, using Java, to scan/search the local network for SQL Server database instances? ...

SQL 2008 deadlocks on simple delete

We're running a very small delete against our events table in SQL 2008 and it randomly creates a deadlock. We cannot recreate it on demand however. The delete statement is good for 2-5 rows max. DELETE FROM Administration_NET.dbo.tblEvents Where EMSaccountID = 'DELE10A' Any ideas? ...

SQL Server Reporting Services 2008 -- Open UNC File Link

Is there a way to open a create a link to a file using SSRS 2008? When I try to select anything other than any http address in the action of text box the "go to url" does not work. ...

SQL 2008: How do I change db schema to dbo

I imported a bunch of tables from an old sql server (2000) to my 2008 database. All the imported tables are prefixed with my username ex: jonathan.MovieData. In the table properties it lists 'jonathan' as the db schema. When I write stored procedures I now have to include 'jonathan.' in front of all the table names which is confusing...

how to retrieve thousands of rows from a store procedure efficiently

Hello everyone, I am using VSTS 2008 + C# + .Net 3.0 + ADO.Net + SQL Server 2008. And from ADO.Net I am invoking a store procedure from SQL Server side. The store procedure is like this, SELECT Table1.col2 FROM Table1 LEFT JOIN Table2 USING (col1) WHERE Table2.col1 IS NULL My question is, how to retrieve the returned rows (Table1.col...

SQL Server 2008 File Write Behaviors

Sort of a 101 question: with multiple files in a user defined filegroup, what is SQL Servers behavior when inserting rows? Round robin? Write until full and move on to the next? I have found some interesting posts regarding tempDb on this subject that suggest round robin, but nothing conclusive. ...

Using SQL 2008 Change Tracking with NHibernate (modifying the generated DML)

I'm developing an application which requires multiple replicas and uses syncrhonization to keep replicas up to date with each other. To do this, I'm taking advantage of SQL Server 2008 change tracking feature. The one hole in this strategy appears when tracking who made a particular change in a replica. SQL Sever 2008 provides for thi...

Map XML Nodes to Datatable Fields

I am new to C# so I apologize if this is a simple task. What I would like to do open an XML file whose root node is a table name and the children of the root node are field names and values. I would then like to map the fields to the root node's table in a SQL Server database and update or insert as needed. Does anyone know if there i...