sql-server-2008

SQL Server 2008 - Finding Specific Commands/Calls/Text

I need to find an insert statement into a specific table. Unfortunately, the application isn't mine to begin with, there are over 100 stored procedures in the database, I've stepped through the code writing down every stored procedure name from begining to end of this process and I still cannot find it. I know that the process has to o...

MDX Error: Query Optimizer generated too many subcubes in the query plan

Hi, I'm trying to ask to a cube on SQL Server 2008 with a huge mdx query. This query contains more than 20 calculated members (defined on the query). Each member contains a restriction for a dimension on the cube. Not always need all dimensions, but sometimes it is needed. Well, it works fine until 16 members. With more than 16 membe...

Calling Reporting Services Web Service from SharePoint using Kerberos over SSL

I have multiple SharePoint web parts that needs to access Reporting service 2008 which is integrated into MOSS2007. There are 2 end points that I will be using: ReportService2006 and ReportExecution2005. I would like to put all the logic that calls the web service in one common assembly (class library) which will be packaged within the...

wait for transactional replication in ADO.NET or TSQL

My web app uses ADO.NET against SQL Server 2008. Database writes happen against a primary (publisher) database, but reads are load balanced across the primary and a secondary (subscriber) database. We use SQL Server's built-in transactional replication to keep the secondary up-to-date. Most of the time, the couple of seconds of latency i...

SQL Server 2008 shredding XML data - cant get element text in rowset!

Please consider this simple example. I can't get the text of the state element 'red' or 'blue' Please help!!!!! this is driving me batty DECLARE @xml XML; SET @xml = '<capitals> <state name="Alabama" abbreviation="AL" capital="Montgomery" >red</state> <state name="Alaska" abbreviation="AK" capital="Juneau" >bl...

insert the bulk records to the table using loop

i have a table called 'studentdetails'. i dont want to insert the record one by one during button click,instead i want to insert some hundred records using looping statement.Any idea?? ...

SQL Server Management Studio Clear Cache Code Completion

If you change a table, then code completion doesn't work anymore when writing a query in SQL Server Management Studio. Is there a way to clear this cache? (SQL Server 2008) ...

Sql Server print affected rows during while loop

I have a stored procedure running on sql server 2008 looping over a table of ~50 million rows, deleting records one day at a time (approx. 25,000 records a day). I want to be able to watch this occur as the process runs via print statements to the messages window. I'd like to be able to see a message each time a day's worth of deletions ...

Serial number issue in SQL Server 2008

Hello experts, I have orders and order details table as shown as below: OrderDetails Order_ID int Order_Code varchar(10) Product Name varchar(50) Qty Int SeqNO varchar(10) Below are the sample records 10001 OC Ottoman 10 Null 10002 OC Ottoman 3 Null 10003 OC Ottoman 2 Null 10004 OC Ottoman...

Clasification Tree Plug-in Algorithm for SQL Server 2008

I am facing a Data Mining problem and I'm forced to use SQL Server with Analysis Server. I have to implement CHAID algorithm in a way that once It is done, it'll be included in the Analysis Services available set of algorithms. I want to use SQL Server Data Mining Managed Plug In. So I'm programming with C#. The documentation I have ava...

sql query to return differences between two tables

I am trying to compare two tables, SQL Server, to verify some data. I want to return all the rows from both tables where data is either in one or the other. In essence, I want to show all the discrepancies. I need to check three pieces of data in doing so, FirstName, LastName and Product. I'm fairly new to SQL and it seems like a lot of...

Open File Stream Win API

I'm trying to use the OpenSqlFilestream Instruction but my code did not recognise it What dll i have to load in order to use it? ...

SQL 2008 create table method and KEY...

Hi again, I've got a script that generates a table - only my version of SQL 2008 throws up an error - has the syntax changed? Or how do I fix it manually? CREATE TABLE ScoHistory ( CourseID varchar (255) NOT NULL , SessionID int NOT NULL , ScoID varchar (255) NOT NULL , StudentID varchar (255) NOT NULL , DateRecorde...

Implicit int size indication or explicit?

Currently my application is 32-bit. This means that all tables running on SQL Server 2008 IDs' are INT that is equal to System.Int32 and everywhere where I parse strings to integers, I use Int32.TryParse(). I called this Implicit int size indication. If I will want to make my application to be 64-bit I think there will be 2 scenarios:...

How to open report in PDF inside in current browser windows, not a new browser windows from reporting services?

SQL Server 2008 Reporting Services allow to open report in PDF with following URL access: http://localhost:8080/reportserver?/MyReports/Report1&amp;rs:Command=Render&amp;rs:Format=PDF but the PDF will be open in a new browser window. How to set proper parameter and open it in current browser window? ...

Pivot SQL Statement

I have a table like this (of course there are many more values but you get the idea): ID Name --- ---- 1 A 1 B 2 C 3 D 4 A 4 D 4 E 4 F 4 G 4 H I want to write a query that would output this, given that an ID cannot have more than 6 names. ID Name1 Name2 ...

schema in sql server 2008

what is the difference between creating ordinary tables using 'dbo' and creating tables using schemas.How this schema works & supports the tables ...

Exception 'System.OutOfMemoryException'

When I try to generate script to a table that contain 500000 records I'm getting an error: Exception of type 'System.OutOfMemoryException' was thrown. Can anybody suggest a solution for backup the table data to clear this error. ...

INSERT-ing multiple rows

I have the following sql code. Is it guaranteed that MyTable is going to be sorted by MyTable.data? Basically the question is - if I am inserting multiple rows with one INSERT statement, can other connection get in the middle of my insertion and insert something else in between my rows? CREATE TABLE MyTable( id bigint IDENTITY(1,1) ...

Can SQL 2008 Business Intelligence Studio SSIS packages run in SQL 2005?

Is it possible to run an SSIS package created by SQL 2008 Business Intelligence Studio in a SQL 2005 environment? I'd rather not have to install SQL 2005 / VS 2005 in my development environment. ...