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

Tail Log backup when doing a restore?

Typically when doing a restore of a DB from a production server to a non-production server I will use the WITH REPLACE option as when I forget I get an error about the tail log not being backed up. ...
1
vote
1answer
13 views

Does sp_indexoption cause index rebuilds?

I want to switch AllowRowLocks=ON on a number of indexes. Some of those indexes are on large tables, and I don't really want to rebuild or reorganize the index. It is not clear from the MSDN article ...
-1
votes
1answer
29 views

View vs TableValued Function vs SubQuery

I have a scenario where i need to join with 3 tables to get the value for one field for second field join with 4 tables for third field join with 3 tables all above joins are inner and if data ...
-7
votes
0answers
39 views

What's new in SQL Server 2014 T-SQL since SQL Server 2008 R2? [on hold]

I want to upgrade my sql server from 2008 to 2014 and I wanna know what's new in programmability T-SQL enhancements.Now I'm installing 2014 to make few T-SQL tests. Thanks
1
vote
1answer
50 views

What relevance does the table-level ANSI_NULL setting have?

Apparently, SQL Server stores the current ANSI_NULL setting when creating a table (see related questions here and here). However, when I execute SELECT * FROM myVeryOldTable WHERE ...
-5
votes
0answers
33 views

What is the Difference between SQL Server and MySQL? [on hold]

What is the Difference between SQL Server and MySQL 1) In technically and non-technically. 2)in business point view (ex: if i have new project to do. How i know which database is better to choose ...
1
vote
0answers
35 views

How to handle many columns / variable schema?

I apologize in advance in case this question has been asked already. I'm working on revamping a reporting application used within my company. The requirements are: Support addition of new fields ...
1
vote
0answers
20 views

Restoring corrupt database - “mdf is not a primary database file” [duplicate]

Unfortunately the hard disk of my system is damaged. I am trying to recover my database, but it cannot be attached again to SQL management studio 2005. The error is myfile.mdf is not a primary ...
1
vote
2answers
45 views

SQL Server Database is corrupted

Unfortunately hard disk of my system is damaged, now I recovered my database. But it cannot be attached again to SQL management studio 2005. The error is: myfile.mdf is not a primary database file. ...
0
votes
0answers
14 views

2008 R2 Express Silent Install - FullText Service Not working

I'm trying to build an installer for an app that installs SQL SERVER 2008 R2 ADV with FullText already enabled, but couldn't sort it out. It must support Windows XP, so that's the first OS I'm ...
2
votes
2answers
78 views

Share centralized queries for multiple databases

OK, here's a challenge for you guys. I am tasked with setting up reporting for two companies being run as a single company. For reasons I won't get into, they are implicitly split but (for our ...
1
vote
0answers
18 views

Database Mail connection to exchange - Resets and timeouts

I am trying to send the results of a query in an email, and each time it takes longer than 5-10 minutes for me to recieve the message. The actual relay from Exchange takes less than one minute, but ...
3
votes
1answer
40 views

How to back out of mass update in SQL Replication

We have a database which is set up in Merge Replication. We accidentally updated hundreds of thousands of records in a large published table on the publisher database. We did something like this: ...
0
votes
0answers
11 views

How to back out of mass update in SQL Replication [duplicate]

We have a database which is set up in Merge Replication. We accidentally updated hundreds of thousands of records in a large published table on the publisher database. We did is something like ...
3
votes
1answer
83 views

SQL Server: Using 4 part identifiers when database may be on the same server

In my client's setup, the database servers in lower environments are all on one server for cost saving purposes, but in higher environments, these databases are deployed on separate servers, and ...
2
votes
3answers
277 views

How to pull rows only from the weekends?

My table data is like this: ID Name salary date 1 a 100 1/08/2014 2 b 200 2/08/2014 . . . . 26 z 2600 26/8/2014 Now I want to return only rows from Saturday or ...
0
votes
0answers
15 views

How can I use parameters of type Int32 from an environment for an integration services package in a SQL Server 2008 job?

I made a SSIS package using two string parameters and one Int32 parameter. I defined a SQL Server Agent job that should execute that package. In "Integration Services Catalogs" I definied an ...
1
vote
1answer
25 views

Profiling and debugging “Incorrect syntax was encountered while parsing :setvar.”

I have the following script using SQLCMD setvar, but I receive an error when I parse the script: :setvar dbname "PROD" :setvar backuppath = "e:\sql\restore\PROD.bak" USE [master]; GO -- backup the ...
1
vote
1answer
37 views

how to shoot SQL error 823?

I had a laptop die HDD went dead which a running sql database was opened (in program) I had to have the hard drive recovered however all i got back was a bad database which has the torn page. All ...
-5
votes
0answers
34 views

Arithmetic overflow error [on hold]

arithmetic overflow error converting expression to data type int How to solve this problem?
0
votes
0answers
19 views

SQL Server to MySQL migration using MySQL workbench

I tried to migrate database from SQL Server 2012 to MySQL v5.5. I used MySQL workbench v6.1 community edition. What I was migrating is just schema only, not for the data. I got this error Reverse ...
3
votes
1answer
39 views

Can a High number of Worktables/sec and/or workfiles/sec lead to tempdb Contention?

We have a large number of very heavily used OLTP systems. One of our biggest issues right now is tempdb contention. I understand how creating many temp tables and table variables (which our developers ...
1
vote
2answers
31 views

Trying to filter msdb..sysjobs by job_id

I'm attempting to determine the name of the SQL Server Agent Job that is currently running by comparing the output of master.sys.dm_exec_sessions.program_name to msdb..sysjobs.job_id I'm using the ...
-1
votes
2answers
21 views

My data base missed and disappeared after detaching it

I have detached my data base in sql 2008 and unfortunately I do not know its path and by my connection string I extract its exact name and searched it but it is disappeared from my computer Is it ...
3
votes
1answer
46 views

Consolidating 2 Tables with same Values

I am working on a project trying to consolidate two databases, DB1 and DB2, for my organization into a single database, DB3. Initially our organization started with DB1. A few years back they made a ...
2
votes
0answers
39 views

AlwaysOn FCI + HA Setup Question

I am planning to create FCI + HA solution in the same datacenter, but running into some problems. I'd really appreciate if someone can provide some guidance. Here is the current configuration (All ...
0
votes
2answers
55 views

Stored Procedure null parameter within where clause

I want to use a parameter within where clause only if it's value is provided by strongly typed dataset, this is what I am trying at the moment, I get right results when i provide parameter3 and no ...
2
votes
1answer
38 views

Foreign key, key split in two tables

I have to record a list of events made of action, reason (optional, may be multiple), user. I have a master table with all the valid action, and another with all the valid action-reason combination. ...
1
vote
1answer
79 views

Why is there a collation conflict between system views

I'm using the following statement to retrieve a list of triggers from the database: select tr.name from sys.triggers tr union all select tr.name from sys.server_triggers tr; However on my local SQL ...
4
votes
1answer
315 views

Bad Design or Complicated Query?

Problem: For fun I am building a Database for lottery results to get some statistics off of. As of now I am only interested in a Pick 3 style lotto and might introduce more later. How would you ...
-5
votes
0answers
37 views

Error arithmetic overflow error converting expression to data type int [on hold]

when i check report of sql server it show, Error, arithmetic overflow error converting expression to data type int. How to solve this problem.?
1
vote
0answers
24 views

Sql Server Installation Code Error

My problem is this, I want to Install Sql server 2014 in my Pc but i have a problem with it: SQL Server Setup failure. SQL Server Setup has encountered the following error: The SQL ...
0
votes
2answers
28 views

sp_send_dbmail with multiple reply_to addresses

I got this error when I specified multiple email addresses in reply_to The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 ...
3
votes
1answer
45 views

Online index rebuild LOB types

I have read and heard that you cannot perform online clustered index rebuild for tables that have a varchar(max) type. This (as I have read) also should be true for nonclustered indexes that contain ...
1
vote
2answers
70 views

What is better? Delete and insert or update?

I have a python script in which I have to update a column in 67000 rows. The value of the desired column can be unique for each row. I found that inserting 67000 rows takes about 5 seconds but ...
0
votes
1answer
19 views

Backup/restore using OPENDATASOURCE OR OPENROWSET

Has anyone ever successfully taken a backup or restore to another server using OPENDATASOURCE/OPENROWSET? I am not able to use linked servers so I am exploring this idea.
1
vote
0answers
39 views

Cursors and concurrent users

I typically avoid cursor operations like the plaque, however, I have come across my first problem where using a cursor outperforms a query. So I am forced to use it. I have created an elaborate ...
3
votes
2answers
156 views

Database User not reported as orphaned after Windows login dropped

I have dropped a SQL Server Windows Login. I then ran the below code to check for orphaned database users. However, the database user corresponding to the dropped Windows login does not appear as an ...
1
vote
0answers
26 views

SQL Server Real Time Data integration with different Instance

I have got a SQL application which needs to be merged with a new CRM applicaiton. so data coming into the source tables, then triggers push certain fields into the Staging table with a flag '0' and ...
3
votes
1answer
37 views

Copy database and clear down data (including linked tables) older than N days

I have a sizable production database (140GB) on MS SQL Server 2012, which I'm trying to automatically download to our development environments on a periodical basis (every week or on demand). I'm not ...
1
vote
0answers
20 views

How to tell if Database Certificate Used?

I plan to migrate a SQL Server database to another server. There is a certificate listed under the Security > Certificates view in SSMS Object Explorer. I ran the below query to check if database is ...
3
votes
1answer
58 views

FlushCache messages appearing in log at specific times

We've been having a lot of database performance issues lately, and I've been trying to see if I can figure out why. We don't have a DBA (I'm a software developer) so I'm sort of just winging it, and ...
3
votes
1answer
90 views

Optimized Way of Scheduling a Differential Backup

I am working with a data warehouse with SQL Server 2012 and was wondering what would be the most optimized, AUTOMATED procedure for a backup/restore strategy. Current observations and limitations: ...
0
votes
0answers
25 views

point license on existing Sql server to second license from another organization [on hold]

We administer Sql Server instances for several outside organizations. We have an instance set up in development using our license. Is it possible to point this existing instance at the license file ...
0
votes
0answers
36 views

Adding Partitions to an Existing Filegroup

For maintenance reasons, the organization that controls the servers where I work has decided to limit the number of file groups and files for partitioning to just 1 of each. Their reason for this is ...
0
votes
1answer
27 views

SSRS minus first two dates as the header

I have a SSRS report that has one column called startime that is listed in mm:dd:yyyy hh:mm:ss format. For the header of this column I want to minus the first date from the second date to give me an ...
1
vote
0answers
15 views

Change Data Capture missing changes for a specific record

I have enabled CDC in SQL Server and it generally works well but sometimes the changes are not recorded for some reason. And only for a couple of records. But then if I issue an UPDATE from SSMS, the ...
2
votes
1answer
35 views

Failover Cluster Diagnostic Logs

I know there must be a simple answer to this question, but I cannot find it anywhere. Our SQL 2012 FCI have SQLDIAG .XEL files in their MSSQL\LOG folder. In some instances, these files are often ...
1
vote
2answers
35 views

Migrating CLR Assemblies

I am migrating a SQL Server 2008R2 database to a new server. (also 2008R2) There are a number of CLR assemblies on the server. Will these automatically migrate with the database or will I have to ...
1
vote
1answer
33 views

Linked Server and MSDTC on cluster

I'm trying to set up a linked server between two instances we have on our network. I've done this many times before without an issue, but this time I repeatedly get the following error: OLE DB ...