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)

2
votes
1answer
44 views
+200

How do I move or redistribute FILESTREAM files between containers?

We have a FILESTREAM container with a few million files, and we believe it's the cause of our performance issues we're experiencing (abundant timeouts). According to this blog about FILESTREAM best ...
-1
votes
0answers
8 views

Mirrored Backup or Disk to Disk Replicated Backup

What would be preferable? Performing a database backup and mirroring the backup to two separate locations as part of the backup process. or Backing up to disk to disk backup and replicating that ...
1
vote
0answers
14 views

Very slow insert performance on large table (EF)

One of our systems has a table that receives around 20k inserts per day - it currently contains ~10m rows. We've just pushed out a system upgrade and I'm intermittently getting some shockingly slow ...
5
votes
4answers
545 views

The column order of composite clustered primary key on a partitioned table?

I have the following table. create table T (K1 date, K2 int references S(Id), ....) on partitionScheme(K1) The table will be partitioned by K1 (K1 has low selective. the data will be appended in ...
0
votes
1answer
37 views

Should I remove this clustered index?

I have lots of tables designed similar as the following (slightly simplified) sample. The original table on different servers has between 50,000 and 200,000 rows (around 12,000 - 150,000 pages). ...
-1
votes
0answers
11 views

try_parse differences from SQL Server 2012 to 2014? [on hold]

My queries which ran correctly in SQL Server 2012 are now failing. I Isolated this down to declare @d datetime2 select @d=TRY_PARSE('3.3.2019' as datetime2 using 'de') select TRY_PARSE(@d as date) ...
0
votes
0answers
4 views

Dynamic script to Drop Indices of a specific column

I´m currently writing an sql script to update our database and for that I need a script to drop indices that rely on a specific column (cause I also what to drop the column). In my script I have used ...
1
vote
1answer
12 views

Setting up HA and a synced up reporting box all together using SQL Server 2014 Standard Edition

Scenario: We are going to upgrade our third party application. Also we are going to upgrade our DBMS from SQL Server 2008 R2 to SQL Server 2014 Standard edition. We also wanted to have a high ...
0
votes
0answers
9 views

How to connect to a password protected Access 2010 database from SQL Server 2014 x64

I have the following situation: An Access 2010 database (.accdb) on a shared folder of a remote server. A domain account that can access the shared folder and files. A SQL Server 2014 x64 running on ...
0
votes
1answer
33 views

which version SQL server can Install Windows 10? [on hold]

I have Os Windows 10. I am trying to install SQL Server 2012. After installing I try to connect to the server, the connection to the server returns the following error message: A network-related ...
1
vote
0answers
24 views

SQL Server Transactional Replication and Security Setup

I am new to SQL Server replication. I was able to setup transactional replication successfully, but I feel like I am missing some important concepts regarding security and accounts. I have a few basic ...
1
vote
1answer
19 views

How to run a job in snapshot isolation?

We have a long running job for report data generation and we are not worried about changes to the source data after the job has started. For this case the SNAPSHOT isolation mode seems to be a good ...
2
votes
0answers
91 views

Advice on how to improve this stored procedure

Edited: Added table column datatype I have 2 tables ReportItem id (int, primary key clustered index) report_item (nvarchar(100)) flow_name (nvarchar(50)) source (nvarchar(50)) Tech_Details id ...
0
votes
2answers
406 views

Unable to delete Log Shipping configuration

I need some help with my SQL 2005 server. I am trying to setup log shipping, I've successfully done so for all user-databases, except one. From the looks of it, it once had log shipping configured ...
0
votes
0answers
23 views

Transactional replication unspecified error SQL Server 2008 R2

I have a set up of Transaction Replication with the Publisher being the distributor. It works on Push mode. While replicating, more frequently for the past few weeks, the data is not being pushed to ...
0
votes
0answers
18 views

Database tempdb deadlock

I have been getting a deadlock error for a long time : Could somebody please help me as to what kind of deadlock this is and how to resolve the same. Please ask for any additional details if ...
4
votes
1answer
129 views

Remove the log shipping configuration on the secondary server, when the primary is no longer available

My primary server with SQL Server 2005 broke down, so I've started up the log-shipped database on the secondary server. The database is live on the secondary server, and I just need to remove the log ...
0
votes
1answer
55 views

Availability Group failover stuck in Resolving State

I am setting up a lab for testing automatic failover for SQL Server I have a 2 node WSFC (SQL-CLUSTER-TEST-01) with the nodes SQL-TEST-01 SQL-TEST-02 A listener SQL-HA-GRP-01 My initial testing ...
0
votes
2answers
29 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 ...
3
votes
1answer
65 views

Basic question: Simplest way to share company databases

My company is looking to access large quantities of data from another company we have good relations with. Currently we are using a web interface to interrogate their information, however it is quite ...
4
votes
1answer
237 views

SQL Agent Jobs Automatically Disabled After Modifying Maintenance Plan

I modified a maintenance plan yesterday, to find out this morning (by using the last modified date from sysjobs) that all jobs related to the maintenance plan are disabled. I can't figure out why ...
10
votes
6answers
17k views

Add article to transactional publication without generating new snapshot

Using SQL 2008 R2 transactional replication with pull subscribers, when we add an article, I'd like to avoid having to create an entire snapshot (the db is ~80 GB, so this takes hours). From this ...
1
vote
1answer
602 views

Optimising a query of an SSRS dataset

Consider the query given below: SELECT * FROM ((SELECT c.cust_id , c.username , REPLACE(qs.seg_type_ref_key_02, 'N/A', 'Non Vip') casino_group, ...
1
vote
0answers
12 views

UTF8 Trouble while migrating from MSSQL to MySQL with MySQL Workbench

I am tasked with migrating part of our database from an on-site MSSQL server to an Amazon RDS MySQL. This will be my first attempt with a database migration, so I am doing a dry run from our MSSQL ...
6
votes
2answers
187 views

Is there a T-SQL equivalent for punctuation as [0-9] is for numbers and [a-z] is for letters?

Is there a T-SQL equivalent of the [0-9] and [a-z] patterns that will let me pull values from a column that contains punctuation? For example: Create Table #Test ( Value VarChar(10) ) Insert Into ...
-1
votes
1answer
59 views

Retrieve data from two tables where table 2 has multiple entries for one value [on hold]

I am looking for the best way to create a SELECT statement to pull data from 2 tables. Example below is the table structures: Table 1 | Table 2 ...
11
votes
1answer
118 views

SQL Server: How to track progress of CREATE INDEX command?

SQL Server 2014, Std Ed I have read that percent_complete in dm_exec_requests does not work for CREATE INDEX, and in practice, percent_complete sticks at 0. So that doesn't help. I currently use the ...
1
vote
1answer
32 views

Diffrence in result from PostgreSQL (PostGIS) and SQL Server (Spatial)

I have two points and I have to calculate difference between them. I using below query in SQL Server. SELECT geography::Point(27.185425, 88.124582, 4326) ...
4
votes
4answers
281 views

Summing data based on distinct dates

I am trying to get an accurate count of total days a tool is out for rental. Here is a data sample: CREATE Table #tmpToolRentalDays ( ToolId BIGINT, StartDate DATETIME, ...
1
vote
2answers
741 views

After Restore Log_reuse_wait_desc of Replication

I'm wondering if anybody has ran into this issue before and has any suggestions on what's causing it/how to fix it. We are restoring a database into lower Dev environments and after the restore the ...
8
votes
1answer
106 views

Overcoming the SQL Server Express Edition limitation

Microsoft SQL Server 2014 Express edition has a database size limit to 10GB. Now, is that just for a single instance or the overall size that the edition will allow? Or does that means that I can have ...
5
votes
1answer
123 views

SQL Server Agent initiating self-termination

For the past month, one of my servers is facing issues with SQL Server Agent. It stops automatically with below error, which happens randomly: Sql Agent Output file [097] Memory leak detected ...
3
votes
1answer
107 views

Export/import data from Excel into a table with queries

I'm a newbie interested in learning and implementing things I learn. I've been working on SQL Server 2014 these days and I'm loving it. I've come across some scenario's where I would have an Excel ...
0
votes
0answers
13 views

Generate DACPAC diff using predefined config

I would like to generate a diff file based on the database vs DACPAC comparison. Currently what I am doing is extracting DACPAC from the target database and trying to create a diff file based on that ...
8
votes
4answers
24k views

Maintaining SQL Server 2008 R2 on Windows 10

I have to run SQL Server 2008 R2 on Windows 10 but it is not supported and so I am not getting any updates. Installing a later version of SQL Server is not an option. I can find all the service packs ...
0
votes
1answer
45 views

SQL Server AlwaysOn Error:35250

I am configuring AlwaysOn in my test environment but getting the following error. Msg 35250, Level 16, State 7, Line 1 The connection to the primary replica is not active. The command cannot be ...
4
votes
2answers
15k views

SQL query that concatenates values from duplicate rows in a single table

Let's say I have a table of employees, like this: Name Sex Role Bob M Developer Joe M QA Now, I have a problem with duplicated rows in this table. I will fix it ...
0
votes
0answers
27 views

Management Studio Database Space Available

Recently I have installed a fresh version of sql server 2016 RC. I get an error when I try to import a bacpac file from azure. SQL72012 Generate drop statements for objects that are in the target ...
5
votes
6answers
6k views

Backup database directly to FTP server

Is it possible from SQL Management Studio to create a backup directly to an FTP server? Basically, instead of choosing the destination to a disk, I sould like to be able to specify an FTP location ...
3
votes
2answers
143 views

select distinct one column with all instances of another column in a second column [duplicate]

If I have a table with the following information: ParentID | ChildID ---------+-------- 6 | 6 6 | 7 6 | 8 6 | 9 6 | 10 I need to ...
0
votes
0answers
37 views

Rebuilding statistics?

I had built statistics, they are: I need to modify the varchar to int in a field called SituacaoIncial in my Calclientes table. I used DROP STATISTICS ...
5
votes
2answers
70 views

Azure Data warehouse - User defined function issues

Anyone here had luck with creating and using UDFs on Azure data warehouse database? I am in the middle of migrating an on-prem warehouse from SQL Server 2014 to Azure datawarehouse and I ran into an ...
3
votes
1answer
155 views

SQL Server - monitor changes on linked server

We have a local SQL Server database which we have full control over, and in this local server we are linking a remote SQL Server database, to which we have only read access (no schema changes, no ...
4
votes
2answers
134 views

Why a SQL Server Table takes 1GB more after adding 55MB of data?

I've found that one customer database size exploded between yesterday and today. After investigation I've found a design problem in a table schema but after doing some math I know that 55MB of data ...
0
votes
1answer
29 views

How to select rows that date is in range from ranges table

I have a table1 that hold ranges rangeId, rangeName, fromDate, toDate,cat another table2 has rows rowTitle,rowDate I need to select all rows from table2 that table2.rowDate is between ...
1
vote
1answer
158 views

Best way to transfer a few tables from reserve server to production

We have two MS SQL Servers (2012 Standard Edition on Windows 2012 Server) which are located in the same subnet. One is production server. Another is reserve server. Currently there is a ...
1
vote
0answers
17 views

What counts when purchasing a BI SQL Server the application that connects to the server or the application users

I have a .NET Application (time registration) software that is frequentley used by all our employees and that I deploy on our lan net drive. This application connects to an express sql server. Now we ...
0
votes
2answers
141 views

Changing sa password

I'm trying to change the password of the sa account using SQL Server Management Studio 2012. I've followed the steps below but the password is still the same. Login into the SQL Server Management ...
1
vote
1answer
23 views

CDC with AlwaysOn Availability Groups

So I just recently got to enable CDC on an always on AG. While many sources claimed enabling CDC on alwaysON AG is as easy as it is on any standalone server, turns out it really isn't. As MS says ...
0
votes
0answers
30 views

Best way find SQL unused tables, views, triggeres, stored procedures, functions

What is the best way find SQL unused tables, views, triggeres, stored procedures, functions. Want clear DB, so need find that not using long time. Interesting all items. Add trigger to each table - ...