SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

learn more… | top users | synonyms (3)

0
votes
2answers
116 views

Stored procedure optimization

In my application I am using the below stored procedure, but it is taking a long time to execute. Both tables contain millions of records. Please guide me to optimize this procedure. I have searched a ...
1
vote
0answers
108 views

Sudden PRIMARY KEY violation on IDENTITY column

I have a log table with an ID identity column. Everything works fine for years; then, yesterday, I see the following error in the logs: The statement has been terminated. Violation of PRIMARY ...
0
votes
2answers
73 views

How to install SQL Server 2012 on Windows 10

Currently this has been a huge pain for me. I have a fresh Windows 10 VM. I Installed SQL Server 2012. I open up the SQL Server Studio 2012, and there is no server name that I can choose from in the ...
4
votes
2answers
93 views

Contained DB Collation error

When changing a database to partially contained I am getting the following error: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "Latin1_General_100_CI_AS_KS_WS_SC" in ...
1
vote
1answer
216 views

Trying to use SMO Transfer Object to transfer a database from one instance to another

The schema tables are owned by dbo and another schema name. The code below is not moving over any tables. Is there something else that I need to add to make it transfer the tables? There are no stored ...
1
vote
0answers
28 views

Restoring SQL Server 2012 Enterprise to Web Edition not possible due to full text partitioning

I have an SQL Server 2012 Enterprise database I’m trying to restore to SQL Server 2012 Web Edition instance. I’ve used sys.dm_db_persisted_sku_features to find features to remove before a ...
2
votes
1answer
75 views

Deterministic function for getting today's date

I am trying to create an indexed view using the following code (so that I can publish it to replication it as a table): CREATE VIEW lc.vw_dates WITH SCHEMABINDING AS SELECT DATEADD(day, ...
2
votes
1answer
107 views

SQL Bulk Insert Impersonation issue

I am running Microsoft SQL Server 2012 SP on a Windows Server 2008 R2 Standard SP1 box. The SQL Server service is running as a simple windows domain user (nothing special, no admin rights, etc.) I am ...
0
votes
2answers
85 views

Force Sql server to use index seek in merge join

I am testing Merge join in sql server. I have an INNER JOIN and force the optimizer to do MERGE JOIN: ID in Personal Table is a Primary key ID in Abteilung Table is a primary key There is no other ...
1
vote
1answer
88 views

Significance of has_unchecked_assembly_data due to a persisted computed column after changing compatibility level?

This database has a persisted computed column, which is computed by calling a .NET function. When changing compatibility from MSSQL 2005 to 2012, I was presented with error 10334, which looks more ...
2
votes
2answers
99 views

Parsing Typed XML with a default namespace and inconsistent root node

I have a structured, typed xml file. <WebService xmlns="http://www.orbis-software.com/WebSvcCon"> <NewLeads> <OutputSchema> <root xmlns="" type="array"> <item ...
0
votes
0answers
44 views

How to see text of the query which triggers the trigger inside trigger?

I have very small database with a bit complex triggers which works very slow. Those triggers are written to extend business logic (becase we can not manage the code of the application we are using). ...
0
votes
4answers
70 views

Expected Performance of MSSQL [closed]

We have a client who has been having performance issues. One of the developers is saying that a select * from a table is taking ~50 seconds to perform the query (no joins just straight select with no ...
0
votes
1answer
36 views

Query to combine each duplicate found entry

Hey all I am wanting to create a query so that I can combine each of the found duplicates into one entry. An example of this is: Name | ID | Tag | Address |carNum ...
1
vote
0answers
22 views

SSIS DTSPackageType behaviour

I created a new SSIS package within Visual Studio 2013 with SSDT BI Tools (12.04.2430.0) installed bu when looking into this package I can see that the DTSPackageType is set to DTSDesigner100. Based ...
0
votes
0answers
24 views

Which Azure service for use as data warehouse/analysis store?

We currently have a database running in SQL Server 2012 Standard. We need to export data periodically (a "data dump") of a particular set of data to "a location to be decided" where the client's ...
2
votes
1answer
59 views

Help with multiple select into

I have a ~300 million row table with a column that has 9 different values. I need to be able to select into 9 different new tables based on this column. At the moment it has to do 9 separate table ...
3
votes
1answer
53 views

What about redundancy if distributor goes down?

I'm setting up load balancing, transactional replication and mirroring. However, what I actually thought might work from the beginning, making the system redudant doesn't actually work because a ...
0
votes
1answer
39 views

Application service down due to SQL Server error

I'm using SQL Server 2012 where in I found an error in my SQL Server error logs which says: Logon,Unknown,The login packet used to open the connection is structurally invalid; the connection has ...
1
vote
1answer
35 views

Setting up SQL Server to handle queries from external domains

I am not a SQL Server admin. I have tried to google this but can't seem to use the right words to get the right info and they all talk about remote connections to a SQL Server in terms of admin and ...
1
vote
3answers
157 views

How to decrease RAM usage of SQL Server 2012 without restarting Service

Is there a way of decreasing RAM usage of SQL Server 2012 without restarting it? Setting up MAX Memory usage is not an option as it's quickly building up to limit I have set and then app based on ...
0
votes
2answers
51 views

SQL Server 2012 Login Failure

As of this morning we have had thousands of failed login attempts to our SQL Server 2012 box. Error : Login failed for user 'Domain\User'. Reason: Infrastructure error occurred. Check for ...
0
votes
1answer
39 views

Choosing Between SQL Server 2008 R2 and SQL Server 2012 - Which to learn about first? [closed]

As the title suggests, I'd like to get advice on which version should I learn about first? Most online courses now emphasize on 2012 and Microsoft no longer gives out exams on SQL Server older than ...
4
votes
1answer
71 views

SQL Server Memory Shrinking

I had a strange issue today on a 3rd party vendor's SQL Server. This is a VM running SQL Server 2012 SP1. The min and max memory settings are set to 9GB. Task manager showed SQL Server was getting the ...
1
vote
0answers
118 views

Querying Oracle via Linked Server crashes SQL Server

A bit of an odd one this. I have a couple of instances of SQL Server 2012, SP1, one being Dev Edition and the other Standard Edition and both are VMs running under VMWare. When executing a Stored ...
0
votes
1answer
38 views

Dropping a column generates an error: SELECT failed because the following SET options have incorrect settings: 'ANSI_NULLS, QUOTED_IDENTIFIER'

When I run the following statement ALTER TABLE MyTable DROP COLUMN MyIdentityColumn I receive the following error message: SELECT failed because the following SET options have incorrect ...
0
votes
1answer
39 views

Database access: what should I do here?

I'll explain my situation here, I hope I'm posting this on the correct site, otherwise I'm sorry and I'll move this to somewhere else. I've built a Java program in order to control sales, inventory, ...
0
votes
2answers
44 views

SQL Server AlwaysOn from multiple origins to a single secondary replica server

I started working in a small company which have three separate databases, for three different systems. They are SQL Server 2008, 2012 and 2014, installed in different servers. We'd like to set up an ...
2
votes
3answers
74 views

String Function to Get Left 1000, But Only To Last Period or Carriage Return

I have blocks of text, anywhere between 500 and 2000 characters long. What I need to be able to do is take a maximum of 1000 characters from the description but only to the last full stop or ...
0
votes
0answers
52 views

How to import data from Sqlite into SQL Server 2012

I need to import data from sqlite into SQL Server so we can include it in our data warehouse. Based on previous system volume. Id expect there to be 50-100,000 rows after a couple of years. For ...
0
votes
1answer
67 views

User databases inaccessible after physical restart

We have an unusual error happening on the SQL Server. After restarting the physical server where the SQL Server instance is installed, the user databases are not accessible. System databases are ...
4
votes
1answer
65 views

Minimum distance of a location; one table of points compared to a set of points SQL 2012

I am trying to find the quickest way to find the minimum distance of one point to a table of points. The only caveat is that the table of the points I'm trying to find the minimum distance of is 150K ...
0
votes
0answers
18 views

SQL alwayon azure VM

Please help me I have to finish the task tomorrow morning The Scenarios as below : ALL VMS in AZure SQLSRV1(192.168.1.X) SQLSRV2(192.168.1.X) both in the same cloude service with ip ...
0
votes
0answers
44 views

How can I have long waits on Tracewrite, when I haven't run Profiler?

I recently setup a SQL Server which is used only ot run a sharepoint Server. I love to query my wait stats, just to see what we are waiting on. Most of the wait stats are fine, and I know where they ...
0
votes
1answer
31 views

SQL query help: Calculating days between observations

I'm extremely new to SQL, in fact, I just really started playing around with it. So I'm not exactly sure how to search for appropriate terms related to the question I have. I'll do my best. ...
2
votes
1answer
43 views

What is the date mentioned in @@version SQL Server

I wanted to know what the date that is result of select @@vesion in SQL server refers to. Microsoft SQL Server 2012 - 11.0.5058.0 (X64) May 14 2014 18:34:29 Copyright (c) Microsoft Corporation ...
0
votes
0answers
21 views

Error scripting data using SQLPSX Powershell?

I'm trying to script the data using some of our Lookup tables. We've used SQLPSX in the past for other scripting just fine but can't get scripting data to work. Other ScriptiongOptions work just fine. ...
0
votes
1answer
22 views

SQL Server - Recovery Pending Error

We are running a series of Delete Queries to free up space on our SQL Server (2012) I was able to recover files after the "Recovery Error", but it is very time consuming. So I keep the size of my ...
0
votes
1answer
40 views

BACKUP Detected Corruption in the database log

I took a backups of a few db's on server A (2008R2), Then restored it to server B (2012). One database had TDE enable, so I disabled it, took a back up then proceeded to server B. The other database, ...
2
votes
3answers
64 views

Discover available HD storage from inside SQL Server

I have a SQL Server 2012 instance hosted in a VPS. I can't login on VPS's Windows directly. I know that there are multiple instances installed on that VPS. I have a query that shows me each DB's file ...
1
vote
3answers
559 views

SQL Server express - Management studio installation hangs at native images installation

I've been trying to install SQL server express edition (2014) with management studio and consistently failing to do so because installation stalls at step 'Install_sql_common_core_Cpu64_Action : ...
3
votes
3answers
254 views

Can I find out which database is queried on the most?

We have a number of database which all have the same schema for each customer. I was wondering if there was a query which could select count(*),db_name from somesysview group by db_name; From a ...
2
votes
1answer
25 views

View created from XML data - Statistics

I am looking at a legacy system that stores XML blobs A view is created over this so the data is more accessible (for reporting) CREATE view [dbo].[Data] as select top 100 percent ...
0
votes
2answers
47 views

From SQL Server 2005 to SQL Server 2012

I need to convert some databases from SQL Server 2005 to 2012; I know that you must convert it into 2008 before, but I can't rely on a SQL Server 2008 Enterprise installation: is there a faster way ...
1
vote
0answers
40 views

AlwaysOn Primary Showing as Question Mark

If I look in the dashboard for my AlwaysOn implementation I can see my groups are synchronised and no data loss. They also failover successfully but when looking in the Group folder list under ...
6
votes
1answer
299 views

Cannot get SQLCMD to work regardless of what I try

Regardless of what I do, I cannot get SQLCMD to work. I am trying to run a script that is 200mb+ in size and cannot be run from the sql server application so I need to do this via SQLCMD, however ...
0
votes
1answer
32 views

Can I pass data between stages in a maintenance task

I have a Maintenance plan that I wish to execute nightly. The purpose is to set an archived bit against records that are more than 60 days old. This bit all works fine, however I'd like to log (and ...
10
votes
4answers
1k views

Determine 3rd Friday of each month

I need to determine the dates which are the "3rd Friday of each month" for a date range of "1.1.1996 - 30.8.2014" in SQL Server. I expect I should use a combination of DENSE_RANK() and PARTITION BY() ...
2
votes
2answers
50 views

CheckDB on Partitioned Table - Insufficient Memory in resource Pool default

We are experiencing an issue on one of our servers where CheckDB is blowing the resource pool 'default' ... let me elaborate.. Windows 2012 R2 Standard - 16GB RAM SQL Server 2012 Enterprise ...
0
votes
1answer
35 views

Default schema is ignored on SELECT

According to my understanding, a default schema should apply when issuing SQL statements on tables using unqualified table names. My problem is that the following statement fails, because the table ...