All versions of Microsoft SQL Server (not MySQL). Please also add a version-specific tag like sql-server-2016 if that is relevant to the question.

learn more… | top users | synonyms (2)

-1
votes
1answer
22 views

SQL Server 2014 , Login issue

hope that you all are fine i have a little login issue here as i created a new user login the SQL sever 2014 and i tried to connect to my database using this new login and the below error pops up ...
1
vote
2answers
20 views

Prevent SQL Server Management Studio changing destination DB on restore

Is there a way to prevent SQL Server Management Studio 2014 from automatically setting the destination database when you try to restore a backup to another database? I just had a nasty surprise when ...
5
votes
3answers
351 views

Capitalize only the first letter of each word of each sentence in SQL Server

I want to capitalize only the first letter of each word of each sentence in a SQL column. For example, if the sentence is: 'I like movies' then I need the output: 'I Like Movies' Query: ...
0
votes
1answer
10 views

shipping data without impacting performance

I am new to DBA - actually deputising for a colleague on maternity, Im a sql developer. My company, an on-line retailing coy wants to move copies of our databases from our prod server to a back up ...
1
vote
1answer
34 views

Wingdings font in SSMS's column

I do want to create a column which should has check marks and cross marks. Here is the part of my query: iif(order_details.order_status = 'Y',char(252),char(251)) as [completed?] After I execute ...
0
votes
0answers
26 views

SQL Server 2014 Standard Max Memory vs. Cluster Shared Volume Cache

Deploying a new two node SQL Server 2014 FCI with Storage Spaces on a local (Cluster Shared Volume) CSV—JBOD will be attached directly to both SQL Server machines and the storage will not be tiered. ...
0
votes
0answers
24 views

Log shipping with active active cluster configuration

Scenario: We are planning to configure active active cluster for our SQL Server. Both will be having separate instances(A instance on node 1, B instance on node 2). 'A' instance will have Production ...
1
vote
0answers
31 views

Quorum Questions For An FCI And AlwaysOn in a WSFC

I was reading the white paper on FCI + AlwaysOn as well as several other resources on quorum voting differences in Windows Server 2008 and 2014 and had 3 questions. 1- Will giving a node in the ...
0
votes
0answers
8 views

SSL Issue on SQL Server 2014 DEV SP1

We have a cert on our SQL Server 2014 dev box running SP1 with force encryption enabled. If we connect to the FQDN for the box the encryption works. If you put encryption on it works and if you don't ...
2
votes
2answers
53 views

Why is .bak file size increasing/doubling with each consecutive backup on SQL Server?

I'm running a simple DB on SQL Server 2012 Express. Just today, when I backup the database, the .bak file size doubles to what it was from the previous backup just minutes before. I have done ...
0
votes
2answers
31 views

Multiple SQL Server instance install question for AlwaysOn

I have a 2 node WSFC cluster with SQL Server 2014 installed on each for AlwaysOn. This is working fine. My question is can I install another instance of SQL Server 2014 on these nodes for another ...
0
votes
1answer
49 views

How to handle HUGE 16GB SQL file?

I've abc.sql file exported from MySQL Table. This abc.sql file is 16 GB in size with around 28 million insert statements. I'm looking for option to store it in SQL Server Database. Couple of ...
-2
votes
0answers
18 views

How link data - delimiter

How can I make script take mydata from mytable instead of providing values like in an example below? SO instead of set values to Code and Location link these to mycolumns in mytables? with data as ( ...
-1
votes
0answers
37 views

Which columns need index in recursive table and soft delete

I have a Category table like below : I have a recursive relationship on this Category table. I use soft delete in my project. I have 2000 rows in Category table. When I want to show data in a UI ...
-1
votes
1answer
28 views

How to get 2-nd set of data string?

I tried that: SELECT [ConstituentID] ,ColumnName ,SUBSTRING(ColumnName, 1, CHARINDEX('/', ColumnName)-1) AS ColPart01, SUBSTRING(ColumnName, CHARINDEX('/', ColumnName) +1, 100) AS ColPartREST FROM ...
0
votes
1answer
17 views

SQL Server Express 2014: Network Access

I have SQL Server Express running on one (virtual) machine running Windows 8.1, but I cannot connect to it from another. I have followed the instructions on ...
1
vote
1answer
28 views

How to split data from column to multiple columns [duplicate]

I am just starting DBA and curious about how can I split entire column with data like: "1-2/456/£25.00-26.00/56/10+". My delimiter is "/" and I need to get data in 5 columns accordingly. So data to be ...
0
votes
0answers
18 views

Hot Redundant in SQL Server [on hold]

I want to copy all data from one SQL Server database to the same structure in another SQL Server, to achieve hot redundant. Does anyone have any good suggestion to do this??
19
votes
5answers
8k views

SQL Server compatibility with New TLS Standards

The major browsers are moving beyond SSL3.0 and TLS1.0 . The PCI Security Council has declared an end-of-life date for these protocols to be considered sufficiently strong encryption. We need to ...
1
vote
1answer
647 views

Importing a Foxpro Database

I have a Fox Pro database (one DBC and a bunch of DBF files) that I want to import into SQL via the Import and Export wizard. I downloaded the FoxPro ODBC driver. I managed to get to the screen that ...
1
vote
0answers
9 views

How to alter replicated column

I want to change the length of a replicated column. I ran this: exec sp_articlecolumn @publication = N'DIONLINE-SQL2014' , @article = N'Valuation' , @column = N'WallConstruction' , ...
0
votes
1answer
253 views

Remove db_denydatawriter, db_denydatareader role from admin user

I have an AWS SQL Server instance, and I have accidentally given my user (and the only user I have access to) db_denydatawriter and db_denydatareader role on our primary database, which stops me from ...
1
vote
1answer
100 views
+100

Dropping PLE on query

In company we are working in project on very big database. It uses 100GB RAM. What's weird before first running a query PLE is 11k~, after running it drops to about 70, anyway when after 15 mins I ...
1
vote
1answer
43 views

Transactional replication latency issue

I inherited database systems like this. Currently I have publisher database in SQL Server 2005 compatibility mode on Windows Server 2008 R2 with SQL Server 2008R2 SP2 machine. Distributor is on the ...
0
votes
0answers
10 views

Connect to MySQL Webserver (not localhost)

I have a problem. And I hope someone can help me or point me in the right direction. I am working on a project and need to sync a MySQL database (running on PHPmyAdmin) with a MS SQL Server. I ...
0
votes
1answer
218 views

Breaking up long running query into batches runs fine for a while and then produces fatal error

I'm using a variation of this post which details using "careful batching" to delete records in batches from a table that contains 38MM records. The script below runs for a while and shows results ...
5
votes
1answer
60 views

What are the “GDR” vs “QFE” hotfixes for SQL Server 2008 R2 SP3?

I'd always assumed that higher patch numbers were necessarily later releases, but now I'm not so sure. Looking at the SQL Server Build List for SQL Server 2008 R2 SP3, there are two possible ways to ...
4
votes
1answer
738 views

Cannot Delete FileStream Group from Sql Server 2008

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when ...
5
votes
2answers
220 views

Should I add an auto-increment / IDENTITY field to a cross-reference table just for PK purposes?

I'm adding the following cross-reference table to my SQL Server-hosted DB: company_id bigint not null (FK) org_path nvarchar (2048) not null The company_id field refers to the id field in another ...
0
votes
1answer
27 views

SQL PIVOT multiple columns [duplicate]

so this: so I need: any suggestions?
0
votes
1answer
15 views

Migrating differential backup restoration

Good afternoon, A little back story about what I'm trying to do: I'm migrating a database environment from one SQL server to another. A simple full backup/restore works fine, but there's a ...
4
votes
3answers
42 views

Clustered Index Scan when using greater than in WHERE clause

I have the following table create table t1( col1 varchar(255) NOT NULL, col2 varchar(255) NULL, col3 bigint NULL, CONSTRAINT PK_t1 PRIMARY KEY CLUSTERED ( col1 asc ) ) CREATE NONCLUSTERED INDEX ...
2
votes
1answer
25 views

Migrating from SQL Server 2008 R2 to SQL Server 2014

I'm migrating from SQL Server 2008 R2 to SQL Server 2014. Can someone tell me if my approach will work? Current Environment: SQL Server 2008 R2 Windows 2008 R2 Steps to Migrate from SQL Server ...
1
vote
2answers
53 views

How can I represent a list of words and related words in a relational structure?

I have a list of header words and words as below and I am trying to understand how best to represent these in a relational table: Header Other Words Words abandon abandoned, ...
1
vote
1answer
45 views

Syntax Error Help [on hold]

I have this script that works just fine but when I change the directory paths it seems to get this syntax error "unclosed quotation mark after the character string" I have looked over this for hours ...
0
votes
1answer
319 views

Prevent gaps while using Identity/sequence object in sql server

I have a table and I am trying to insert values in it. I want to prevent gaps in the primary key column. For primary column I have tried using Identity / sequence objects. I know that this is ...
0
votes
2answers
47 views

Extracting data from SQL Server linked server

I am using MS SQL Server 2012, and I am trying to extract data from a Linked Server database. In SQL Server management studio, I can see the linked server. I can browse the database on the server. I ...
1
vote
2answers
45 views

Query to extract all SQL database roles with INSERT and/or UPDATE privileges

I've taken over the support for a SQL 2008 database and there are a multitude of custom roles (25+) associated within. I'm trying to figure out which of the custom roles have the ability to perform ...
2
votes
2answers
122 views

Composite index

Assuming i have a table X with 12 columns . in my queries i am filtering on these conditions select * from x where a=@a and b=@b select * from x where a=@b and b=@b and c=@c select * from x where ...
1
vote
2answers
64 views

Any different guidance for tempdb with Availability Groups?

I have an Availability Group set up on SQL Server 2014 running on a two-node Windows Server Failover Cluster. The setup consists of two stand-alone instances + synchronous with automatic failover. ...
3
votes
2answers
43 views

Extended events vs SQL Audit - performance implications

I would like to setup a audit trial kind of system on my database to monitor for UPDATE/INSERT statements on a specific table. I have two options infront of me i.e. Using SQL Server Built in audit ...
14
votes
3answers
159 views

Transaction Log Backups Serial or Parallel?

We happen to be using SQL Server 2012 Standard Edition. I also happen to use Ola Hallengren's scripts to provide an easy, more flexible framework for doing backups and maintenance. This question ...
3
votes
1answer
86 views

MEMORYCLERK_XE Memory Usage Will not Clear

We've been having an issue where memory usage from Extended Events grows to over 1 GB and then will not clear - even when we stop all XEvent session on the instance. This hasn't been an issue yet on ...
0
votes
2answers
44 views

A tail-log backup of the source database will be taken ? Why I am seeing this warning

I took a backup of a database from 1st server (which runs SQL Server 2014). When I try to restore the backup to a 2nd server (which runs SQL Server 2012) I get this warning message: Warning ...
1
vote
1answer
21 views

Is there a way to associate a description with database snapshot?

Is there a way to associate a description with database snapshot? I usually name snapshots using original database name and timestamp: DBName-05-27-2016_1018 I would like to be able to associate a ...
0
votes
1answer
44 views

Index Reorganize/ Rebuild Time

I have maintenance job on SQL Server 2012 Enterprise Edition that runs daily to check index fragmentation and reorganize or rebuild the index based on the percentage of fragmentation. I used this ...
3
votes
3answers
64 views

Get last two IDs from rows for last two days

I have a table that looks like this: +------------+------------+--------+----------+--------------+ | terminalid | date | toolid | toolname | workcenterid | ...
4
votes
1answer
81 views

How do I set a SQL Server Unicode / NVARCHAR string to an emoji or Supplementary Character?

I want to set a Unicode string variable to particular character based on its Unicode code point. I want to use a code point beyond 65535, but the SQL Server 2008 R2 database has a collation of ...
1
vote
1answer
17 views

The call to LOADLIBRARY for the XA resource manager DLL failed (PostgreSQL & SQL Server)

I am attempting to setup a Linked Server from MS SQL Server 2012 to PostgreSQL 9.3 via Linked Servers & ODBC driver from PostgreSQL. Everything works, until a given query invokes MSDTC, at which ...
3
votes
1answer
21 views

Multiple Filters for Databases on SQL Server Server Level Audit

I am attempting to create a Server Level Audit to track Database Level events in SQL Server 2014. I know I can create them at the database level but I want the audits all databases at the server ...