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
1 view

Column Store Indices versus Dimensional Tables

I have a Data Warehouse and want to think ahead one year when I may get a database update allowing me to use column store indices. My dimensional tables are mostly junk dimensions containing columns ...
6
votes
2answers
7k views

Add DEFAULT to existing column

In Microsoft SQL server, how can I add/change the default on an existing table column using T-SQL?
0
votes
1answer
30 views

SQL redundant databases both sets being modified independently yet staying concurrent

I have a server in location 1. This location has slow external internet but all the employees. Location 2 has fast external internet but no people are there. I have a mobile app that I would like to ...
3
votes
2answers
24 views

sql server max memory includes SSIS?

I have installed 2 instances of sql server plus SSIS on the following server. Note the amount of RAM is nearly 384 GB And this is the max and min memory settings that I have applied to my 2 ...
2
votes
1answer
77 views

Update one column based on count of records of grouped value in another column

Given a table CREATE TABLE TABLE_ITEMS ( serial_num int null, item_group int null ); INSERT INTO TABLE_ITEMS VALUES (0,1), (1,1), (2,1), (3,1), (4,1), (0,2), (1,2), (2,2), (3,2), (4,2), ...
3
votes
1answer
25 views

Bidirectional Replication Push and Pull with SQL Server

Please bear with me, I'm a developer working with a client without access to a strong DBA. I have a question about bi-directional replication with the following setup and requirements: MSSQL Server ...
1
vote
1answer
12 views

MS SQL Server ensure only one of the several records for a given item has a column with true value

I have a table like this Computer(id, NIC_name, is_primary). My primary key is (id, NIC_name) and is_primary is a bit field for a boolean value. I would like to ensure that for all computers with same ...
1
vote
1answer
575 views

SQL Server connection failed for domain user from Mac OS machine

I have SQL Server 2008 R2 SP1. I am using connection string to connect to SQL Server. In connection string I am passing the driver path, server name, TCP port number, user name with which I want to ...
0
votes
2answers
151 views

how to select top ID from join operation and staging tables

I have this inner join from staging and operations table jobsCode I want to select the top surrogate key ID and get the Start_Date from this join my problem is my Query rerunning 2 records original ...
0
votes
1answer
17 views

Data migration from SQL Server to MongoDb [on hold]

I need to migrate some data from Sql server to MongoDb collections. Data structure could be not equivalent. I need to set custom mapping rules. Can you advice me a tool that is able to perform that ...
2
votes
3answers
1k views

Twice job results in sql server, last one is left in progress

I have the job MP - Create CSV which execute a package SSIS in sql server 2008, when I check for the job history I see the result at step 0, I expand and I have 2 results for the step 1. Fist result ...
0
votes
1answer
9 views

Cannot open backup device Error

I have a SQL Server Agent job that backs up a database on a remote server to a network drive. Linked Server, I believe is set up correctly but I get the following error: Msg 3013, Sev 16, State 1, ...
0
votes
1answer
38 views

Failed SQL Login - Source server same as destination cannot locate SPID SQL Server 2014

Bit of a confusing one here. We are getting repeated messages in the SQL Server error log as below for a SQL Server instance: NT AUTHORITY\SYSTEM Reason: Failed to open the explicitly specified ...
1
vote
1answer
28 views

SQL Server full text search query takes way too long to execute

I've got query snippet as follows: SELECT * FROM CONTAINSTABLE(dbo.Analysis, *, 'FORMSOF(FREETEXT, "historic year-on-year exchange rates forecast year-on-year exchange rates")'); I'm running it on ...
1
vote
0answers
22 views

Maximum character length for a column if I concatenate all the columns together in SQL Server for SSIS packets

I have a project requirement which extracts data on a daily basis and sent to another data warehouse. Each query has different set of data and number of columns returning are different and also the ...
3
votes
1answer
104 views

How to get exact year difference between two dates in SQL Server?

I have a date of birth column to which I need to compare the current date and return the difference as age. Currently I am using the following query : DECLARE @DateOfBirth date = '2000-07-27' DECLARE ...
-1
votes
1answer
35 views

How to do superscript in SQL Server 2012 query? [on hold]

I am trying to change superscript in SQL query string. Example: Select 'Your submitting date is 2nd January 2016'; As above query, I want to change nd to superscript.
1
vote
0answers
29 views

SQL Server Mirroring Removed

Does anyone know how to tell when SQL Server mirroring was removed from a database? My log file is flooded with login failures but I can't find mention of removing of a mirror. Is there any DMV way ...
1
vote
1answer
35 views

How to restrict access to SQL Server user in some period of time

I have two SQL Server users 'A' and 'B'. I use user 'A' for ETL and 'B' for reporting. My requirements is to restrict user 'B' access while user 'A' performing ETL (Extraction, Transforming and ...
1
vote
3answers
58 views

SQL Server Max memory limit

I have my SQL Server 2008 R2 installed running on 32GB ram. I need to decrease the limit SQL Server uses to 28 GB and I have set the same to 28GB but it is still taking more. I have seen posts saying ...
2
votes
1answer
15 views

Hosting SQL Server and SSIS/SSRS in same VM

I have SSIS / SSRS and large number of databases currently being hosted on the same prod server (SQL1, SQL Server 2008R2). Since SQL1 already has SSRS/SSIS installed, would it be a good option to ...
3
votes
2answers
5k views

TempDB Log Space and ACTIVE_TRANSACTION

Our monitoring solution (SCOM) is currently flagging that the tempdb log is running out of space. However we have auto grow set to 1GB chunks for the log and we have 25GB of space left on the drive. ...
0
votes
1answer
27 views

Why does adding a transactional replication publication change all the tables and columns to “not for replication”?

I'm trying to get replication set up - this is my first time ever doing it, so I'm probably making some rookie mistake here. Right now I'm just working in the dev environment. I've been following the ...
2
votes
2answers
84 views

Potential issues migrating from SQL Server 2014 to 2012 by scripting tables and data?

I have a very simple question. What would be the typical "gotchas" involved with scripting all the data to migrate a 2014 SQL server database to 2012? Is this a pretty solid process? Are there ...
2
votes
2answers
45 views

Hyper V replication - vs - sql replication solutions

I need to establish an offsite copy of a number of production servers, including SQL server. Hyper V replication has been chosen as a simple solution (all servers are virtual). This is to supplement ...
6
votes
1answer
262 views

Timestamp-based index

I have a big database (200GB+) that contains some log info. And I want to speed up SELECT queries and stored procedures. I have a table with a GeneratedOnUtc datetime column, and have a non-clustered ...
7
votes
3answers
15k views

Can SQL Server Management Studio Express be installed standalone?

I was wondering if the SQL Server Management Studio Express (mainly for Microsoft SQL Server) be installed on a standalone machine (without any of the SQL Services and stuff) to connect to a remote ...
1
vote
3answers
176 views

How to get the first or last row in ordered result set, depending by column value?

I have the follwoing result set from the table PUNCHREPORT EMPLID Name PUNCHDATE PUNCHTIME DEVICETYPE .................................................................. 70 ...
1
vote
3answers
75 views

Quality of Microsft's SQL Server Training/Certification

I'm working as a SQL Developer in the healthcare industry and I have about 2 years experience. I'm primarily using SQL Server 2012. My company will pay for me to get additional training and/or ...
0
votes
1answer
23 views

Statistics that are neither auto_created nor user_created

So far, I was under the impression that there are two types of statistics objects in SQL Server: automatically-created statistics, which are created by SQL Server on index columns or single columns ...
9
votes
3answers
42k views

How to handle TimeZone properly in SQL Server?

My local development server is in the Middle East, but my production server is in the UK. I need to show the date to the user in their time zone. For example, if a user is in Saudi Arabia then I ...
2
votes
1answer
16 views

How to copy non clustered indexes in transactional replication

I create transactional replication ,but forget to include non clustered indexes and now my subscriber have only clustered indexes (primary key) and I want to transfer all nonclustered indexes to ...
1
vote
1answer
856 views

SSIS - insert system date variable as a execute sql task parameter

I am trying to insert the system:starttime variable into a table by passing a parameter into an execute sql task. I dont have much knowledge of SSIS data types, and I am currently having trouble ...
0
votes
0answers
18 views

SQL Server Setup The network path was not found (uninstall node)

We have a cluster with 8 nodes. this instance is installed on 2 nodes S141 (active) and S142 (passive) I want to uninstall with the command: Setup.exe /Action=RemoveNode /qs /INSTANCENAME="SQL16" ...
3
votes
2answers
5k views

Cannot use SQLCMD

I have started SQL Server in single user mode like this: c:\....\sqlservr -m When I try to connect to it with SQLCMD -E, I get the following error: Msg 18461, Level 14, State 1, Server SERVERNAME, ...
4
votes
3answers
79 views

SQL Server job hanging and can't be stopped

I am using SQL Server 2008 R2 (10.5.2500.0) and we have a job that runs every weekend. It runs the ola.hallengren.com database maintenance tool to backup several databases, then FTPs the backups off ...
0
votes
1answer
111 views

How to avoid delimiter character in BCP export?

In my project, I need to use SQL 2008 BCP tool to export the result of a stored procedure into a fixed column width file. I used different approaches, but still couldn't get expected result. Things I ...
0
votes
1answer
175 views

Select Query takes more than a minute to retrieve data

I have a table that has 99 columns, all of them are not needed but they were there when we started. There is a Primary Key (Objectuid) which is a GUI and has the Clustered Index on the PK. The Table ...
1
vote
2answers
32 views

Drop and Create Script not working

I'm fairly new to databases, but I'm beating my against the wall trying to do something that (I believe) should be fairly trivial. I'm using SQL Server Management Studio 2012 and am trying to delete ...
0
votes
2answers
107 views

Sql Agent Jobs executes too slow

I have posted a question like this before but is seems that I did not explain the whole story clear. So I made this one to explain it in details. Here's the stored procedure USE [xxxx] GO /****** ...
-3
votes
1answer
36 views

Microsoft Sql Server online [closed]

I am having a Sql Server Standard Version on my PC. I would like to make this Sql Server available over the internet with/without VPN. Please suggest me how is that possible. Thanks Kalyan
1
vote
1answer
20 views

SQL Server Agent Notification Email if a Step has an error, but the job is succesfull?

Is it possible, that I can receive Email from Server Agent, if a step in an Agent has an error, but the Job is successful? In the history, I can see, that for example one Step has an Error, but all ...
0
votes
2answers
305 views

Need help phrasing regular expression to find particular T-SQL pattern

I know this is a Database Forum, but since the text I am trying to find is SQL-specific, I am hoping that somebody can point me in the right direction. I need to search code to find places where the ...
0
votes
1answer
2k 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' ...
12
votes
1answer
424 views

What is the cause of this problem with CONVERT()?

Consider the following two statements: PRINT CONVERT(NUMERIC(38, 0), 0x0100000001, 0); PRINT CONVERT(NUMERIC(38, 0), 0x0100010001, 0); Both statements return -1; isn't that incorrect since the ...
0
votes
1answer
40 views

De-duplicate rows in place vs de-duplicate on transfer

Doing what: Loading data from many flat table CSV files into their final destination, a "Target" table. Using: TSQL / SQL Server 2008 Goals: Don't include "duplicate" rows What are duplicates in ...
0
votes
1answer
549 views

Downloading files based on most recent date and timestamp

I have a requirement to download zipped files from an SFTP site using C# and Script Task within SSIS. We have multiple files on the server with the same name, but with different date and timestamps. ...
21
votes
4answers
84k views

Restore SQL Server 2012 backup to a SQL Server 2008 database?

Is there a way to restore a SQL Server 2012 database backup to a SQL Server 2008? I tried to attach file, it does not work.
0
votes
1answer
396 views

Can You Replicate Sequences

In SQL 2012 can you replicate sequence objects, and if so do changes to the sequence (including consumption of values) get replicated? If not is there a good reason why this was not included?
4
votes
1answer
60 views

How do I troubleshoot error 26: “Error Locating Server/Instance Specified”

I'm trying to configure TCP access to my SQL Server named instance (named SQL2012). I use management studio to connect to the database engine. I type in the server name: "tcp:localhost\SQL2012" and I ...