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
0answers
14 views

Splitting a csv column from select query into multiple columns

I have a stored procedure SELECT [ShipWorks].[dbo].[OrderItem].[Code] AS Code, CASE WHEN (LEN(ISNULL(MAX([ShipWorks].[dbo].[OrderItem].[Location]),'')) = 1) THEN ...
2
votes
0answers
4 views

Sql Server data files in Windows Azure

excuse me for my bad english I just created a database using the new functionality "SQL Server 2014 data files on Windows Azure" and works quite well, however, I have a table with a Billion records, ...
0
votes
0answers
5 views

Export sql server table connections schema

i am using RazorSQL to connect to a Microsoft SQL Server database. I am looking for a way to visualize the tables connections schema. Do you have any idea how I can export such a view?
0
votes
1answer
6 views

best way to deal with imperfect xls source file that needs to be imported into SQL via SSIS

The data is formatted like this: Date Type Account 1/1/14 AAA 111 112 113 BBB 114 115 ...
3
votes
4answers
177 views

How do I place leading zeros for numbers less than 10 without affecting those 10+?

Probably a newb question, but... I have a table with a VARCHAR field containing numbers 1 through 300. I need to place a leading zero in front of any numbers less than 10 while retaining the original ...
0
votes
1answer
17 views

Getting null block_st.text when querying for blocks

We are using the blocking query from this article which queries sys.dm_tran_locks. http://simplesqlserver.com/2013/05/21/blocking-capturing-and-monitoring/ The issue we've ran into is that often ...
1
vote
1answer
22 views

Restore Verify Only w/ Transaction Log Backups

Question When RESTORE VERIFY ONLY on a transaction log backup fails, what do you do? Background After FULL and DIFFERENTIAL backups, I run RESTORE VERIFY ONLY on the backup file(s). This rarely ever ...
0
votes
2answers
48 views

SQL 2008 Server - performance loss possibly connected with a very large table

Migrated from http://serverfault.com/questions/615129/sql-2008-server-performance-loss-possibly-connected-with-a-very-large-table We have SQL Server 2008 with 3 active databases running on it. DB1 ...
2
votes
1answer
39 views

Implementing application locks within SQL Server (Distributed Locking Pattern)

In my application I have to perform a distributed locking pattern. Because we already have an instance of SQL Server to use, we decided that it would be easiest to implement the locking at SQL layer ...
0
votes
3answers
40 views

How to display posted on date and time like1 hr ago or 30 min ago

i want to show the posted date like 1 hr ago.. or 30 min ago.. declare @date datetime ='2014-07-24 11:50:22.033'; SELECT CASE WHEN DATEPART(DD,@date)=DATEPART(DD,GETDATE()) THEN CASE WHEN ...
0
votes
1answer
16 views

SQL Server NULL values UNDO

I mistakenly updated the null values in my table to a string similar to an already present string. For e.g. I changed the NULL values to 'WL:5' and there were records for 'WL:5' already present. I ...
0
votes
3answers
46 views

Matching two rows in a single table if two specific keys have different values

I have a table called settings in that there are two columns and data like following. settings value ------- ------ depots 12 projectid 156 client ...
0
votes
1answer
22 views

Copying a table in SQL Server database to Oracle database

I am new to database management. I need to copy a particular table "Attendance" in SQL Server database to Oracle database. There is no connection between the two databases. Also, "Attendance" is ...
1
vote
1answer
10 views

Workload Groups in SQL Server 2012

I have been looking for an answer about "Workload Groups" in SQL Server? What exactly it is Workload Groups? Could you explicit a real world situation when this term is used? Thanks in advance ...
0
votes
1answer
50 views

Why is my select statement so slow?

SELECT name FROM sys.databases WHERE name not in ('master','model','msdb','tempdb','ReportServer','ReportServerTempDB','1303VISBOC') AND CASE WHEN state_desc = 'ONLINE' THEN ...
1
vote
0answers
14 views

Will redeploying a project to the SSISDB invalidate current jobs

I’ve been given 2 dtsx packages to replace 2 in production. This is for a SQL 2012 server with the packages deployed in the project model. The only way I see to do the update is to export the project, ...
0
votes
0answers
44 views

SQL Server slows down on one expensive query

I have a Sql Server 2012 with lot of CPU and memory. When I run a query with a bad plan the server slow down and all other query, even of other databases, become very slow. When I run the query: - ...
9
votes
2answers
140 views

foreign key constraint violation issue

I have identified 3 situations. A student with no enrollments. A student with enrollments but no grades. A student with enrollments and grades. There is a trigger on the enrollments table to ...
0
votes
2answers
26 views

SQL Server 2014 Install Not Creating Default Instance

I am trying to install SQL Server 2014. The problem that I am having is that during the installation it is not letting my choose whether I want to use a default or a named instance. I have been ...
4
votes
0answers
31 views

SQL Server AlwaysOn log_send_rate

On all our AlwaysOn setups, running Windows 2012 and SQL Server 2012 in virtual machines and on bare-metal, I find that the log_send_rate in sys.dm_hadr_database_replica_states is consistently ...
1
vote
1answer
47 views

SPARSE Column in SQL Server

I have just learned about SPARSE columns in SQL Server. I have never used them; I've just read about it on the Internet. Can I ALTER an existing Nullable column in large transactional tables to ...
2
votes
3answers
41 views

how to restore differential back daily basis on sql server DB

Im working with SQL Server DB, what i need is that i have a DB1 and clients site communicate with this DB,Reporting module of the application is also using the same DB (i-e That shows different ...
-1
votes
0answers
24 views

What is role of adaptive server in sql server? [on hold]

When we run a stored procedure, Adaptive Server what will do.
0
votes
1answer
30 views

Is is possible to handle a UserAbort or ClientTimeOut within a Stored Procedure?

An example: create proc [dbo].[usp_SlowProc] as begin try set xact_abort on; -- Ensures rollback on some errors that bypass the try/catch mechanism raiserror('Waiting...', 0, 1) ...
1
vote
1answer
39 views

Performance of checking for data in related tables

NB: this question is purely academic / to help improve my understanding of SQL Server performance. Given a master table which relates to one or more other tables, how would you determine the best ...
0
votes
1answer
52 views

Setting up a new database

I'm setting up a new basic database and wanted some on advice on the best approach to do this with. This would be a database in SQL Server 2012 and would be a reservation system for a customer. I have ...
2
votes
1answer
146 views

Allow non-sys admin, non-owner of a job to execute it

I have a job that runs an SSIS package. Currently the owner is a proxy account. I can run the job manually from a sys-admin account. Our web service logs in using a limited account. It needs to ...
2
votes
2answers
206 views

How do I include nulls during comparisons in SQL Server?

So basically in SQL Server a NULL means there is no value and thus can't be compared which returns some unexpected results. For example, the following query doesn't return rows where value IS NULL ...
1
vote
0answers
19 views

How do I include nulls during comparisons in SQLServer? [duplicate]

So basically in SQLServer a NULL means there is no value and thus can't be compared which returns some unexpected results. For example, the following query doesn't return rows where value IS NULL but ...
0
votes
0answers
22 views

Errors in the metadata manager. The process type specified for the Effect dimension is not valid since it is not processed

Trying to hunt down an issue with an SSIS package we have and I don't know what to look for to help correct this issue. Error: Errors in the metadata manager. The process type specified for the ...
1
vote
2answers
60 views

How to find usage of each object in other objects from a database?

I am with the task of taking an old SQL Server database and identify all of it's objects and their relationships, because the one who made it did not bother to use any foreign key, he just made all ...
2
votes
1answer
44 views

SQL server Index rebuild and restore not working

Hey everyone I am having an issue with my database. Below is a copy of CHECKDB. When I attempted to do a restore from a backup the restore had the same errors. It appears that my details table is ...
0
votes
2answers
49 views

SQL Server Backup Proposal

Our current system setup sees each server backed up by 3rd party software(Veeam). The backup for our Database server occurs once each night. Alongside this, there is another 3rd party tool that ...
0
votes
1answer
58 views

What should I consider before I upgrade my SQL Server memory? [on hold]

I want to upgrade the memory in my SQL Server. What should I check first? Version: SQL Server 2012 64-bit Standard edition
5
votes
1answer
238 views

Why are U locks required when using Read Committed Snapshot Isolation

I consider myself a beginner at Sql Server locking. My understanding is that when using RCSI, Sql Server doesn't need to issue S locks because it uses row versioning (in most cases). From ...
0
votes
0answers
26 views

How do I view my database once I connect it to my website? [on hold]

I'm creating my first website. I'm connecting a SQL Server database to my website to connect to forms that users will fill out. I need to see the information that the users input. I am using ...
0
votes
0answers
12 views

How can I import a Microsoft SQL database using Plesk Panel 9.5? [on hold]

I created a database in SQL Server Management studio. How can I import this database (all tables, settings) to a server using Plesk Panel? I heard there is a script; how can I find it?
0
votes
2answers
66 views

SQL Server 2008 R2 memory issue

I have read many posts regarding the memory but still its not clear. I have dedicated server SQL Server 2008 R2 with Windows 2008 R2, 32 GB RAM, 2 6 core processor and a database of around 60 GB on ...
-2
votes
2answers
57 views

Recovery from lost SQL Server data file [on hold]

I am wondering what the process would be to recover data from a lost data file in SQL Server. Up front this is a hypothetical situation but let's say that there is no backups available and a data ...
0
votes
2answers
102 views

Long running simple query SQL Server 2008 R2 [on hold]

I have a very simple query running in a SQL Server 2008 R2 instance: SELECT TOP 10 * FROM messages m INNER JOIN recipients r ON m.id = r.id WHERE m.timeStamp > '2014-07-14T00:00:00.000' AND ...
3
votes
1answer
81 views

FULL recovery and differential backups

I am going to begin transitioning several of our databases to FULL recovery from SIMPLE. I asked a question last week regarding deployment strategies and I have one additional question. Consider ...
0
votes
1answer
35 views

Is there a better way to filter error logs?

I find it hard to believe that there aren't better native tools to filter SQL Server Error Logs. Even Windows Logs have better filtering capabilities. I'd like the ability to remove certain events ...
2
votes
3answers
120 views

Collecting Wait Stats

We currently use a monitoring tool which shows us our top wait stats either by number of waiting tasks or total wait time. Below are the wait stats by number of tasks waiting and also wait time per ...
0
votes
1answer
82 views

Database revision needed for sports events database

This is not a code review but more of a database schema review. I have a sports events website that I am doing in my spare time. I need assistance with the database design. I am about 80% completed. ...
1
vote
1answer
43 views

DBCC Results: page ID contains an incorrect page ID in its page header

DBCC results for 'tablename' Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 1637580872, index ID 1, partition ID 72057596516040704, alloc unit ID 72057594048020480 (type LOB data), page ...
2
votes
1answer
88 views

Where is SQLCMD.EXE in SQL Server 2014 Express?

Using "SQLCMD.EXE" to back up my SQL Server Express databases for years I just discovered that after installing the 2014 version, I found no SQLCMD.EXE anymore. In previous versions it was located at ...
6
votes
2answers
342 views

Explanation requested for slow DELETE with SQL Server

I would like to get some extra insights/reasoning for SQL Server delete behavior. We have a fairly large database of over 1800 GB. In there are some very shallow tables (only a few integer columns) ...
0
votes
1answer
38 views

select multiple columns group by one with inner join

I have a problem with group by, i wanna select multiple column but group by only one column these below code which is i am used but its given a error. SELECT ...
2
votes
0answers
35 views

How do I pass a parameter in a stored procedure to call a DTS package

I have created a DTS package which fetches data from a text file into a database table. I want to pass the file name dynamically from which it fetches data. Can I pass the filename dynamically?
0
votes
2answers
63 views

Open Transaction that won't go away SPID Ns

There is a transaction that has been open on this instance since it was restarted and is preventing us from clearing the ldf. Here is the transaction information: Transaction information for ...