sql-server-2008

SQL Server 2008 FILESTREAM Feature with VLDB

I have a bunch of xml files that is about 700 GB in size. I'm going to load the data within those files into a SQL Server 2008 database table(tabular data). In addition to the fields that will hold the data in a tabular format, the table will contain a field of SQL Server XML type that holds the xml data as a whole. I want to use the FIL...

Difference of ADO.Net's Transaction connecting to SQL Server 2000 and SQL Server 2008

hi, I have some C#/ado.net code which acts differently with SQL Server 2000 and SQL Server 2008. SqlConnection con = new SqlConnection("connecstionstring"); SqlCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "MySp"; con.Open(); SqlTransaction trans = con.BeginTransaction(); cmd.Transac...

passing a smalldate time variable in sql?

There is an sp, EXEC Dbo.CREATE_A_PEACEFULL_WORL 'A',2,?? ?? presents a smalldatetime variable, the date is must be like; 24.02.2010 00:00:00 how can i pass it? ...

SQL Server 2008: produce table of unique entries

Hi all I have the following problem. I have a table with a few hundred thousand records, which has the following identifiers (for simplicity) MemberID SchemeName BenefitID BenefitAmount 10 ABC 1 10000 10 ABC 1 2000 10 ABC ...

How can I alter this computed column in SQL Server 2008?

I have a computed column created with the following line: alter table tbPedidos add restricoes as (cast(case when restricaoLicenca = 1 or restricaoLote = 1 then 1 else 0 end as bit)) But, now I need to change this column for something like: alter table tbPedidos alter column restricoes as (cast(case when restricaoLicenca = 1 or res...

Reporting Services WMI Error

I've never used SSRS before and I want to have a play around with it on my local machine to see if it's a good fit for a project. I have the full (advanced services) version of SQL Server 2008 Express installed, according to the web installer. However, when I fire up Reporting Services Configuration Manager and try to connect to my loc...

Enumerated types in SQL Server 2008?

Is there some kind of mechanism in SQL Server to allow Enumerated type like functionality? For example, if I have a column Called "UpdateStatus" it usually gets setup with single letter values like so: D X U I This could equate to a lot of things. That leads to confusion. The alternative is to have it be a string column like this:...

Retrieving the most recent revision information for specified dates (SQL)

In the above FldID 52 = Description and FldID 54 = HistoryDetail For any given date the output should be the last entry for that date. Also the columns need to be become rows. User will provide 2 dates. Say March 2, 2010 and March 3, 2010. So output in above case should be Since Rev 6 does not have an entry for FldID 52...

Need some tSQL Wizardry: SQL Update Based on Running Total

I've got an implementation for this that uses a super hairy recursive CTE that is really hard to follow/maintain. I was hoping that one of the brains on SO could come up with some more straightforward tSQL approach code to accomplish the following: Table Documents DocID SortOrder PageCount StartPgNum EndPgNum 5 1 ...

EnumAvailableServers(false) of SMO in SQL 2008 cluster is returning zero records ??

Call to EnumAvailableServers(false) is reurning zero list of sql instances in the windows 2008 sp2 cluster having sql 2008 sp1 setup. Firewall was disabled.. What are the reasons for its failure?? ...

How to add SQL Server plugins to Visual Studio 2008 ?

Hi Everybody, I have a SQL Server 2008 database which is located on a distant server (I have full access to this server however). On my computer I have Visual Studio 2008 installed, and I need to load a solution which contains projects that have been created using plugins from SQL Server. Those plugins are : - SQL Server Analysis Servic...

Why would an Entity Framework model generator not create code for a table when I selected it?

I have Visual Studio 2008: I can create Entity Framework models on existing tables in a SQL Server 2005 database. I can create Entity Framework models on tables I create in a local SQL Server 2008 database files. However, when I add a new table to the SQL Server 2005 database, then try to create an Entity Framework model on it, it le...

SQL Management Studio 2008 - Server name on Query Editor tabs...where did they go???

I recently upgraded to SQL Management Studio 2008 (full not express, if it matters). In 2005, when I was in the Query Editor, each tab (with an unsaved query) would have the servername-instance-query name or something like that, but all I cared about was seeing the server name there so I knew which server I was running my query on. In ...

how can I update rows at random?

I'd like to go through a table and randomly wipe out some of the data. I'm doing some data randomizing, turning real first names into fake ones etc. Well one of the tables involved has a column that is null about 40% of the time. My name randomizer app could do a coin toss somewhere in it when it assigns new first names. But I'd prefer t...

Can't log into SQL Server 2008 Report Manager

Hello, I am using SSRS 2008 with VS 2008 using Windows XP Pro w/SP3. I have the reporting server setup and want to use Forms Authentication. I followed the steps outlined on the following MSDN page and have reporting server running with Forms Authentication. msdn.microsoft.com/en-us/library/aa902691%28SQL.80%29.aspx However, when I tr...

converting ID to column name and also replacing NULL with last known value.

TABLE_A Rev ChangedBy ----------------------------- 1 A 2 B 3 C TABLE_B Rev Words ID ---------------------------- 1 description_1 52 1 history_1 54 2 description_2 52 3 history_2 54 Words column datatype is ntext. TABLE_C ID Name ----------------------------- 52 Description 54 Hi...

Can't Deploy Report Models in SSRS 2008

I created a data model in BIDS for SSRS 2008 SP1. When I try to deploy, I get the following error: Exception of type 'Microsoft.ReportingServices.RsProxy.AccessDeniedException' was thrown. When I Googled the issue, all I can find is information such as this: Open “Report Manager” using http:///reports; Click “Site Settings”...

SQL Server 2008: SQLXML Query function .query('//mypath/text()') doesn't XML decode

In Microsoft SQL Server 2008, when executing .query('{xpath}/text()') on an XML stream column value, if the value of the XPath selected node contains "&", the return value is "&amp" instead of "&". Is this a bug, or am I doing something wrong? Or rather, how do I get the unencoded text, i.e. equivalent of .innerText (per W3C XML DOM...

Scripting Maintenance Plans - SQL Server

Can someone be kind enough to point me to some documentation for scripting Maintenance Plans in SQL Server? I know, I know, I could use the GUI but I really don't want to. Thanks, Chuck ...

How to connect SQL Server 2008 Express?

Hey, I can`t connect SQL Server Express 2008,I downloaded and installed SQL Server 2008 Express 64Bit, Microsoft SQL Server Management Studio. And I can`t connect to the SQL Server, I tried those options 1.Disable the firewall 2.Restart the SQL Server Service at Sql Server Configuration Service , I have two services that dosen`t worki...