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)

1
vote
1answer
285 views

JDBC Read uncommitted in SQL Server

If I set the jdbc isolation level to read uncommitted in SQL Server, will SQL Server ever lock any tables, pages, rows etc? Thanks.
-4
votes
2answers
466 views

Performance Improvement in SSRS' Reports [closed]

There are reports build in SSRS 2008 by some user. I need to improve the performance of the already-build reports. The reports fetches a lot of data and run very very slow. I googled and found ...
1
vote
0answers
56 views

SQL Server Database Size much higher than the backup size after restore [duplicate]

Possible Duplicate: Why is a .bak so much smaller than the database it's a backup of? The database backup size is around 120 MB but when I run Restore FileListOnly, I see that the data ...
1
vote
1answer
980 views

Find last (max) value according to TimeStamp using update method

I have task to find values of integer according to last (max) of timestamp (datetime) value. Because it is so complicated query I am consindering this way to find last value something like this ...
0
votes
1answer
220 views

Stored Procedure is not returning complete result

I am using the query as mentioned in the answer accepted in the question located at Stored Procedure doesn't show result in SQL Server Now when I run this SP with the values provided in the ...
1
vote
2answers
2k views

How to update SQL Server 2012 from Evalutation to Developer edition?

During the installation of a new development infrastructure, I had to install many SQL Server instances on different machines. Some were of course dedicated for production and some other for ...
0
votes
0answers
44 views

Database security through stored procedures [duplicate]

Possible Duplicate: Do stored procedures prevent SQL injection? I'm curious about some database security techniques I've been learning in class recently. Namely, I have implemented a SQL ...
2
votes
4answers
6k views

Cause of High Disk Queue Length in SQL Server

I have a fairly high-throughput application that occasionally decides to collapse on me. It's not very often - about once every ~3 weeks or so. When it does, if I check out perfmon, I see 100% "Avg. ...
3
votes
2answers
175 views

Setting up users and admins with schema privileges

I currently have a database that is split into two schemas: data and ref. I have two database roles named Users and Admins. Users need to be able to INSERT, SELECT, UPDATE, and DELETE from the data ...
2
votes
1answer
95 views

Associate a piece of data with a session

I think I want to associate a piece of data with each session. The association must have the following properties: The data being associated is provided either as a part of connection string (if ...
2
votes
1answer
724 views

Is Index causing timeouts?

Recently, while fine tuning the db for better perf, I changed a couple of indexes on tables which were hit very often. I am using the following query to keep tab on index stats SELECT DISTINCT ...
2
votes
1answer
237 views

Stored Procedure doesn't show result in SQL Server

I have created a stored procedure (to be used in SSRS) that has parameters whose values are more than one. When I execute this stored procedure in SSMS by providing the values for that parameter, SP ...
2
votes
1answer
472 views

How to design database for tree view with an infinite depth

I am trying to combine C# and SQL2005 for an application which need to have tree view control. One of user requests is to that tree view can user friendly grow into infinite dept of child nodes. That ...
6
votes
2answers
221 views

Few Questions about SSAS Cubes

I am newbie to SSAS 2012 and here are my questions: Can we have measures of complex types (table)? Is it possible to order the results by a specific measure or attribute? My cube can be modeled as ...
4
votes
5answers
2k views

Does SQL profiler affect server performance?

I am facing a problem where the sql server 2008 fails for some high load. I need to find that load case and need to optimize the code so that it can handle the load. I have found on the internet that ...
3
votes
2answers
524 views

removing group by clause with SUM

So lets say I have a table, MyBigTable that has student scores of an examination. So lets say the structure looks something like id name school board exam_partA_score exam_partB_score Then I need ...
2
votes
1answer
63 views

How to consolidate script duplication?

I just want to know how you deal with long scripts and redundant information. Here is an example: Suppose you have three tables: table1, table2, and sometable. And you have SELECT id = 1 org ...
3
votes
1answer
95 views

Relationship with a default value

Firstly, I know my title is somewhat misleading, but I couldn't think of a better title. Here is my current relationship CREATE TABLE Events ( ID INT IDENTITY(1,1) NOT NULL, Name ...
6
votes
3answers
5k views

Converting RTF in a text column to plain text in bulk

I have a legacy system with about 10 million rows in a table. In that table there is a column of type text, most of them are standard text but about 500 thousand rows have RTF markup in them. I need ...
2
votes
2answers
424 views

Is it OK to create hundreds of databases in SQL Azure versus one big one and run the risk of deadlocking

I need to create highly scalable solution - where field devices in thousands of sites are delivering data in real time to a back end system, and SQL Azure seems to fit the bill nicely in terms of ...
2
votes
1answer
129 views

After dropping the clustered index, it is still attempting to do a clustered insert [closed]

I am trying to convert data from one database system to another. One of the tables I need to transfer and format contains over 10 million rows. I am running the following script to do it: USE ...
3
votes
1answer
1k views

Memory utilization per database - SQL Server

I am trying to find the memory utilization per database(using dmvs) in a sql server instance, ie (Buffer Cache + Procedure Cache) over a period of time. I have the query to get the buffer cache ...
17
votes
3answers
5k views

Which PowerShell technique should I use to talk to SQL Server?

I'd ultimately like to use PowerShell to replace the old KornShell scripts we use for SQL instance monitors. I'm having a hard time, though, getting my brain around all the different ways that ...
2
votes
2answers
100 views

Hosting ASP.Net session database on same same instance as the user database?

We have a web farm using SQL Server sessions. We are seeing occasional timeouts connecting to the session DB even though overall utilization is low. The ASPState session database is on the same ...
2
votes
2answers
1k views

Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users

I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
-2
votes
1answer
68 views

Who is the original author/creator that took the time to fill/create Northwind SQL server sample database? [closed]

I've used it before, but I never really seen any documentation in SQL server pointing to who actually created it. Is it a person, a group of people? Did Microsoft create it? Who??
7
votes
2answers
394 views

Can Availability Groups replace transactional replication?

I've been looking at the new features of SQL Server 2012, and how it can help my current situation. Currently we're on SQL Server 2008 R2, and replicate two OLTP servers' databases to a single ...
5
votes
1answer
774 views

In a CASE Statement, which is faster: “WHEN [field] in (0)” or “WHEN [field] = 0”?

I'm looking at a stored proc that another guy has written and every WHEN clause is using an IN statement instead of =. My gut tells me this isn't as fast, efficient, etc. For example: CASE WHEN ...
2
votes
2answers
144 views

Is it possable to do a ALL SERVER DML Trigger?

My department works on converting a client's database when a client switches from another company to us. We have a RDP session they can connect to and see our software with their data. Once they ...
1
vote
1answer
2k views

Clarify - Need to add Multiple foreign key constraints

I am not sure if I am thinking about this process the wrong way. Just to Surmise if I create a table(TeamList) whose sole purpose is to capture the coaches team list of players and positions for a ...
3
votes
3answers
494 views

View foreign key constraints so I can delete a table

I have copied a database I was working on so I could change some key elements of its design for my new version. I want to delete totally some tables from the database however I cannot due to some ...
9
votes
0answers
3k views

Fast SQL query with * but extremely slow with specific columns? [closed]

We have a query that we're running on SQL Server 2008 in the Management Studio. I can't give the exact query details, but let's say it's equivalent to this: SELECT * FROM MyView a (nolock) INNER ...
0
votes
1answer
218 views

Write Access Client App for SQL Server 2005 Backend [closed]

I'm writing an inventory/payroll system, and I'm storing all the records on a remote server running SQL Server 2005 on Windows Server 2008 R2. I was wondering how I could start writing forms(very ...
2
votes
1answer
187 views

Including clustered index key in non-clustered index

We're running SQL Server 2008. In looking over the results of a query I ran on sys.dm_db_missing_index_* views, I see a curious suggestion for an included column. I have the following two tables: ...
12
votes
3answers
2k views

Anybody using HierarchyId in production? Is it reliable?

Is anybody using HierarchyId in real production with tables of reasonable size, more than a few thousand rows? Is it reliable/performant? So far I have not found anyone not affiliated with the vendor ...
5
votes
4answers
1k views

Do I really need to keep .LDF files?

Each month we make an end of month snapshot of our production databse. These month end snapshots are strictly for reporting purposes, there are no inserts, updates or deletes ever done on them. Each ...
3
votes
1answer
830 views

SQL Backups - Full vs Differential vs Log Shipping

I'm looking to refine our SQL backups utilizing Full, Differential, and Log Shipping. Currently, I am only performing full backups once at night. This process is taking so long that it is running ...
15
votes
4answers
12k views

When is it OK to shrink a Database?

I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming. The list goes on... That being said, say I have a 100 GB database and I ...
1
vote
1answer
774 views

Index Strategies on Text or NVARCHAR(MAX) Fields

I have the following query (simplified for question) I'm trying to speed up for a read only DB ... SELECT [sysid] ,[Date]=CONVERT(CHAR, DATEADD(D, [date], '1800-12-28'),101) ,[From]=[from_addr] ...
3
votes
1answer
214 views

Optimizing queries against a set of tables that contain partitioned data

I have a third party program that creates and populates a series of tables to hold some historical data: data_33 -- contains data for 12/01/11 - 12/05/11 data_34 -- contains data for 12/05/11 - ...
3
votes
1answer
4k views

SQL Server 2008 R2 on Windows 7 x64 Professional - what are the downsides?

I need to minimize the cost of the platform, that will run SQL Server 2008 R2 Standard Edition. I have a special licensed version of this SQL server to work with like 20 users (it's an 1C special ...
3
votes
3answers
198 views

How do you ensure accuracy of your query

I am have a table with about 100,000 rows. Lets suppose the primary key is some sequence of numbers like a barcode for example. I am doing checks like SELECT count(*) FROM TABLE WHERE ...
3
votes
2answers
3k views

What are the limitations of Toad for SQL Server freeware? [closed]

I just downloaded the freeware version of Toad for SQL Server. Toad's download site says: "the Freeware edition has certain limitations, and is not intended to be used as a TRIAL for the Commercial ...
2
votes
2answers
737 views

ETL: extraction strategy for 200 source databases

What is the best extraction strategy for approximately 200 SQL Server 2005 source databases (same schema) for a daily load into a staging area in preparation for data warehouse cleansing, ...
3
votes
2answers
5k views

Returning a result set with multiple rows based on max date

I have a child table that is something like this: [Cust Date Table] | Customer ID | Some Date | Balance | +-------------+------------+---------+ | 1 | 2012-04-30 | 20.00 | | 1 ...
1
vote
1answer
715 views

Weak entity and one-one or many-many relationship

In Entity Relationship Model, can the supporting (or identifying) relationships of the weak entities be many-many or one-one rather than many-one? Suppose I have a customer entity (C), a video entity ...
3
votes
2answers
9k views

How to add a user with access to a single view?

I'm working with MSSQL Server Management Studio 2008 and I need to expose a view to a third party for their data reconciliation. I have created the appropriate view but I'm having trouble creating a ...
3
votes
1answer
268 views

Changing Query Results?

I have a query that I am running and I just noticed that every time I run it, it is returning a different amount of records (usually less by 1 or 2 rows). My question is how can this be possible? I am ...
2
votes
1answer
196 views

What is a parse tree object?

I have looked into sys.syscachedobjects table. I found some records have an object type of parsetree. Can anyone tell me in detail what a parsetree is? Is this a data structure used by SQL Server, ...
1
vote
2answers
558 views

Backup database and clean old backup question

Right now we have a maintenance plan which looks like this: backup all databases clean old backups (> 24 hours) This job runs every day. Every now and then this script crashes during backup step ...