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

SQL Server Agent in Change pending state and could not restart

I have a clustered SQL Server. When the server is restarted accidentally, the SQL Server Agent was not started automatically. SQL Server Service has started and is in the "running" state. When I ...
0
votes
2answers
35 views

How can I determine which tables are causing the database to grow over time?

I have a database in SQL Server 2008 that is growing all the time, and I'd like to know which tables have caused the most growth over the past 6 months.
0
votes
1answer
19 views

What will happen during failover if the transaction is running on sql server instance?

What will happen during failover if the transaction is running on sql server instance? That is the question. Thanks in advance.
-2
votes
1answer
11 views

Error while uninstalling instance [on hold]

I am seeing this error message on my console when I try to uninstall SQL instance from a box via command prompt: SQL Server 2012 Setup is already running and cannot be launched more than once at ...
0
votes
2answers
3 views

Cannot Restore Database in SQL Server 2014

I have created a backup of a SQL database in SQL 2014 and want to use this backup to restore it to a different machine that also runs SQL 2014, hence no version issues. However, I keep receiving an ...
0
votes
1answer
25 views

Individual SQL account per user?

I am designing a web application that will have probably around ~1000 users. The website is facing the internet but it can only be used by partners (i.e. the general public cannot just "sign up an ...
0
votes
1answer
19 views

Attaching Database Incorrect name in sys.master_files

I have been moving some databases from SQL 2008 to SQL 2012 using detach and attach method. I correctly map up all the files and the physical and logical names appear correctly in the properties of ...
0
votes
0answers
21 views

Some records are missing while selecting from table

I am trying to match the records having MAX(WORKITEM_ID) but some PROCESS_INSTANCE_ID are not coming though they are present in WORKITEM table. select WI.WORKITEM_ID as WORKITEMID ...
0
votes
1answer
21 views

Sql Server 2008 : What is the cost of accessing an index?

I've just read this interesting blog post about selectivity notion. In the section 'When is better to not use a database index?', the author states : Accessing the index takes time, and consumes ...
0
votes
1answer
18 views

Better way to full text query across multiple tables?

I've got a rather large query across multiple tables and their fulltext-indices which (unsurprisingly) is rather slow: SELECT t0.[Key], t0.[Nr] FROM dbo.[Customers_View] AS t0 WHERE (t0.[Deleted] ...
0
votes
4answers
44 views

How can i take backup of particular tables in MS-SQL Server 2008 using T-SQL Script

I want to take a backup of particular tables available in my database in .bak file And all these should be done using T-SQL Script
0
votes
1answer
19 views

Does the scope for 'Alter Any Database' operate similar to 'Create Any Database'?

Does the scope for 'Alter Any Database' operate similar to 'Create Any Database', as in, only those databases created by Login-A under the 'Create Any Database' umbrella can be altered, and not the ...
0
votes
2answers
42 views

Select MAX DATE from joined Table

I have two tables, PROJECT and BILLINGS, as follows: Project_ID Project_Client ---------- ------------------ P1 ABC Company P2 DEF Company P3 GHI Company Proj_ID ...
0
votes
2answers
18 views

SSIS Package Error when Scheduled in Job

I have created a package that brings in data from another database and with the data package populates a table in SQL database. The job runs fine when it is executed. I've imported it into SQL and it ...
0
votes
0answers
26 views

The Service Broker endpoint is in disabled or stopped state - AoAG - SQL 2012 - 15 minute interval

I receive this error message in SQL error log every 15 minutes. I have setup AOAG on this server. The database option "Service Broker - Broker Enabled" is turned on for the Blackberry related ...
2
votes
0answers
30 views

Backup-SqlDatabase: Cannot bind parameter 'InputObject' Error Being Thrown

I have a PowerShell script that is used in a fairly complex automated process. One thing it does is creates a database backup, and for that we are using the Backup-SqlDatabase cmdlet. I am also using ...
0
votes
1answer
40 views

Which columns (and order) to choose for a clustered index to maximize query performance

In our database we have a table that looks more or less like the example below. In the past we always created the CLUSTERED INDEX on the ID column on the table. CREATE TABLE [Measurement] ( [ID] ...
0
votes
0answers
24 views

Can connect successfully to SQL Express but not SQL Server

On my local machine I have installed: Microsoft SQL Server Enterprise Evaluation Edition (64-bit) 12.0.4100 SP1 Microsoft SQL Server Express Edition (64-bit) 12.0.2000 RTM I installed both using ...
-1
votes
0answers
36 views

Error log “errorlog.6” is corrupt and unreadable. how to run checkdisk utility? [on hold]

I am a laymen and have no idea how to execute sp_cycle_errorlog to fix my problem of removing or fixing corrupt errolog.6 file. Can someone please suggest me on how to get this rectified?
1
vote
1answer
37 views

How to safeguard a symmetric key in SQL Server

I've got a database in which I need to store the encrypted values for a column. I use the SQL Server encryption format for encryption. The format is as follows: CREATE MASTER KEY ENCRYPTION BY ...
1
vote
1answer
38 views

SQL Server Failover Cluster Instance compatible with VMware HA?

Imaginary Setup: Microsoft SQL Server Failover Cluster Instance on virtual machine in an ESX-Cluster. Question: In case of a hardware failure, what will happen with both high availability ...
0
votes
1answer
29 views

How to modify maintenance plan using T-SQL script in MS SQL Server 208

How can I modify a maintenance plan in SQL Server 2008 using a T-SQL script? I want to change the schedule of a maintenance plan and change the path of the .bak file . All these changes should be ...
2
votes
1answer
47 views

Dumping stored procedure result to a text file programmatically

How can I save stored procedure execution result to a text file? I need to do this from SQL script (not Management Studio nor external utility) and I need to preserve correct characters encoding ...
0
votes
0answers
7 views

After merge replication setup, tables at subscriber not getting any data from publisher

I have created a merge replication setup through Replication Wizard. After sync, it is observed that the subscriber DB gets created with the exact tables in publisher as intended, but on the ...
0
votes
0answers
16 views

SQL SERVER - Split Address Line [on hold]

I have a field that contains an address line that is like this Dr Robert Ruberry, West End Medical Practice, 38 Russell Street, South Brisbane 4101 I want to be able to select or create a view for ...
0
votes
0answers
30 views

SQL Server 2012 Standard Cluster in a Box

We currently have a Microsoft SQL DB “cluster in a box” with two physical servers and a SAN. This is done with just Hyper-V and SQL Standard installed on the physical servers while having one ...
0
votes
1answer
34 views

Script works but Im not sure this is the best format

I have a survey table which contains mostly integer. I want to make it readable for end user so I use select statement as below: SELECT CASE s.Country WHEN 1 THEN 'One' WHEN 2 THEN 'Two' ...
0
votes
2answers
84 views

Using Like with variables?

I have an odd situation where I have a column called (TransmittalNumber) with datatype of VarChar (75) in a table named (Transmittal Sheet). I want to query this table to find the transmittal numbers ...
0
votes
1answer
41 views

How to store a version sequence per product

I need to create a table like the following one: +----+---------+---------+ | Id | Product | Version | +----+---------+---------+ | 1 | 1 | 1 | | 2 | 1 | 2 | | 3 | 2 ...
2
votes
1answer
46 views

Understanding & Resolving Deadlock in SQL server 2008R2

I am trying hard to figure out what may be going wrong for below shown deadlock graph: I am receiving alerts for deadlocks similar to above for almost every 10 minutes , its just the query changes, ...
1
vote
1answer
39 views

Permissions required to alter a database file

Totally at the beginning in administering a database. Using EMS SQL Manager ... latest version. How do I over come below ALTER DATABASE joneslocker2 MODIFY FILE ( NAME = joneslocker2, ...
1
vote
4answers
307 views

Improve delete speed for SQL Server

We have huge production database, its size is around 300GB. Is there any approach to improve performance of a delete query? Right now deletion speed is between 1-10k per minute, it is very slow for ...
2
votes
0answers
34 views

sp_send_dbmail causes session to hang

We had an issue in production (2008R2 SP3) yesterday, where a developer was running a piece of code in SSMS that was executing sp_send_dbmail inside a transaction, and including an attachment from a ...
1
vote
1answer
24 views

Incremental (not differential) backup of SQL Server 2008 R2

Is it possible (out of the box or free software) to make an INCREMENTAL backup of SQL Server 2008. My problem is, the full backup and differential backup, backs up my 30gig database to 1 file. So ...
3
votes
3answers
115 views

Is Primary Key Non Clustered recommended?

I am designing a database table. Columns are RouteId ,Origin , Destination. RouteId is a string, it is always unique but length will be more than 60 characters. Since RouteId is unique, I am ...
0
votes
1answer
19 views

Difference between “Table-Incremental” and “Table-Update” for “Population Type” when scheduling Full Text Index Population

I want to schedule a Full Text Index's population to keep it more up to date rather than leaving it to Automatic and not knowing the next population time as the users are complaining about the data ...
0
votes
1answer
16 views

Database with FILESTREAM enabled gives Error 3056 during backup

I have a SQL 2014 database enabled for FILESTREAM and I am getting errors 3056 during backup. The message is DESCRIPTION: The backup operation has detected an unexpected file in a FILESTREAM ...
0
votes
1answer
54 views

Estimation of creating index in SQL Server

We create new index on our production database, with a few fields, our database size is around 300GB and it works for one hour and do not finished yet. How can you estimate this operation? If we ...
1
vote
2answers
17 views

Error 3201 Operating system error 5(Access is denied.) Creating backup on network drive

Msg 3201, Level 16, State 1, Line 1 Cannot open backup device '\\nst-shantanug\c$\Dummy Db Backup\dummydb.bak'. Operating system error 5(Access is denied.). Msg 3013, Level 16, State 1, Line 1 ...
1
vote
1answer
34 views

What is the different between resource pools and workload groups in sql server?

In SQL server one can use resource pools and workload groups, what is the difference between them? Why should I use one over the other?
2
votes
1answer
29 views

sql server 2014 unable to connect with Microsoft account or sa

I am running sql standard 2008 r2 on my box. and its been working great. I just installed sql server 2014 on my machine as a second instance. The service is running fine, but when I try to log into ...
2
votes
1answer
26 views

Trigger Logic (from SQL 6.5 )

I have a database that was originally implemented in SQL 6.5 and has been migrated to SQL2000, SQL2005 and now SQL2008R2 (Compatibility Mode = 10). Through the migration many new tables, functions, ...
0
votes
0answers
28 views

SQL server running on a virtual machine times out on one physical server but not another [on hold]

I am running a Microsoft SQL server batch processing job on a virtual machine that is running on a physical server. We run these jobs often, however, one day the batches we run started timing out. We ...
3
votes
2answers
486 views

Is there a way to calculate yesterday / today of last month / year in SQL?

Is there a way to calculate today (and yesterday) of last month (and last year) in SQL? Assuming today is 26-May-2015 then how to find? Today of last year i.e. 26-May-2014? Today of last month i.e. ...
2
votes
0answers
36 views

Should I delete disabled windows Active Directory accounts from SQL 2008?

Is there a risk of not deleting unused Windows logins that have been disabled in AD or is it simply a housekeeping issue? e.g. Windows authentication is used to provide database access. A user leaves ...
5
votes
2answers
158 views

How to monitor history of logins to database if login auditing is not enabled?

I have a number of databases on multiple servers that don't seem to be used any longer. Can't find their owners, there are no processes linked to them, nothing got written to the tables for a few ...
0
votes
0answers
33 views

SQL 2012 Standard Edition (on Azure VM) + Bitlocker. Good or Bad idea?

I will start this question with a few statements to negate any "Why" questions that are going to be asked. The Head of IT wants the data encrypted. Our profession is such that encrypted data is ...
0
votes
0answers
43 views

SQL server 2008 [on hold]

I am having a problem that I can't figure out. I have one live server and one test server. The (Live) and (Test) are very similar, but there are a lot of differences because of testing reasons. But ...
4
votes
1answer
67 views

Prevent Inserts without Column List

We have a database running on SQL 2008 R2, in 2000 Compatibility mode. Is there a way to configure the database so that implicit insert statements (i.e. those without a column list) are invalid? I ...
2
votes
1answer
42 views

Index fragementation ? is it unavoidable

This is follow up question to @martin smith excellent answer http://stackoverflow.com/questions/1251636/what-do-clustered-and-non-clustered-index-actually-mean After that i have watched MCM video of ...