Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

0
votes
1answer
755 views

java.sql.SQLException: Login failed for user 'sa'

I am having trouble connecting to my Microsoft SQL Server database through a jTDS connection: Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433 ...
5
votes
1answer
2k views

Trouble Creating AG Listener: The WSFC Cluster could not bring the Network Name resource

We are trying to create an AG Listener and it errors out on us: It does however seem to create both the DNS entries and the virtual computer object in AD. However, because of this error message SQL ...
2
votes
0answers
339 views

Issues with Indexed Views in SQL Server 2008r2 on a table with persisted columns and with low DML activity

I am issues with using indexed views. I have a product catalog and a stored proc reads the data in the rows according to various filters on the data. At the same time, the data needs to remain in XML ...
14
votes
2answers
426 views

Setting up a central CLR stored procedure / function respository library for internal stored procs in other databases to use?

I would like to use code that I developed in C# CLR to be used in all of the databases on the system so that I don't have to set each to trustworthy and turn CLR on and keep a bunch of the same code ...
3
votes
1answer
399 views

Find out what setting were used for a given stored procedure

As a follow-up to my previous question: is there a way to need to find out what the ANSI_NULLS and ANSI_PADDING etc. settings where when a given procedure was created in my database ? It seems my ...
2
votes
1answer
288 views

SQL Server 2005: Full-text search on a multi-lingual table

I have an articles table as follows. +-----------+--------------+---------+ | uid | int | PRIMARY | | articleId | int | UNIQUE | | lang | varchar(2) | UNIQUE | | ...
-2
votes
1answer
228 views

Invalid database file version error in SQL Server 2005 [closed]

I am experiencing this error message on my SQL Server: Invalid database file version The .MDF in question was working previously. How can I fix this because the information in the file is very ...
0
votes
1answer
307 views

Performance comparison in ways a SSIS package can be run

I'm wondering if there is any difference in performance of a SSIS package if it runs using SQL Server job, vs running using DTEXECUI.EXE Utility or running in BIDS? Also if the target database in on ...
-2
votes
1answer
142 views

Write Intensive SQL Server Architecture

We are working on an application architecture which need to record card activities that happens on different building entrances. There are multiple regions which have multiple buildings in each of ...
1
vote
1answer
181 views

Why Regenerate Snapshots For Merge Replication

I am in the process of implementing merge replication in SQL 2012 with web sync. I am wondering two things, Why is it suggested to regenerate the snapshots every 14 days by default? With web sync ...
2
votes
2answers
198 views

SQL Server and Over-Indexing Tables [duplicate]

Possible Duplicate: Where can I find some guidance on index strategies? I remember taking a course on SQL Server 2000, and the instructor said that you have to be careful of adding too many ...
3
votes
2answers
216 views

which one is more efficient query?

I have a table called STUDENT +-----------+-----------+-----------+---------------+ | StudentID | FirstName | LastName | EnrollmenDate | +-----------+-----------+-----------+---------------+ | ...
9
votes
3answers
6k views

What can cause a mirroring session to timeout then failover? SQL Server 2005

We have two production SQL Servers running SQL Server 2005 SP4 with cumulative update 3. Both servers run on physical machines that are identical. DELL PowerEdge R815 with 4 x 12 core CPUs and 512GB ...
3
votes
2answers
354 views

SQL Server 2005: Full-text search space requirements

Is there a way to calculate the physical drive space required for a full-text search catalog? Space is cheap, but I'd like to know what I'm getting into. I'm looking at a table of about 200 articles ...
2
votes
0answers
110 views

SQL fulltext indexing ranking combined with ranking used by window's file indexing service

We have a list of records contained within a MS SQL database table, we have enabled "Full Text Indexing" on the table. Also, we have set up a window's file indexing service and added a catalog ...
2
votes
2answers
276 views

SQL Replication Commands

I'm trying to figure out how i can get the number of commands over the last day for a sql server replication. Transactional / Snapshot / Merge. I really want to be able to calculate the average ...
1
vote
1answer
52 views

SQL Server 2005: Full-text search catalog design

I'm new to full-text searches, and am curious about how to properly design the full-text catalogs. I have an "articles" table. I would like to do full-text search on both the "title" and the "body" ...
1
vote
1answer
582 views

SQL Server 2005: Full-text search, order by matches

Is it possible to do a full-text search in SQL Server 2005, ordering on the number of matches? For example, let's say I have the following products for sale. Tennis Racquets Tennis Balls Footballs ...
4
votes
4answers
686 views

Speeding up COUNT(*) - WHERE clause slowing query

The following query takes 497 ms to run, if I remove the AND portion onwards it only takes 320 ms. Is there any way to speed this up? The only indexes I have on 'messages' table is a PK on ...
0
votes
3answers
819 views

INNER JOIN making COUNT(*) slow

I have a very simple query: SELECT COUNT(*) FROM messages INNER JOIN users ON messages.user_id = users.user_id With the join it takes 1146 ms and without it takes 220 ms (220 ms still seems slow to ...
2
votes
1answer
2k views

SQL Server 2008 - Run the Check Database Integrity Task with the PHYSICAL_ONLY option?

As part of our nightly maintenance, we include the Check Database Integrity Task which is an encapsulation of the DBCC CHECKDB command. It's beginning to take a considerable amount of time due to the ...
1
vote
1answer
158 views

What is a good way to query data stored in multiple identical tables split by date/time

I have a 3rd party piece of software which records data samples from industrial equipment. This data logging software stores data in sample data tables with approximately one day's worth of samples ...
1
vote
1answer
198 views

How to do a simple SELECT/UPDATE/DELETE performance test?

I have a table which might be causing excessive delays during insertion of new records. I'd like to run a test against the database, measuring how long it takes to select, insert, and delete from the ...
1
vote
1answer
871 views

How to truncate all tables with a specific name in all databases

I want to delete all tables named error_log in all of my databases that have such a table. truncate table error_log I am using SQL Server 2000.
3
votes
0answers
240 views

SQL Server Replication :: Dedicated Distributor Hardware Requirements

Does anyone know any rules of thumb (or better) with regards to hardware requirements for a dedicated distributor server? i.e. Based on estimate metrics (e.g. number of subscribers, publishers, ...
3
votes
1answer
402 views

Should I restart the instance after adjusting Memory Allocation and MAXDOP?

As far as I know adjusting Maximum server memory and Max Degree of Parallelism does not require the instance to be restarted. Will new settings always come into effect without restart?
3
votes
3answers
780 views

CROSS JOIN with temp table and CASE statement

I'm trying to CROSS JOIN a table with a view. Here is my code: SELECT * FROM ( SELECT * , CASE TypeId WHEN 1 THEN InGs828S WHEN ...
0
votes
2answers
172 views

Transfer data from database1 to database2 using task queue

We have a SQL Server legacy database, db1, to put data of Project1. With change of certain tables(insert/update) in db1, we need to transfer the changes in another postgres database, db2 (used by ...
4
votes
4answers
303 views

Recommendation for free event monitoring software

I'm seeking recommendations for free / open event monitoring tools. HPOV costs continue to multiply like so many wet gremlins, and we've had enough. There are some interesting suggestions in this ...
6
votes
1answer
2k views

OPTION FORCE ORDER improves performance until rows are deleted

I have a somewhat complex SQL Server 2008 query (about 200 lines of fairly dense SQL) that wasn't performing as I needed it. Over time, performance dropped from about .5 seconds to about 2 seconds. ...
2
votes
1answer
755 views

Is the SQLTRACE_FILE_BUFFER wait type documented? What does it indicate?

We run a background task on one of our servers which polls sys.dm_exec_requests for long-running queries, gathering diagnostic information when it finds them, including wait type. I'm seeing a number ...
9
votes
1answer
1k views

Best way to re-import large amount of data with minimal downtime

I need to import about 500,000 records containing IP lookup (read-only reference) data about once a week (only three int/bigint cols). I don't really want to worry about merging the data with the ...
4
votes
3answers
136 views

Can anyone describe the step by step process of recovery , backup and restore in sql server

Can anyone describe the step by step process of recovery via backup and restore in SQL Server 2008. If possible please include some examples.
0
votes
1answer
275 views

Escaping a single quote in SQL Server 2005

I am using SQL server 2005 and using the northwind database. I need the supplier id of Grandma Kelly's Homestead and I used this query: select supplierid from suppliers where companyname ='Grandma ...
1
vote
1answer
87 views

Where can I find guidelines for building a SQL Server machine specifically for DBCC CHECKDB work?

I'm working on defining specs for a new server to run DBCC CHECKDB scans on all databases in our portfolio (85 instances, 1300 DBs, 15 TB allocated). I have a custom application that copies dump files ...
5
votes
3answers
201 views

Difficulty in moving a SQL Server database

I'm trying to upgrade from SQL Server 2008 R2 Express to Developer. My plan is to remove the Express edition, then install the Developer edition. I have one database I need to bring over to the new ...
3
votes
4answers
11k views

SQL Server CREATE FILE encountered operating system error 5 (Access is denied.)

I'm trying to execute the following script in SQL Server Management Studio but I'm getting the error: Msg 5123, Level 16, State 1, Line 2 CREATE FILE encountered operating system error 5 ...
1
vote
3answers
86 views

Generally speaking, what pecking order should be used when tuning SQL Server?

When tuning SQL Server, what generally is the pecking order to use when trying to decide what to tune first? I'm asking in regards to an existing database that would I would have little ability to ...
3
votes
1answer
65 views

In SQL Server Replication, at what point is it recommended that one separate the distributor?

Is there a general rule of thumb for when it becomes good practice to assign distribution responsibilities to a separate server that is not also a subscriber? e.g. "At n publishers/publications ...
2
votes
2answers
359 views

Make sure two columns are sorted in the same order

I have a table like this: CREATE TABLE T ( ID INT NOT NULL IDENTITY PRIMARY KEY, CreateDateTime datetime2 NOT NULL, --other columns ) How can I make sure that ID and CreateDateTime are both ...
12
votes
2answers
2k views

SQL Server does not optimize parallel merge join on two equivalently partitioned tables

Apologies in advance for the very detailed question. I have included queries to generate a full data set for reproducing the problem, and I am running SQL Server 2012 on a 32-core machine. However, ...
2
votes
1answer
127 views

Can I move data and full text search files to another drive and change the drive letter?

My server's G: drive is rapidly running out of space. It mainly contains data files (*.mdf) for both system and user databases. The FullText Catalogs also exist on that drive. IT added a much lager ...
4
votes
1answer
117 views

unique constraint on a set

With reference to this SO question, what would be a correct way to implement Unique tag Combination Constraint in SQL Server 2005? To illustrate the problem, I make an example: A tag_bundle consists ...
4
votes
1answer
624 views

Where are queries against a linked server actually processed?

How is a query against a linked server processed? Does the linked server use its optimizer when it receives a query from a remote source? There are a few scenarios about which I'm wondering: Scenario ...
0
votes
6answers
526 views

Equivalent of CHARINDEX OR IN for ints

I want the equivalent of this for ints. --Valid SQL DECLARE @users AS nvarchar(50) SET @users = 'Joe ,Bob,Fred,Tim' --1,2,8,23 select * FROM Person AS p WHERE CHARINDEX(p.sFullName,@users) > 0 ...
7
votes
1answer
161 views

Dynamic Dimension Security

I have a cube in SSAS 2012 with about 30 dimensions, one of which is Company. The Company dimension contains a list of companies, of which there are several hundred in the cube. Our security model ...
1
vote
4answers
494 views

Backup and restore of RDBMS(Oracle, DB2, SQL Server) from Perl

What could be the best approach ? Till now could figure out the following (Oracle) Calling exp.exe and imp.exe utilities in Oracle client using Java and inturn call it from Perl. Calling exp.exe ...
3
votes
5answers
306 views

Single query to return counts over different IDs in a single record

select count(title_id)as algodata from titles where pub_id =1389 select count(title_id)as binnet from titles where pub_id =0877 select count(title_id)as newmoon from titles where pub_id =0736 ...
0
votes
2answers
897 views

Doing a comparison on two csv files with no Primary Key

I'm wondering if in SSIS there is a way to compare two csv files(with the same structure) with no reference key to make a record unique. To give you a better picture from what I mean; In initial load ...
3
votes
2answers
2k views

Copying View in Management Studio

I want to copy a VIEW from one server to another. I could copy tables but I can't copy views. Is there a way to do so? Thanks