sql-server-2005

Unable to debug SQL Server 2005 stored procedures in Visual Studio Team System 2008

I have been trying to debug SQL Server 2005 stored procedures, in Visual Studio Team System 2008. I connected to the database server and did a right-click "Execute", on the stored procedure. I even tried "Step Into Stored Procedure", with no luck. The IDE shows it is running, but I can not seem to break or step into the stored proce...

Commiting only Specific Changes made inside a TRANSACTION which may ROLLBACK

This is a significant edit from the original question, making it more concise and covering the points raised by existing answers... Is it possible to have mulitple changes made to multiple tables, inside a single transaction, and rollback only some of the changes? In the TSQL below, I would NOT want any of the changes made by "myLogSP"...

Error deploying database in VS 2008 w/ SQL Server 2005 size must be at least 3MB?

I'm getting the following error deploying my database in VS 2008 with a local SQL Server 2005. I deployed other databases, but this one seems to fail. Bsg.COC.Database.dbschema(0,0)Error TSD01268: .Net SqlClient Data Provider: Msg 1803, Level 16, State 1, Line 1 The CREATE DATABASE statement failed. The primary file must be a...

SQL Server 2005 Memory Pressure and tempdb writes problem

We are having some issues with our production SQL Server. Server: Dual Quad Core Xeon 8 GB RAM Single RAID 10 Array Windows 2003 Server 64-bit SQL Server 2005 Standard 64-Bit There is about 250MB of free RAM on the machine right now. SQL Server has around 6GB of RAM, and our monitoring software says that only half of the SQL Server al...

How to query the concrete table when only the parent table id is known

I have an inheritance relationship in my database, where I have a parent table (Table A) that is basically a sequence of auto-incrementing integers (Id column). From here, I have several tables (Table B,C & D) that also have an Id column, which is a foreign key to the Id column in Table A. Now my question is, if I have the Id, what is ...

SQL scripts act on master database instead of practice database

I wrote some sql scripts to create a database and store data. I just noticed that the new tables and data are going to the master database. I found that I can address the correct database if I scope out the database as so: CREATE TABLE Practice1.dbo.Experiments ( ID int IDENTITY (100,1) PRIMARY KEY, CompanyName nvarchar ...

Limiting the RAM consumption of MS SQL SERVER

I just rolled a small web application into production on a remote host. After it ran a while, I noticed that MS SQL Server started to consume most of the RAM on the server, starving out IIS and my application. I have tried changing the "server maximum memory" setting, but eventually the memory usage begins to creep above this setting. ...

MS Sql Server 2005+ table indexes creation can be automated?

I was reading Ian Stirk's Uncover Hidden Data to Optimize Application Performance article on MSDN Magazine, and now I am wondering if table indexes creation could be automated, as Google AppEngine does for its BigTable. There is any tool or Sql Server feature that automates table index creation? ...

outer query to list only if its rowcount equates to inner subquery

Need help on a query using sql server 2005 I am having two tables code chargecode chargeid orgid entry chargeid itemNo rate I need to list all the chargeids in entry table if it contains multiple entries having different chargeids which got listed in code table having the same charge code. data : code 100,1,100 100,2,100 100...

how do I backup logins and jobs from SQL server 2005?

Is there a script or function in sqlserver2005 that i can backup the jobs and login details of a server from the master database? ...

Analysis Services Only Windows Authentication

Is it true that Analysis Services ONLY supports windows authentication? ...

Memory leak when using time in NHibernate SQL query

I use NHibernate in my ASP.NET application to connect to an MS SQL Server 2005 database. In some cases I need to write my own SQL queries. However, I noticed that the SQL server thread leaks about 50 KB of memory every time I execute the following piece of code: NHibernate.ISession session = NHibernateSessionManager.Instance.GetSession(...

SQL to return list of years since a specific year

I need a list of years as a recordset starting with 2004 to current year (in desc order), without writing a stored procedure. Is this possible? (SQL Server 2005). So it should return: 2009 2008 2007 2006 2005 2004 ...

improving sql server query response time.

I have a table which contains around 4 lakh records and which gets called on the homepage of the intranet website. At peak times we can have 300-400 concurrent users. The SQL Profiler tool gives the following output. CPU: 406, Reads: 32446, Duration: 397. Q1. I have indexed the fields involved in the 'where' clause. Is there a way to ...

SQL Server not configured for data access

I m running an SQL Server 2005 database from a VB 6 Application. I connect to the database thro ODBC DSN. I renamed the computer on which Im running the a default instance of SQL server from 'Software' to 'IT' .I then run the 'sp_dropserver' & 'sp_addserver' stored procedures to rename the instance. On restarting the SQL server service...

How to set network adapter used by SQL Server Replication?

I have 2 servers running SQL Server 2005 with merge replication set up between them. Each server is connected to the building network, but they also have a cross-over cable connecting them creating a private network. How do I configure merge replication so it uses the private network and not the building network? The private network i...

Unable to start analysis services for sql server 2005 sp2

I'm trying to install Team Foundation Server & need to get SQL Analysis service running but it wouldnt start. This analysis service belongs to a named instance (TFS). Gives me the following message - The SQL Server Analysis Service (TFS) service on Local Computer started and then stopped. Some services stop automatically if they are no...

Joining temp tables with different structure

I have 2 temp tables. One has data column wise. OrderCode OrderType ABC 1000 One has data row wise FieldName Value ORDER_CODE ABC ORDER_TYPE 2000 I need to write a query that essentially joins both of them and updates the value if it exists in table 2. Recordset result needs to be OrderCode OrderType ABC 20...

SQL Reporting Services 2005 - How to get current date as a ReportParameter

Hi all, I have some working reports that must be deployed on SSRS. One more customization that I want to be added is to automatically select the FromDate as today - 1 month, and ToDate as today. Specifically, I want to replace the fragment bellow with a piece that accomplish the requirements above: <ReportParameter Name="FromDate"> ...

TSQL to view, add and delete permissions

I have created several new tables on a new database(Microsoft SQL server 2005). Now those tables are ready for client users to view through Access 2003 by using System DSN ODBC object (with SQL authentication). What I did was to create a Role and a schema in the database, and a login user for my SQL server default with my database and th...