sql-server-2005

Errors While deploying SSAS 2005 Cube on Server

Hi, I am stuck with something really nasty here. I have a SSAS Cube that was working fine till day before yesterday. Had some performance issues on the server and got cummulative patch 938077 on top of Service Pack2. Since then I have not been able to deploy the cube - with a strange error - File System Error: The following error occu...

how Stop strange users from trying to connect to my SQL server db?

I have an asp.net website on a server and the db MS SQL 2005 on another server, the last few days the website show me this error message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that S...

SQL Server 2005 - Linked Servers & Agent Jobs

I have a strange scenario that I am currently unable to explain. I live in hope that it's just "the Friday feeling" or that some kindly sole here will bail my brain out and save me from endless loops of "but why!?" :) Two servers, running SQL Server 2005, with DNS Entries of: 1. ServerA 2. ServerB (Well, they're not really calle...

What happens if I Select SCOPE_IDENTITY() after an insert fails (SQL Server 2005)

The MSDN docs weren't entirely clear on this one. or perhaps I'm not reading them well enough. If I do an insert (which may insert zero rows), followed by ;SELECT SCOPE_IDENTITY() And then call the command by ExecuteScalar()... What will the result be if the Insert doesn't insert any rows? I want to stop if it fails so that I don'...

Disabling constraints before table creation in SQL Server 2005

Is it possible to disable Unique and Foreign Key constraints before creating the tables of a database using T-SQL?. Like for example, in MySQL (tested in version 5.1) if you have a SQL script that creates the database schema you can put the following: /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD...

SQL Server - OPENXML how to get attribute value

I have the following XML: <Field FieldRowId="1000"> <Items> <Item Name="CODE"/> <Item Name="DATE"/> </Items> </Field> I need to get the FieldRowId using OPENXML. The SQL i have so far: INSERT INTO @tmpField ([name], [fieldRowId]) SELECT [Name], --Need to get row id of the parent node FROM OPENXML (@idoc...

DOM libraries in .Net for building SQL statements

Are there any libraries for .Net for building sql statements? (BTW I know about ADO.NET SqlCommand, SqlParameter classes already) I'm currently developing a library to do this but am now wondering if there is already something out there which might be better. Edit: At this point I'm only interested in returning a DataTable object as...

Not connecting to SQL Server over VPN

Hi, I have connected for the first time to an existing network over VPN. I can ping the IP address which is used by the SQL Server from the VPN client, but SSMS does not connect to the SQL Server. I am using the right login id and password. Why could this happen ? Any ideas ? Thanks, Chakravarthy ...

How can I solve a connection pool problem between ASP.NET and SQL Server?

The last few days we see this error message in our website too much: "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." We have not changed anything in our code in a while. I revised ...

SQL Parameter in dotNET

here is a little problem ... string SQL = @"INSERT INTO [Answers] ([UserID],[QuestionID],[SelectedIndex]) VALUES(@uid,@qid,@sin)"; SqlParameter[] par = new SqlParameter[] { new SqlParameter("@uid",this.userid), new SqlParameter("@qid",this.questionid), new SqlParameter("@sin",this.qOptions.SelectedIndex) };...

Stored procedures and the tables used by them

Hi people! Is there a way to know what are the tables used by one stored procedure by doing an SQL query? Best regards, and thanks for the help. P.S.: I'm using SQL Server 2005. ...

asp.net membership provider compromised?

I'm using the standard out-of-the-box aspnet membership provider, and I have the following settings in the web.config: <anonymousIdentification enabled="false"/> <authentication mode="Forms"> <forms cookieless="AutoDetect" loginUrl="~/XXXX.aspx" name="XXXXAuth" slidingExpiration="true" timeout="432000"/> </authentication> ... <membe...

Group and subtotal columns in Reporting Services 2005

I have a report (RS2005, against a MSSS2005 instance) which I have inherited. It shows a basic table of data: a handful of key fields which are used to group rows together, a few basic numeric fields, then a number of dated ('bucketed') fields (e.g. 1 month away, 2 months, 6 months, a year, 2 years, etc.) The user would like to group t...

How to reduce flooding a Service Broker queue?

I'm new to using the SQL Service 2005 Service Broker. I've created queues and successfully got conversations going, etc. However, I want to sort of "throttle" messages, and I'm not sure how to go about that. Messages are sent by a stored proc which is called by a multi-user application. Say 20 users cause this proc to be called once ...

How should I go about implementing an "autonumber" field in SQL Server 2005?

I'm aware of IDENTITY fields but I have a feeling that I couldn't use one to solve my problem. Let's say I have multiple clients. Each client has multiple orders. Each client needs to have their orders numbered sequentially, specific to them. Example table structure: Orders: OrderID | ClientID | ClientOrderID | etc... Some example...

How do i use a hashing computed column after i have indexed a varchar(max) field?

I created a computed column of type varbinary and referenced a varchar(max) field. Now, how do i use or invoke it? thanks ...

DDL not executing properly inside of an IF NOT EXISTS statement on SQL Server 2005

I have a fairly complex database that needs to be deployed to a variety of servers which may or may not potentially have existing parts of the DB already implemented on it. To work around this contingency I have setup the following test: USE [testDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO IF NOT EXIST...

Sql Server 2005 connection log

Hello, I have multiple databases on one SQL Server 2005 server. I would like to know a way using which I can see all the connections made to a particular database today and the activities performed. Thanks in advance Joe ...

While linked server is closed, exec the stored procedure will get an error

I have a stored procedure for select data between many different sql server, and all the sql server have set the link server at the sql server where the stored procedure built in. Here is my procedure: Create Proc dbo.spGetData @code as char(4) AS if (@code='aaaa') Select date From [ServerA].Stock.dbo.Syspara else if (@code='bbbb') ...

How do I connect MS access linked server on a network drive requiring a password

Hi I am trying to link an MS access mdb to my sql server 2005, the problem is that the MDB is located on a shared network drive which will require login/password. How do I pass the username and password into the "Linked server Access MDB" template? I assume I have to @datsrc parameter? ...