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
0answers
367 views

going from heirarchical XML to heirarchical SQL tables then SQL to c# objects to go to user view, how should I store the data in the databases?

Hi I'm getting my data from a web service using their getData call and it comes in as fairly chunky heirarchical XML, first everything all at once, like <allData> <product1> ...
2
votes
0answers
821 views

Logic to convert a UTC date-time to a specific time zone

I have a table which has 1 row per event. Each event has a datetime stamp column which has values in UTC time. Each row has an associated local timezone in which the event occurred. I have a DIM ...
2
votes
0answers
290 views

SQL Server retrieval error under heavy load (200 concurrent users)

Currently I'm facing an issue in a SQL Server retrieval procedure. Stored procedure returns unexpected result when executed by many user (No. of users > 40) concurrently for the same parameter. For ...
2
votes
0answers
3k views

Could not open File Control Bank (FCB) for invalid file ID X when restoring from snapshot

We have a scenario in which we, during integration tests, make a backup of an existing database and restore it under a new name. We then create a snapshot of our "new" database. After each test we ...
1
vote
0answers
42 views

To find SQL Server is actually used or not?

I have an SQL Server 2012 and a 2008R2 running in my environment. I need to decommission the server if the server is not actually being used. I did go through this and this where connection count is ...
1
vote
0answers
19 views

Powershell Invoke-Sqlcmd Implicit Transaction

Does Powershell, through invoke-sqlcmd or through running a query directly through a cmdlet, wrap a query in an implicit transaction? And if so, is there a way to work around this should my query ...
1
vote
0answers
43 views

Deadlock in SQL SERVER 2014

I am experiencing sporadic deadlock behaviour when my application tries to execute any DROP TABLE statement against my database. I tried capturing the deadlock graph and this is the output from ...
1
vote
0answers
26 views

Can I restrict an SQL account from system tables / functions?

I've got a piece of vendor software that comes with a MS-SQL database. The software has a user account configured to access the MS-SQL database. Is it possible to restrict that account from accessing ...
1
vote
0answers
33 views

Is there ANY risk in granting a superuser CREATE and ALTER procedure permissions in a specific schema?

I have a developer who has created a set of procedures/functions/views he uses to perform configuration analysis in a large application (provides much higher productivity than using the formal ...
1
vote
0answers
41 views

Having 2 identities in a table

I need to have some how 2 identity columns in one table. One that is normal identity and another one that will reset yearly. I have done the reset part with the help of DBCC CHECKIDENT ('TestTable', ...
1
vote
0answers
12 views

Transactional replication using articles filters and delete operations

The problem with transactional replication using articles filters and delete operations. I have a problem with my transactional replication when I use articles filters and delete operation. When I ...
1
vote
0answers
20 views

Solr with SQL Server or NoSQL

I am working on a POC of using Solr with SQL Server. I have a very complex data model with SQL server which required a bunch of joining and scalar functions to strip some mark up and other stuff. ...
1
vote
0answers
26 views

Problem inserting into table from trace file consumes all space in tempdb

I'm working with SQL Server 2008 SP3 Enterprise Edition (64-bit) I'm trying to import a trace file of about 3.5 MB (4667 rows) into a table as following: INSERT INTO DBTRACE with (rowlock) SELECT * ...
1
vote
0answers
32 views

2 SQL Clusters & 2 instances

Can anyone tell me why i wouldn't want to the architect Option 1 for SQL Server clustering? Option 1 is having 2 different clusters, and 2 different named instances on 2 VMs. One's Active is the ...
1
vote
0answers
19 views

Meta Destination Owner Differs From Actual Owner

How can the replication meta data table differ from the properties of the publication through the interface; for instance ... SELECT destination_owner FROM distribution..MSarticles Yet, when ...
1
vote
0answers
29 views

Index on a highly updated field causing excessive locks in SQL server

I'm in a bit of a conundrum about what the best course of action on this (bad?) index is. I have a table which i use as a notification holder that i watch for database changes with. CREATE TABLE ...
1
vote
0answers
30 views

Autocomplete in SQL Server Management Studio showing too much

I'm new to using SQL Server 2008 Management Studio as I just started working with it last week. Yesterday when I was working in one of our databases I remember that I used the auto complete ...
1
vote
0answers
45 views

Search for Arabic text ignoring diacritics, alef hamza differences, and kashida in SQL and oracle

Well, I have a table with an Arabic column which may contains variant forms of the same word in multiple rows, for example the word "أسمى" might be in the following forms: 1- with diacritics: ...
1
vote
0answers
27 views

Synchronization report for uncontained objects across each of the replicas in HAG

I have seen How to transfer logins and passwords between instances of SQL Server , Synchronize Availability Group Logins and Jobs and SQL Server 2012 Availability Group Add-in to synchronize ...
1
vote
0answers
14 views

syspolicy_purge_history 3rd step runs forever on a cluster node?

I have a SQL Server cluster. On one of the nodes, the syspolicy_purge_history job runs forever on step 3. I did stop and restart the job, however, again it is running forever at step 3. How can I ...
1
vote
0answers
47 views

Database suddenly in recovery-pending

We have a client running 70 databases on a SQL server. Last month they called us that suddenly database wasn't accessible. Database was in recovery pending mode. Today they called us again ...
1
vote
0answers
31 views

SQL Server dynamic inserts based on another table's rows

I've derived the following pseudo-coded script as a generic insert with variables that I want to replace for each row in another table (I can assume that the columns are always the same for the insert ...
1
vote
0answers
31 views

Failed to allocate reserved pages: FAIL_RESERVED_PAGE_ALLOCATION

Last night I received the error on one of my servers of: Failed to allocate reserved pages: FAIL_RESERVED_PAGE_ALLOCATION 2047 I know that this has already been discussed on here some but all ...
1
vote
0answers
49 views

sys.dm_db_index_physical_stats slow on first run after rebuilding indexes

I have a 10GB database in SQL Server 2016 RC1 on Windows Server 2012 R2 where I just performed many insert and delete operations. Afterwards, I ran: EXEC sp_MSforeachtable @command1="SET ...
1
vote
0answers
23 views

Matching table (with sub-tables) to another table(with sub-tables) efficiently

I have a problem in an ETL process. I need to integrate data into a data warehouse. The data is associated with a "variant". A variant is defined as having a specific set of parameters (identified by ...
1
vote
0answers
45 views

SQL Server 2014 sequence got reset on server restart

We have a sequence that got reset when we did SQL Server failover to the secondary node in the availability group which caused lot of issues with duplicate sequence being generated unexpectedly. I ...
1
vote
0answers
56 views

AlwaysEncrypted Conversion Fails

I'm trying to encrypt a column with AlwaysEncrypted and I get the following error. Could not deploy package. Warning SQL72012: The object [AlwaysEncryptedDemo] exists in the target, but it ...
1
vote
0answers
44 views

How can I migrate a WordPress site from MySQL to SQL Server Express?

I have developed a web portal in WordPress using xampp server. I have my database in MySQL. Now I need to deploy this WordPress portal on other system with SQL Server Express Edition. So how can I ...
1
vote
0answers
17 views

Include HostName in ODBC System DSN Connection

Not sure if this is a question for here or if it should go on Stack Overflow. If SO is a better fit, please migrate it. Our finance team uses Dynamics GP. Occasionally we need to track the query that ...
1
vote
0answers
16 views

Server error in reports application

I have a server with SQL Server 2005 installed with the latest service packs. SQL Server 2012 express was been installed on same machine and seems to have broken the Reporting services service. When I ...
1
vote
0answers
40 views

indexes and partition switching - how it works

We use partition switches to quickly load data, switching entire tables. We load an empty Table A with INSERTs and then switch it with empty Table B. These tables have identical indexes. What I ...
1
vote
0answers
33 views

Merge replication: some subscribers initializing by downloading changes multiple times

I have a database in merge replication with about 25 subscribers, all accessing the publisher/distributor over a satellite connection (high latency, low bandwidth). Recently, as part of a planned ...
1
vote
0answers
11 views

How to set minimal permissions to change SQL Azure Firewall rules

I have a desktop app that connects to SQL Azure database. Some users have dynamic IP addresses, and it is not possible to get them to use fixed addresses. I've written an ASP.NET page hosted on the ...
1
vote
0answers
49 views

Syncing a SQL Server table with a CSV file

I have recently started a project with sensors that add data to a single CSV file as data the data. I would like to have this data stored in a SQL Server database in a relatively real-time manner. I ...
1
vote
0answers
66 views

Anyone else had problems uninstalling SQL Server 2016 RC0?

We installed RC0 the day it was released and, for needs of space and project transitioning, needed to reclaim the space. As I couldn't find an uninstall option in the installation UI, I resorted to ...
1
vote
0answers
38 views

Trouble setting up mirroring on SQL Server 2016

I've setup a test SQL Server 2016 server. I've installed 2 instances, restored a backup on the primary. Then restored a backup on the secondary with NO RECOVERY, then restored the transactional log ...
1
vote
0answers
57 views

A significant part of SQL Server process memory has been paged out

Around 7:30pm every evening we receive the following message and the server experiences an outage of 2 minutes. A significant part of sql server process memory has been paged out. This may result ...
1
vote
0answers
28 views

Bypass stored procedure execution CPU consumption

We are using Microsoft SQL Server Agent Jobs to execute stored procedures on the other database systems (like MySQL or Oracle). Usually we run procedures via linked servers (over OLEDB and ODBC ...
1
vote
0answers
21 views

Connection to database causes SSPI context error

I have migrated a SQL server from another server box that was decommissioned. They have the same name and also same IP address. However, when I connect to the server from an application using trusted ...
1
vote
0answers
38 views

Real-time Synchronization

I have created an application in .Net with Microsoft SQL Server for desktop with a local database and an online application with an online database. Data entry will be done on both platforms in ...
1
vote
0answers
17 views

Configuring Custom Hierarchical Reporting Roles

I need to set up some custom database roles within Microsoft SQL Server 2014 for reporting purposes. I need to set up the following roles: Administrative Reporting Role Read-only access to some ...
1
vote
0answers
43 views

Unexpected Memory Pressure - RESOURCE_SEMAPHORE wait

Introduction I am seeing some odd behaviour on one of my servers. It’s non production server, and is only used for my own testing and data collection, so I wanted to use this as a learning ...
1
vote
0answers
13 views

“The schema script could not be propagated to the subscriber” error has SQL code instead of file name

This type of error is unfortunately not uncommon. One report of many is this one on Stack Overflow: ...
1
vote
0answers
41 views

Backup fails unless compression is enabled

I'm trying to back up a DB to a network share. The backup fails every time with the same error: BackupIoRequest::ReportIoError: write failure on backup device '\\share_name\Backups\filename.bak'. ...
1
vote
0answers
32 views

Pivot table with date_shutdown and factory_name and type_shutdown and time_shutdown

I need to make a pivot table that includes a factory name column along with a column for every type of shutdown; in the intersection the period of the shutdown. Factory names and shutdown types are ...
1
vote
0answers
42 views

Multiple conditional counts in the select clause - what's the best way?

(Bit of a long one, sorry) To set the scene: N.b. This is on SQL SERVER 2012 We have a table [CardLog] in an access control system database. Every time an ID card is printed, a row is added to this ...
1
vote
0answers
94 views

SQL Server: Failed to start debugger - Data is Null

I'm a developer working on a web application using an instance of SQL Server 2014. I use Visual Studio 2010 sp1 for development. For a task I'm currently working on, I'd like to use the SQL Server ...
1
vote
0answers
37 views

Why does my differencing virtual disk grow so much after restoring a differential SQL Server backup?

Inspired by RedGate's upcoming SQL Instant Clone, I'm using virtual disks to store my test database and gain fast clones via differencing disks. I created a 30 GB VHD and restored a 18 GB database ...
1
vote
0answers
39 views

Convert specific column into row as output in sql server

There are two tables Eligibility Claim In eligibility table if employee has categoryId like MED_COPAY, MED_COINS, RX_DED, RX_COPAY then Dependent should also eligible for these categories. So ...
1
vote
0answers
29 views

Refreshing SQL Server DB on Amazon RDS

we have a SQL Server DB running on Amazon RDS, i need to refresh it. But in RDS there is no option to restore a backup. What other ways i can use to refresh this DB? It is 60 GB, and has 200 tables. ...