Tagged Questions

This tag is for SQL Server 2005, major build version 9.00.xxxx.

learn more… | top users | synonyms (2)

1
vote
2answers
3k views

How to make SQL Server Management Studio use latest version of SQL Server?

I'm upgrading my dev machine from Windows 7 to 8. While installing earlier versions of Visual Studio it installed SQL Server 2005. I then went to this site and downloaded and installed SQL Server ...
4
votes
1answer
2k views

sys.fn_varbintohexstr returns NULL if varbinary data is more then 2000 as datalength

sys.fn_varbintohexstr works fine if VARBINARY data length is upto 2000. If it is greater then 2000, function sys.fn_varbintohexstr returns NULL as result. What I am missing ? DECLARE @testvarbinary ...
3
votes
2answers
2k views

Should I refresh query plan cache

Please let me explain my problem and situation: I have a web application - MVC3, MSSQL Server 2005, LinqToSQL. It has been running great until one fine morning I pushed a lot of rows to a table that ...
2
votes
1answer
357 views

When changing startup parameters on a cluster, does each node have to be updated manually?

When moving a SQL 2005 instance to new disks on a two-node Windows 2003 cluster, I changed startup params on the active node to reflect the new paths for the master DB files and error logs. I ...
1
vote
1answer
1k views

How to insert in table from remote stored procedure without creating a distributed transaction?

How can I insert in a local table from a remote stored procedure without creating a distributed transaction? I want to run a stored procedure on a remote server and use the output as the source for an ...
3
votes
1answer
373 views

Does openquery use distributed transactions?

Does openquery in SQL Server 2005 use distributed transactions? If so, in which cases does it?
1
vote
0answers
89 views

Backup headerinformation hold wrong database name

We're in the proces of preparing our migration to our new servers aswell as SQL 2012 and everything is looking fine and dandy and i'm testing some of the scripts we will be using. One of these ...
0
votes
1answer
177 views

UPDATE statment with and without SELECT keyword

I have been doing some testing on removing the SELECT keyword from this update: Update #tmpDriverTime Set WorkDay2 = (Select IsNull(Sum(PyblHrs),0) From spr_DriverTimeEntry Where ...
1
vote
2answers
161 views

SQL Server 2005 onwards- Capturing Baseline

I want to design a process by which I can capture the baseline data of multiple SQL Server instances (2005 onwards) in a single database from where I can get all the info and alerts. As of now I ...
8
votes
2answers
8k views

Which one is more efficient: select from linked server or insert into linked server?

Suppose I have to export data from one server to another (through linked servers). Which statement will be more efficient? Executing in source server: INSERT INTO ...
2
votes
2answers
216 views

How to join multiple tables (SQL) to find the difference between an order and shipped quantities?

I have a collection of orders that were submitted to an internal ERP, which were processed and partially shipped. The table hierarchy is as follows: Order table contains OrderReference(PO), OrderID ...
0
votes
0answers
26 views

How to join multiple tables (SQL) to find the difference between an order and shipped quantities? [duplicate]

I have a collection of orders that were submitted to an internal ERP, which were processed and partially shipped. The table hierarchy is as follows: Order table contains OrderReference(PO), OrderID ...
6
votes
2answers
456 views

Query Plans not retained insufficient memory errors

We have been experiencing memory issues with SQL Server. We first realised we had a problem when we started getting timeouts and login errors: A connection was successfully established with the ...
2
votes
2answers
431 views

Improve CTE performance

is there a way to improve the performance of a recursive CTE like below, I am unsure if I can add indexes on joins when the joins are using ROW_NUMBER? DECLARE @File_Name VARCHAR(8000), @Disk ...
6
votes
2answers
1k views

TempDB Version Store cleanup

From what I can find the version store will only clean up versions that are older than the oldest active transaction. Question: Is the oldest transaction database specific or will SQL Server keep all ...
1
vote
1answer
310 views

How to identify who made changes in SQL server management? [duplicate]

I'm working on the server using SQL Server Management Studio 2005. Is it possible to identify the person who made changes in the SQL server Management Studio 2005 tables data?
5
votes
2answers
385 views

How to design index for faster deletes

I want to speed up following piece of code delete from ssn_sdo where (art_id=@art_id and skl_id=@skl_id and @level=0 ) or (art_id=@art_id and skl_id=@skl_id and @level=1 and ...
-4
votes
0answers
77 views

Multi-row INSERT rejected? [closed]

What's wrong with my query? :( USE tempdb; IF OBJECT_ID('dbo.OrderTotals', 'V') IS NOT NULL DROP VIEW dbo.OrderTotals; IF OBJECT_ID('dbo.OrderDetails', 'U') IS NOT NULL DROP TABLE dbo.OrderDetails; ...
0
votes
1answer
962 views

Error 10053 connecting with Management Studio

While I try to connect to SQL Server, I am getting the following error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: ...
3
votes
3answers
1k views

SQL Server freezes (because of application), need logging

We have an application running ontop of our SQL Server 2005 instance and a couple of times a week this application (unannounced) will cause the SQL Server to freeze. I can't even restart the SQL ...
1
vote
1answer
128 views

Migrate database from SQL Server 2005 to SQL Server 2008 R2

DBAs... please be gentle with me, I'm a 'greenhorn' SQL Server DBA, pressed into service because my company's DBA had resigned and we haven't found his replacement, yet. First, my situation: I'm ...
4
votes
1answer
504 views

Forcing Join Order

I have a table with just over a million rows. These rows can have a parent record in the same table which is found by joining to itself on 6 different columns (i.e. there is no single ParentID ...
1
vote
1answer
84 views

Powershell and SQL Script Execution in selected schemas

Any one please help me on this one also..I have got many schemas under one database. And in that database I have some SQL Scripts to be executed. My issue is that I should be able to execute those sql ...
-2
votes
1answer
88 views

Select data one by one from table and data need to repeat custom number of times [closed]

I have table data like data1 data2 data3 data4 and I need to select these rows like this: data1 data1 data1 data1 data2 data2 data2 data3 data3 and how to perform this in SQL Server 2005?
2
votes
1answer
122 views

PowerShell to get database schemas

I am able to connect to a remote SQL Server with the instance name using PowerShell. I am using an XML file (something like a configuration file) which includes all my database details. PowerShell ...
3
votes
2answers
109 views

How to determine that the chain of log degraded

SQL Server 2005. I have DB with full recovery model. If i execute on my base ALTER DATABASE test SET RECOVERY SIMPLE ALTER DATABASE test SET RECOVERY FULL or BACKUP LOG test WITH truncate_only ...
4
votes
1answer
2k views

Need to divide single column into multiple columns

My table has data with a single column: 1 2 3 4 5 6 7 8 9 10 And I want output like this: 1 2 3 4 5-first row 6 7 8 9 10 - second row Another has two columns like this: Column 1 ...
6
votes
1answer
954 views

How do these snapshot isolation level configurations interact on a SQL Server 2005 instance?

I started troubleshooting a tempdb issue we are having on SQL Server 2005 Enterprise Edition. A developer is getting an error that tempdb is out of space. Technically, the error is: Transaction ...
0
votes
2answers
252 views

Shrink transaction log while transaction in progress

I have a several-GB import into my SQL Server 2005 (Standard Edition) database. The import is separated into 4 parts, each part in its own transaction. As you can guess, the transaction log files ...
0
votes
3answers
83 views

Access to tables in SQL Server

I would like to know if there is a table where accesses to tables are saved, per user or per system. I'm using both SQL Server 2005 and 2008.
3
votes
1answer
389 views

Does the week day number changes according to localization in SQL Server?

Does the weekday number changes according to server/database regional configuration in SQL Server (2005+)?
4
votes
1answer
364 views

After 5 years of working, SQL Server 2k5 Table now locking without any changes made to DB

I have a table: OrderDetails. For 5 years, only the odd Deadlock has occured. If it happened, it happened on indexes which was on OrderDetails table Now all of a sudden, deadlocks are everywhere - ...
0
votes
2answers
234 views

History from SQL Agent Jobs (SQL Server 2005)

how can I able to see all available records from SQL Agent Jobs, because in SSMS is dispayed only reduced number of records are these records stored in system databases, not only in plain log files ...
0
votes
1answer
717 views

How to disable SSMS table designer timeout?

How do i disable the Table Designer timeout in SQL Server Management Studio? Background This KB Article seems to indicate that if you stop overriding the Designer timeout: To resolve this ...
2
votes
0answers
577 views

TempDB MDF file huge after update script ran

On the weekend we had a huge deployment run that affected a large chunk of our system. It was all run in one massive transaction (probably the wrong thing to do). As a result our TempDB DatabaseFile ...
1
vote
0answers
256 views

Problem with sorting matrix groups in SSRS

I've hit the following issue in SQL Server 2005 Reporting Services This is a slightly odd and complicated situation: I have a table containing various groups and within each group is also embedded a ...
0
votes
2answers
243 views

Does a SQL Server job run on the server or the local machine?

Does a SQL Server job always run on the server, or will it run in the context of the local machine, similar to a DTS package run from Enterprise Manager on the user's machine? The job in question ...
0
votes
1answer
212 views

How to add custom sequence number in table which is going to be populated automatically

I have table something like this CREATE TABLE [dbo].[ado_test_table]( [id] [int] IDENTITY(1,1) NOT NULL, [tip] [varchar](10) NOT NULL, [datum] [datetime] NOT NULL, [doc_number] [int] ...
4
votes
1answer
40 views

Verify Query Request Received

I have a software system which queries data via OLEDB from an external SQL Server 2005. The query request is sent every 15 minutes. I want to verify that the SQL Server is receiving the query ...
0
votes
2answers
121 views

SQL Server 2005 xp_sendmail error

I have come across a SQL 2005 server that uses SQL mail to send emails. This setup works fine as long as the MAPI profile points to an Exchange 2003 server, but breaks when the profile points to an ...
6
votes
2answers
1k views

Turning OFF CHECK_POLICY by default

We moved from SQL Server 2000 to SQL Server 2005. The client software, which I can not change, creates a user without option CHECK_POLICY = OFF; After creating a user, I have to run the command ...
6
votes
1answer
249 views

Failed copy job deletes all users

Since the progression of this was apparently somewhat difficult to follow the first time around: I attempted a completely boring, been-done-a-thousand-times-before copy of a database using the copy ...
0
votes
2answers
163 views

Is there any way to connect to one server and utilize a linked server using Windows authentication and NTLM?

I currently have SQL Server 2005 (Server A) that has a SSAS 2005 linked server (Server B). The powers that be do not want to enable Kerberos authentication, so I'm stuck with NTLM. The problem is ...
-1
votes
0answers
278 views

All users missing after a detach/reattach [closed]

After detaching and reattaching a database to do a copy operation, all of the user objects are now missing from the database (I should add that the copy failed; according to the logs, there was an ...
2
votes
4answers
158 views

When should I use the shrink option

I have seen a lot of blogs stating that shrinking is not a good habit as it will reduce the performance of the system. I agree with all those things it will lead to side effects like fragmentation, ...
6
votes
3answers
3k views

Why do linked servers have a limitation of 10 branches in a CASE expression?

Why does this CASE expression: SELECT CASE column WHEN 'a' THEN '1' WHEN 'b' THEN '2' ... c -> i WHEN 'j' THEN '10' WHEN 'k' THEN '11' END [col] ...
2
votes
0answers
81 views

ODBC - how to set up ODBC driver for 2 languages (for different code page)

How to set up an ODBC driver to operate the Polish code page (1250) and Lithuania (1257) at the same time? Although the code page Lithuanian is wider than the Polish code page, the driver incorrectly ...
13
votes
4answers
9k views

Index Seek vs Index Scan

Looking at an execution plan of a slow running query and I noticed that some of the nodes are index seek and some of them are index scan. What is the difference between and index seek and an index ...
1
vote
1answer
137 views

Help with best practice of merging databases

Bad news, our website server (Windows 2003) crashed because of dead RAID controller. Luckily few hours later our backup server was up and website was live again. Hopefully tomorrow our original ...
4
votes
2answers
820 views

Run two SQL Agent Jobs Simultaneously (not sequentially) as the next step

At the completion of Step 1, the job currently goes to step 2 - an osql command to start a Sql Agent job on another server. However at the completion of step 1, I would also like to start a ...