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)

2
votes
1answer
243 views

Do I trace an Active Directory group based database login the same way as an AD user based login on SQL Server?

We are currently undergoing an PwC audit on our database logins. Some of our user accounts have sysadmin privs, which of course is a major security breach. I have successfully done traces on ...
0
votes
1answer
104 views

What is the rationale for requiring a column list when inserting into a table with identity column?

When inserting into a table with an identity column from some similar staging table, we have to set IDENTITY_INSERT to ON and specify a column list. Why do we have to specify a column list in this ...
4
votes
3answers
1k views

How can I make my SSIS process consume more resources and run faster?

I have a daily ETL process in SSIS that builds my warehouse so we can provide day-over-day reports. I have two servers - one for SSIS and the other for the SQL Server Database. The SSIS server ...
2
votes
3answers
3k views

How to programmatically remove a push subscription?

I have 4 databases, a publisher and 3 subscribers (transactional replication). In case of an error in the publisher I want to: delete all subscriptions create a new publisher make the two remaining ...
2
votes
1answer
2k views

How can I have SQL Server listening on more than one IP address?

I have a an SQL server that normally listens on a private IP address (10.x.x.x). However, I would like to be able to connect to the database over the public (31.x.x.x). I tried to enable this tonight, ...
5
votes
1answer
4k views

Remote Debugging

I'm having an issue with remote debugging. I have a non-domain server and a non-domain client PC. The client PC can successfully connect to the server and the instance, and it even runs SSMS as the ...
2
votes
1answer
209 views

How do I store more than 15,000 Japanese characters in a column?

I want to store more than 15,000 characters of Japanese text in a SQL Server 2008 database. We have a front end tool that will display this text.
6
votes
1answer
406 views

Permission to create Spatial Index

Permissions required to create a Spatial Index on a table, for this BOL says: Requires ALTER permission on the table or view. User must be a member of the sysadmin fixed server role or the ...
4
votes
1answer
6k views

Windows Authentication for a non-local non-domain Login

I have SQL Server 2008 R2 installed on a Windows Server 2008 R2 box. There is no domain in the network. Is there any way for me to add a Windows Login on SQL Server for a non-local and non-domain ...
3
votes
2answers
475 views

High CPU usage by GHOST CLEANUP after DROP FK and DELETE

I am trying to replace data in table referenced by FKs in other tables on SQL Server. There are more than 1M rows in both referenced and referencing table and I want to make the replacement atomic. ...
4
votes
3answers
4k views

Datawarehouse Design: Combined Date Time dimension vs. Separate Day and Time dimensions and timezones

We are just starting design for a new data warehouse and we're trying to design how our date and time dimensions will work. We need to be able to support multiple timezones (probably at least GMT, ...
0
votes
1answer
1k views

Is there any way to turn off the “loading” message when a page refreshes in Reporting Services?

I have a report that auto-refreshes every 30 seconds. Usually this happens fast enough that you don't even notice. Sometimes, however, the load takes a bit longer. When this happens, the existing ...
2
votes
3answers
133 views

SQL Server Index: One new table joining to three old tables, how to?

how can I index this? In a legacy system, I need to store (new table) and search on three possible natural key combos. I'm thinking my new table will be: declare @TableA table (pk int identity(1,1) ...
3
votes
2answers
3k views

SQL Server 2008 R2 MERGE statement to replace single INSERT AND UPDATE statement combined

for performance reasons, we're considering changing our standard stored procedure for saving data (INSERT and UPDATE combined in a single stored proc): ALTER PROCEDURE [dbo].[spCustomerSave] ( ...
2
votes
2answers
739 views

Creating a view on a non-existing view

I have a whole bunch of views that I need to create. Many of these views depend on other views. If I create a view that depends on a view not yet created, I get an Invalid Object error. Rather than ...
3
votes
1answer
124 views

Database performance for determining entities assigned to users

I am interested in insight in improving performance in the following instance: I am currently working on an application that has a hierarchical entity structure where, depending on a user’s level ...
1
vote
1answer
1k views

Estimated vs. Actual rows and multi-column statistics

I'm trying to understand multi column indexes and statistics, here is my real world example: Table: TaskExecutions, size=~1 million rows. Query SARGS: TaskExecStatusID = 3 AND TaskExecUpdatedDate IS ...
1
vote
1answer
4k views

Select a single row from two distinct columns [duplicate]

Possible Duplicate: How to get the MAX row I need to fetch the "latest" row for certain conditions in my tkhist1 table. Tickets are bound to TicketNo and LocationID, and I need to select ...
1
vote
1answer
124 views

Is maintaining a single database an issue when the underlying project becomes larger?

I have seen this related post but it was more focusing on the amount of consumers for the databases, which is not my only problem. I have a situation, where I am taking part of the design of a new ...
5
votes
1answer
525 views

Will a clustered index improve performance of updates performed sequentially on that clustered index?

I know indexes reduce data modification performance, but I have a task where (almost) all updates are done on items in a sequential order. Would a clustered index improve or reduce performance in ...
12
votes
4answers
8k views

What's better for large changes to a table: DELETE and INSERT every time or UPDATE existing?

I am making a project where I need to change around 36K records in one table daily. I'm wondering what will perform better: delete rows and insert new ones, or update already existing rows For me ...
5
votes
1answer
422 views

Is a Named Instance more Secure than the Default Instance?

I realize that you can change the default instance from the default port of 1433, and equally you can make named instances use static ports as opposed to dynamic ports, but in general are named ...
1
vote
3answers
2k views

Why would recompile query hint result in different plan for same adhoc statement after freeproccache?

This is on SQL 2005 SP2, but I suspect this is something that applies to all query hints in general. I've got an adhoc sql statement that gets a different query plan solely because of ...
3
votes
1answer
914 views

Programmatically copy index from one table to another, via a stored procedure?

I use a stored procedure to copy the tables from one database to the other database. Right now it does insert into copy select * from original I would like to copy the index from the original ...
3
votes
2answers
32k views

How to include a datetime parameter within a stored procedure along with string query?

My stored procedure is as follows, -- Add the parameters for the stored procedure here @FromDate datetime, @ToDate datetime --Select query DECLARE @query nvarchar(max) ...
4
votes
1answer
1k views

What is Sql Server Clustered Index in Oracle terminology

A clustered index in sql server like a dictionary or telephone directory. A,B,C,D it goes on. If you look up with a name Ozgur you start O then z etc. I would like a simple explaination for this ...
2
votes
2answers
98 views

Extra tables are added when I create a new Database

This is a really weird problem. When I create a new DB from a script I'm getting extra tables added. These aren't system type tables but regular tables that look like they may have come from a past ...
11
votes
5answers
5k views

SQL Server 2008 Full Text Index Never Seems to Complete

Our website has a SQL Server 2008 R2 Express Edition database with full-text indexing for our website search. Each time a new record is added or updated in one of the indexed tables, the indexing ...
6
votes
3answers
1k views

How recording of every change of a row in a database is generaly stored?

In a project I'm working on, every change to the rows in some tables of the database must be tracked for further audit or rollback. It must be easy to find who modified the row, from which IP address ...
1
vote
0answers
3k views

Transactional replication subscription not showing in SQL Server Management Studio [closed]

I tried to set up 3 SQL instances, one publisher 2 subscribers, to replicate data between them. I did it using the GUI wizard and all went fine in the Publisher: my publication appears under "Local ...
2
votes
1answer
34k views

How to determine used/free space within SQL database files?

I normally use the following method to determine the free/used space within each file of a database: Select *, fileproperty(name, 'SpaceUsed') as Used From dbo.sysfiles This returns total and used ...
1
vote
1answer
3k views

High PageIOLatch_SH Waits with High Drive Idle times

We are experiencing high volume of PageIOLatch_SH waits on our database (row counts in the Billions). However it seems that our drive Idle time Percentage hovers around 50-60 percent. CPU usage is ...
2
votes
2answers
6k views

Why Isn't the SQL Server Agent Service Set to Automatic Startup by Default?

After a default install of SQL Server 2008 R2, the SQL Server Agent process seems to be set to manual startup. What is the reason for this? Is setting to automatic a bad idea or pointless for some ...
2
votes
5answers
682 views

Pros and cons of having one table per entity vs. having a shared table with an extra column indicating the entity type

I am working on a database design and am wondering about the pros and cons of two setups. I am going to collect data about two types of entities, lets say cars and boats. The structure of the data ...
1
vote
4answers
1k views

How to avoid select combinations created with multiple parameters (with value or without value) passed in to stored procedures for a select in sql?

I've a situation where 4 parameters are passed to a stored procedure, on the basis of the existence of these parameters i need to modify the where condition of my select query. Simply i can use ...
6
votes
5answers
487 views

Are these good indexing guidelines?

I use indexes regularly but it's still hard for me in certain conditions to know if they are helping or hurting. There are a few guidelines I follow, but I am not sure if they are good nor am I sure ...
3
votes
2answers
747 views

How to identify connections using implicit transactions?

I'm investigating a blocking issue that I believe is related to implicit transactions not being committed or rolled back. How can I identify connections that have turned the implicit transactions ...
2
votes
1answer
7k views

Column size with datatype decimal

According to BOL for SQL Server 2008 R2 the data type decimal requires the following storage bytes: Precision Storage bytes 1 - 9 => 5 10-19 => 9 20-28 => 13 29-38 ...
0
votes
2answers
856 views

In SQL Server 2008, is possible to one database subscribe 2 publications for the same database? (merge replication)

I'm trying to set up an high availability architecture using merge replication. I have 3 databases, and I'm trying to keep them all up to date with merge replication. So far I've manage to create one ...
2
votes
1answer
2k views

Meaning of SSMS database icon preceded by scroll with red x

SSMS 2008 R2, connecting to a 2008 instance shows the above glyph in SSMS Object Explorer. None of our other instances show that icon. I've moused over it in the vain hopes that I'd get a useful ...
1
vote
1answer
707 views

Doing a bulk insert in SQL Server

I have to do the insert operation in the db as follows, I create an item I create 5-10 properties for that item, all these data i get in the form of a collection of objects. I donot want to ...
1
vote
1answer
416 views

Read .sql file into a database

I created a sql database and filled it with some good data. Now I'm trying to move all the stored procedure over to another database instance. I exported the entire source database, including beloved ...
8
votes
1answer
394 views

Best tool to optimize SQL Server (not the queries, but the database itself)

Does anyone know what is the best tool to optimize an entire SQL Server database? I'm not talking about how to write the queries but more how to manage the database file, indexes, paging and ...
0
votes
1answer
164 views

Maintenance Plan produces BAK files I cannot use

I have a maintenance plan that does the following: Check Database Integrity Shrink Database Reorganize Index Rebuild Index Update Statistics Clean Up History Backup Database ...
2
votes
2answers
155 views

How can I prevent/detect that a end user restored a backup?

We need to prevent the SQLServer 2008 .mdf file from being replaced by the end user of our application. we collect data in the MDF that is important to us. If the user saves an old copy of the MDF, ...
4
votes
2answers
540 views

Personal Instance on Personal Computer

I finally got my hands on a copy of SQL Server 2008 R2 Developer Edition. I have installed an instance on my server at home. I wanted to get all the Management Tools (SSMS, Profiler, etc.) on my ...
1
vote
2answers
328 views

Best type to use in a composite key when one of the values varies in type

I am building a data store for the content of multiple blog sites which have been scraped. Each of these sites is going to have an entry in a Blog table BlogId Url ...
1
vote
4answers
6k views

Attaching database to the SQL server

I have the following error The database 'Test' cannot be opened because it is version 661. This server supports versions 655 and earlier. A downgrade path is not supported. Usually this kind ...
5
votes
3answers
786 views

Books on optimizing and refactoring SQL stored procedures

Can you please recommend resources to write efficient store procedures, refactor and optimize them? EDIT: - jcolebrand ♦ The intent of the answers to this post may be books or non-transient blogs. ...
10
votes
4answers
4k views

Help me choose a RAID level combination for a SQL Server 2008 instance

I am going to rebuild one IBM 3400 server from scratch. This server is dedicated to a SQL Server 2008 instance running on Windows 2008 R2. I am going to make new RAID configuration. I have 6 SCSI ...