Tagged Questions

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

learn more… | top users | synonyms (2)

1
vote
1answer
300 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
76 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
904 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
973 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
123 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
478 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
0answers
69 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
87 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
112 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
106 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
867 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
232 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
377 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
349 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
221 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
666 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
548 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
237 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
242 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
206 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
116 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
248 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
157 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
271 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
2k 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
74 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 ...
11
votes
4answers
8k 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
136 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
770 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 ...
3
votes
3answers
4k views

How to check if I am hitting the Express Edition size limit?

I am confused. AFAIK SQL Server 2005 Express has a limit of 4GB database data size. However I have the following results from sp_spaceused: How can I check if my DB is hitting the size limit? Is ...
0
votes
1answer
245 views

File locations for Full Text Catalogs using SQL Server 2005 on VMware

I have an issue with one of our development SQL Server Servers. We have databases that use full text search catalogs. Just some background info, our servers are configured to use separate drives for ...
0
votes
3answers
2k views

How to find all positions of a string within another string

How can I find all the positions with patindex in a table or variable? declare @name nvarchar(max) set @name ='ali reza dar yek shabe barani ba yek ' + 'dokhtare khoshkel be disco raft va ali ...
8
votes
2answers
670 views

If I fail over one database, do the others that share the same mirror endpoint fail over as well?

We have two databases setup for mirroring on a single SQL Server instance: a test database and a production database. Both get mirrored to another server using the exact same endpoints. If I go into ...
1
vote
0answers
2k views

DELETE failed because the following SET options have incorrect settings: 'ANSI_NULLS'

I have inherited a few scripts that are pumped through a c#.NET custom app to update a SQL2005 SP3 database. One of these scripts does a deletion on a user table called msw_timer_task, based on a ...
3
votes
3answers
3k views

How can I search the full text of a stored procedure for a value?

I use the following script to search the text of all stored procedures when I want to find specific values. SELECT ROUTINE_NAME, ROUTINE_TYPE FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION ...
1
vote
2answers
107 views

How to backup databases to ensure data recovery

I have 15 customer databases that have minimum replication at different sites. I currently do nightly back-ups and transfer the database back-up nightly to our main server via 7zip. We recently had ...
2
votes
4answers
4k views

How can I query data from a linked server, and pass it parameters to filter by?

I have a really big query that needs to be run on multiple databases, and the results appended to a temp table and returned. The basic syntax looks something like this: INSERT INTO #tmpTable (Id, ...
2
votes
2answers
2k views

Restoring differential backup from SQL Server 2005 to SQL Server 2012

We are migrating a client to a new server. Their old server has SQL Server 2005. I have attempted to perform a differential backup however I received an error about the LSN chain being broken. Please ...
2
votes
2answers
72 views

Is there a better way than the ones listed within to join data in an excel spreadsheet to a table in a SQL Server database?

Let's say I'm given a list of names and email addresses in an excel spreadsheet. I am asked to find all customers in the database who's name, and email are in that list. I currently know of two ways ...
2
votes
0answers
57 views

How can service pack rollback file end up on non-system volume?

I'm attempting to upgrade a SQL 2005 SP3 clustered instance to SP4. During installation, a rollback event took place with the error indicating there was insufficient space on the the disk. The system ...
1
vote
0answers
126 views

When converting a table valued function to inline, why do I get a lazy spool?

I have a table valued function that I want to convert to inline to improve performance. It sets the value of variables to the value four bit columns in one row of a table (looking up the row using a ...
2
votes
2answers
2k views

Can I copy the table structure of a #temp table to a new physical table?

I have a #tempTable that was created using SELECT * INTO #tempTable FROM OPENROWSET('Microsoft.Ace.OLEDB.12.0', 'Excel 8.0;Database=MyFileName.xls', 'SELECT * FROM [Sheet1$]') Is there an easy way ...
0
votes
1answer
102 views

Should database files be on different disk(s) than OS?

My very short overview SQL Server databases are installed as virtual machines on VMWare, there are plugged a few disk areas with the same (or very similair) parameters versions are SQL Server ...
5
votes
1answer
2k views

How do I shrink the physical Transaction Log file when it's the principal in a mirror?

We setup database mirroring over the weekend, and forgot to re-enable the job that backs up the transaction logs. When I came in this morning, the transaction log had ballooned to 58GB, and was taking ...