sql-server-2008

SQL Server database max row RowVersion

Does anyone know if there is a way I can get a database's max RowVersion value? The database I am using is SQL Server 2008. Thanks. ...

Crystal Report showing HTML text, but the bullets don't show. Why?

I'm getting data out of a SQL-Server nvarchar(3000) field, which is formatted as html, displaying it in Crystal Reports 11. The data is being saved as bullets, and if I pull out the data and drop it in a text file with an html extension, it shows the bullets. But from Crystal, it does not. I get the new line, but no bullets. The fiel...

Visual Studio Server Explorer Table Changes Wrapped in Transaction?

Hi, I'm using the Visual Studio Server Explorer to open a table (Table_A) and rearrange the order of fields. When submitting the changed it will generate the script which does the following. Remove all foregin keys that refer to Table_A and remove it's foreign keys. Create a temporary table with the new schema. Tmp_Table_A Copy al...

Is there a way to get SQL Server to automatically do selects on hash values of nvarchar fields?

I'm not sure how to better phrase this question so it's possible I missed a previously asked question. Feel free to close this and point me to the correct one if it exists. I have a table with two important columns (that is to say it has much more but only two is pertinent to this question). First column is a GUID (an id) and the second...

Beginner ASP.Net / SQL Server security issues

Okay, this may be involved... Anyway, I am trying to learn how to use ASP.Net. The environment is like this: Windows 7 Professional Visual Studio 2010 SQL Server 2008 Developer Edition I am trying to follow the article here: Developing and Unit Testing an ASP.NET MVC 2 Application - CodeProject So far, I have installed IIS, IIS7 ...

Microsoft SQL Server Reporting Services web services convert html to pdf

Hi guys I knew that you can develop customised code to generate pdf report via SQL Server Reporting Services (web services API). My question is: can you utilize the same mechanism to convert any HTML code into pdf file? My team lead wants me to convert html to pdf in this way to try to utilize the existing report services reference. ...

SQL server failover Cluster not reporting correct patch version....

Hi, I've got a bit of an obscure problem and I'm hoping someone here can give me some pointers regarding it, I've exhausted everythign I can think of... At the moment, I have a two node cluster setup (sql server 2008). I have patched this, as per the microsoft guidlines, to service pack 1. The issue is, when I connect to each node indi...

SQL server filtered indexes

Hi, I have a table that is quite modest in size at the moment but will grow to a few million rows so I’m looking to build things right from the start. The table contains 15 or so column containing information for agent telephony performance but that is not really relevant. One of the queries that is run on this table looks at data from...

Generating star schema from table structure.

I want to know is there any way to generate star schema diagram in SQL server 2008 when I have all the table structure ready ? If Yes how do i create fact table for that ? ...

Selecting not null column

I have a table with varbinary(max) column and nvarchar(max) column. One of them is null and the other has a value. I would like to return the column that has the value as a varbinary(max) column. So far I have tried this, that does not work: SELECT A = CASE A WHEN NULL THEN B ELSE A END FROM Tabl...

Preventing SQL Injection attacks: the differences between mySql and SQL Server 2008

Is there any reason to migrate from MySql to SQL server 2008 if one's main concern is the blocking of SQL injection attacks? Does Linq2Sql or EF provide additional protection? ...

Predictive Ordering Logic

I have a problem and was wondering if anyone could help or if it is even possible to have an algorithm for something like this. I need to create a predictive ordering wizard. So based on previous sales, we will determine that that a certain amount of an item is required. E.g 31 apples. Now i need to work out the number of cases that nee...

sql server rollback...

Possible Duplicate: SQL Identity (autonumber) is Incremented Even with a Transaction Rollback does a rollback also rollback identity values??? ...

Convert Xml to Table SQL Server

I wonder how can i read a xml data and transform it to a table in TSQL? For example: <row> <IdInvernadero>8</IdInvernadero> <IdProducto>3</IdProducto> <IdCaracteristica1>8</IdCaracteristica1> <IdCaracteristica2>8</IdCaracteristica2> <Cantidad>25</Cantidad> <Folio>4568457</Folio> </row> <row> <IdInvernadero>3...

SQL Server - Poor performance of PK delete

I have a table in SQL Server 2008 R2 consisting of about 400 rows (pretty much nothing) - it has a clustered index on the primary key (which is an identity). The table is referenced via referential integrity (no cascade delete or update) by about 13 other tables. Inserts/Updates/Gets are almost instant - we're talking a split second (a...

SQL Server Database Mirroring without witness

I have setup Database mirroring for SQL Server 2005 for my database on two different SQL Server machines. There is no witness server used here. I also see the status "Principal/Synchronized" and "Mirror,Synchronized/Restoring" respectively on Primary and Mirror servers for my database. Now I wanted to test whether the failover to mirror...

Restoring SQL 2008 R2 db on SQL 2008 Standard

I'm trying to take a SQL Server 2008 R2 Expression db and restore it on my local SQL Server 2008 standard, however it gives me the error: The media family on device 'C:\jtoth\Backups\ucampus.bak' is incorrectly formed. SQL Server cannot process this media family. R2 is version 660 and standard is 655 and I know that you can't restore t...

sql server: will this datetime work?

SELECT "2 0 Analytical (Testing Phase)" FROM "dbo"."Lab Occurrence Form" WHERE (("Occurrence Date" BETWEEN @P1 AND @P2 ) AND ("2 0 Analytical (Testing Phase)" LIKE ''%2.%'' ) ) ', N'@P1 datetime,@P2 datetime','2010-04-30 00:00:00','2010-04-01 00:00:00' is this the correct format to return records between a certain datetime?...

Can I implement foreign keys in Entity Framework 4 at the entity layer?

I have a sizable legacy MS SQL database where foreign key relationships were never implemented. Is it possible to implement "logical" foreign keys between entities in Entity Framework 4 without there being actual foreign key relationships present in the database? ...

Searching in SQL Management Studio 2005

Is there a way to search for text within stored procedures? For example I want to find out if a particular table is being referenced by any stored procedure. ...