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

Getting the value from a column during a trigger

After a test completes (on a SQL 2008R2 system), the system updates a row in the TestRun table to include an end time. I am creating a trigger that will take action after that update, and do some ...
2
votes
1answer
28 views

Obtaining the next partition number

For a partitioned table, how do I determine via T-SQL what is the next partition number that will be used? For example, the switch-in today went into partition number 50. I want to build the new ...
0
votes
0answers
29 views

MS DPM 2012 R2 - any concerns with using it for SQL backups?

Our company is looking at moving to MS DPM 2012R2 to backup VM's, SharePoint, SQL etc. enterprise wide and trying to research any down side for using this to backup SQL. The whitepapers I've read ...
0
votes
1answer
30 views

SSMS 2014 installation - “Invalid license data” when opening ASP.NET files

I have just installed SSMS 2014 Express on a brand new Windows Server 2012 (x64) so I connect to the SQL Server 2014 instance running on a different Windows Server 2012. This is working without issue ...
0
votes
1answer
23 views

SSIS unpivot returns different results when run via a SQL agent job

I hope someone can help me. I have an SSIS package which grabs data from an excel (.xls) file, unpivots it from a rubbish format into a 'proper' format, transfers it to a SQL server 2008 R2 db, and ...
1
vote
1answer
77 views

SQL Server Multiple JOINS with Table Value Function - query never ends

I have a query with 4 joins using a table value function to get the data and when I execute it the query never ends. Issue Details Table valued function: CREATE FUNCTION [dbo].[GetIndicator] ( ...
1
vote
0answers
52 views

Querying LDAP multi-value attributes using Openquery

I'm using SQL Server 2012 Express to query an LDAP linked server like this: SELECT * FROM OPENQUERY (MYLINKEDSERVER, 'SELECT * FROM ''LDAP://myserver:389/o=root'' where telephonenumber = ...
-6
votes
0answers
36 views

Absent and Leave [duplicate]

The code you sent me which is show only absent not leave but I have to show those employee leave SELECT DISTINCT subDate.absent_date,SMEmployee.EmployeeID,SMEmployee.BadgeNumber, ...
2
votes
3answers
74 views

Standard Edition High Availability without Shared Storage

I'm a software dev with little experience managing SQL Server so please bear with me. We are developing a piece of software that needs to be highly available, with a significant degree of resilience. ...
4
votes
0answers
51 views

Why is it @@SERVERNAME but not @@DBNAME? [closed]

I'm just curious: To get the server name, I use SELECT @@SERVERNAME but to get the current database name, I use SELECT DB_NAME() Technically, both seem to be scalar functions: @@SERVERNAME is ...
0
votes
1answer
24 views

STDisjoint() = not STIntersects()?

In short, are STDisjoint() and STIntersects() antipodes of each other? According to the documentation, it seems that they are. But there is no explicit note about it. Are there any tricks? Which one ...
1
vote
0answers
21 views

Does cmdexec have additional process isolation beyond cmd.exe?

I have a cmdexec step in a sql agent job that includes a redirection into a file at the end. It works as expected from a CMD shell running in the context of SQL Agent service account and produces a ...
4
votes
3answers
391 views

Why does transaction log continue to grow in Simple recovery mode with nightly backups

Before immediately marking as duplicate, I have read Mike Walsh's Why Does the Transaction Log Keep Growing or Run Out of Space?, but I don't think it gave an answer to my situation. I looked through ...
2
votes
0answers
13 views

Sql Server Backup to URL (Azure) ERROR

I'm trying to take advantage of the new backup to url function in SQL Server. I have created a valid cert and tried a simple backup, but I get the same error every time no matter what I try. I have ...
4
votes
2answers
79 views

Cannot remove SQL Server 2012

I was in the process of installing SQL Server 2012 x64 Express Management Studio and encountered one heck of an issue. I was most of the way through the installation process when my computer locked ...
0
votes
1answer
15 views

SQL Server - linked Oracle server: EXECUTE permission denied on 'xp_prop_oledb_provider'

Inside of our SQL Server, we have created a linked server to an Oracle server. We ave mapped several users to the Oracle server and specified the credentials. On the Linked Server 'Security' ...
2
votes
0answers
53 views

Issue shrinking dev sql server DB's log file

I have a development db that's running on sql 2014 in 2012 compatibility that I'm having an issue with trying to shrink the log file. The mdf is 60+gb and the log is 80+gb but since it's dev like ...
0
votes
1answer
42 views

Change code editor variable highlighting colour

Within the SSMS Code Editor (for SQL Server 2012) I have this code written within the editor, that has a Dark theme applied. When you click on a variable, SSMS highlights all the other occurrences of ...
2
votes
2answers
66 views

Database events that will cause deletion of index

In SQL server if we try to change a data type of a column having index ,then it deletes the indexes associated with that column and changes the data type . I was not aware of it and was faced problem ...
1
vote
0answers
53 views

A query that does a lot of reads, but plan is OK [migrated]

I´m experiencing a strange behaviour in a specific query in the SQL Server 2008 R2. I´ve got a query that does 19 million reads and is very time-consuming and when I try to check its cached plan, the ...
3
votes
2answers
159 views

Alert when Job isn't triggered

I have a Sql Job on my server that is triggered nightly from a remote server (once it has completed its backups). I have successfully configured the job to notify me when it fails, but I would like ...
0
votes
1answer
42 views

How to get SQL Server filetable path locator for subfolder by its literal path

I have a filetable which have several subtables. For example FileTable ->subtable1 ->->subtable1.1 ->->subtable1.2 ->subtable2 ->subtable3 etc How to get SQL Server ...
0
votes
1answer
39 views

If a query contains two identical subqueries, will they both run?

Say I have a SELECT query that contains two identical subqueries, like the below: SELECT (SELECT SUM(Price) FROM Product p WHERE p.GroupID = g.GroupID) AS 'TotalCost', (SELECT SUM(Price) ...
0
votes
2answers
32 views

update/delete records concurrently without impact to other process for handling huge data?

I tried to googling first, but i didn't get it . . . So, What are best practices for update/delete records concurrently without impact to other process handle to huge data(>5 millions records)? ...
0
votes
1answer
68 views

Query for row combine

BEGIN declare @t1 table( date1 date, EmpID int, bnumber varchar(24), Name varchar(50), Depname varchar(50), mintime time, maxtime time, Status1 varchar(50)) insert into @t1 exec dbo.InOut2 ...
9
votes
1answer
100 views

Sch-M WAIT blocks Sch-S in SQL Server 2014 but not SQL Server 2008 R2?

We recently migrated our production instances from SQL 2008 R2 to brand new SQL 2014 servers. Here is an interesting scenario that we uncovered with our usage of Service Broker. Consider a database ...
1
vote
1answer
48 views

Check constraint references another column in same table

I have this table but check constraint is throwing me an error: Column CHECK constraint for column 'MedicamentRegulated' references another column, table 'Medicaments'. I've seen this as allowed ...
3
votes
3answers
193 views

Can I install SQL Server Management Studio locally?

Can I install SQL Server Management Studio on my desktop to access a database on a SQL Server 2012 instance? If so, where can I find the installer? Google searches only return 'express' versions ...
3
votes
2answers
90 views

Determining the Actual Server Create Date

I am interested in determining the ages of all 70+ my servers. I would like to create a growth graph showing when servers and databases were added to the environment either/both monthly or annually. I ...
1
vote
0answers
22 views

How to specify a display name in emails from SSRS subscriptions?

How can I specify a display name (e.g. "Reporting Server" <noreply@domain.com>) in the emails sent from SSRS subscriptions?
0
votes
0answers
20 views

Maintenance Plan Transaction Log Backup

I have a backup device set for my transaction log so the sets are contained in 1 file. I have this set to append, is this correct or should it be overwrite in the plan? After the full backup is taken ...
2
votes
1answer
43 views

How to get a sense of how busy is the server [duplicate]

I am not in IT infrastructure team. But I have a SQL database server. We are having this intermittent problem with Dynamics SL and everyone in the company sort of pointing the finger that the server ...
1
vote
1answer
36 views

Insert fail logs

Is there a way to view fail inserts to a SQL Server database? I am seeing that a number of my inserts are failing and I'd like to recover that data if it's possible.
0
votes
0answers
19 views

Migrate Linked Server Connections

I am getting ready to migrate a DB from one server to a new machine...but were wondering if there is an easy way to migrate those connections over as well...we have about 6-7 linked servers set up to ...
0
votes
0answers
14 views

SQL Server Configuration.ini File. SSIS Data Required?

I am planning a new SQL Server installation based of the settings from a previous installation on another server. I am using the Configuration.ini file. Since SSIS is not required can I exclude the ...
0
votes
1answer
30 views

Relationship between two tables so their value changes together

First of all I'm not sure if this website is for purely experts but sorry if it is.. the main page was a little vague I was wondering if it'd be possible to have a relationship, for example, in my ...
0
votes
1answer
40 views

Script not emailing from Maintenance Plan/SSIS

I have created the following script to send emails from my plan but it isn't sending out. It works correctly in a query window and under an agent job. This is added to the plan as a 'Execute T-SQL ...
1
vote
1answer
26 views

Backup Certificate SQL Server and return bytes with a Select Statement

I have a certificate in a database in Microsoft SQL Server 2008 R2. I want to get a copy of the certificate so I can burn it onto a USB device and put it in a safe. I don't want to have to go onto the ...
1
vote
1answer
30 views

How to get service broker database queue status?

I need to get service broker queue status (Enabled/Disabled) somehow programmatically. Either, T-SQL, PowerShell, etc. I tried $MyQueue = Get-ChildItem ...
2
votes
1answer
98 views

Alerts from Maintenance Plans

I would like to setup alerts from within the maintenance plans. When you setup a notification from the Agent Job it sends out the Job name, duration, status, message. If I add a Notify Operator Task ...
0
votes
2answers
56 views

How to remove stuck mode in SQL Server?

I was clearing tables by using query in SQL Server. A query that normally takes 2 minutes took the better part of 3 hours... and it wasn’t even close to being complete. Therefore, I killed SQL Server ...
2
votes
2answers
108 views

Is Information in sys.dm_db_index_usage_stats reliable

I'm archiving data from an old system that has no documentation. Lucky me... I'd like to find out when the tables were created, last accessed etc. Can I trust that this query will give me the correct ...
1
vote
5answers
182 views

What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns? [closed]

What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns? My manager said this is well known practice and query performance is good. Is this ...
0
votes
0answers
17 views

How does rsconfig know which config file to update?

We are in the process of migrating some work from Microsoft SQL Server 2000 to SQL Server 2012. As part of that process, we've been using rsconfig.exe to reconfigure some reporting services instances ...
2
votes
2answers
407 views

Is there any way to do a SELECT query without any optimization in SQL Server?

I am trying to test the speed of SQL server queries. However, once I do the query once, it becomes a lot faster. The database is live so I can not make any changes to it, only to the SELECT query ...
1
vote
0answers
13 views

How to cope with SQL Server 2012 vs SQL (Azure) Database sql files

I'm trying to port my system to SQL Database (Azure instance) from SQL Server 2012. I'm using Visual Studio 2013 and I have my .sqlproj with all the definition of my database inside. Given that a ...
0
votes
1answer
56 views

UOW's: Relating UOW's listed in MSDTC to SQL Server info

We have some active transactions showing up in MSDTC that have been there for a very long time and don't go away. They're not orphaned or in-doubt, just normal-looking active transactions. We're ...
3
votes
2answers
194 views

Can I update every datetime in bulk?

The current database assumes all times are local to the user. Now we're changing this so the database stores everything in UTC and our application converts the UTC time in the database to the correct ...
0
votes
1answer
40 views

Import errors importing CSV to SQL Server table

I am using SQL Server 2014 Management Studio to import a very large .CSV file into a table. So far I have been trying to accomplish this by right-clicking on the database and selecting Import Data, ...
1
vote
1answer
66 views

How can I correct SQL Server Error 8928?

I received the following error message in an application running against one of my databases: SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xfdff74c9; ...