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

learn more… | top users | synonyms (3)

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
26 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
45 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
60 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
63 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
45 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
49 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
370 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
63 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
49 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
78 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
222 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
43 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, ...
2
votes
3answers
94 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
91 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
88 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
96 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
24 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
61 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
32 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
50 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
26 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
31 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
53 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
80 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
1k 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
257 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
26 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
49 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
52 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
467 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
38 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
63 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
38 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 ...
2
votes
1answer
71 views

Troubleshoot corruption in SQL Server Database [closed]

I have been asked by my interviewer "How do you troubleshoot corrupted data in SQL in SQL Server 2012?"
0
votes
0answers
42 views

Index Reorganize Generates a Non-Primary Filegroup is Full Error

First chance at a new job to do some much needed index maintenance on a system. 2-node cluster, W2K12R2, 512GB RAM, 64 logical cores, Fusion-IO, NetApp SQL Server 2012 Ent SP1 3.5TB db 4 ...
3
votes
1answer
57 views

Plan guide validation with fn_validate_plan_guide gives false positives

When validating a plan guide for a piece of SQL in a stored procedure that references a temporary table named "#test" the function fn_validate_plan_guide returns the error: Invalid object name ...
2
votes
1answer
622 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
0
votes
1answer
122 views

Create an alias for a SQL Server named instance pointing to sql default instance

I have an installation of SQL Server 2012 Std Ed on Windows 2012 R2 running in a default instance, and an app that wants to connect to it using a named instance (can't be changed) E.g. ServerName - ...
0
votes
0answers
68 views

Help diagnosing a single-table, single row deadlock

We're currently using an ORM-controlled, table-based, identity generation scheme to generate the IDs for our entities. The table is as follows: create table id_seq ( tbl varchar(255) not null, id ...
1
vote
1answer
168 views

Find max and min date over multiple fields of the same record

I have a table with 4 distinct data-type fields. For each record, I need to find the max and min date over them. That's easy to do for a set of records over a unique field. But how to do it in my ...
0
votes
1answer
35 views

How do I go about creating a script to compare , update and match structure of two databases

I am comparing two databases using Opendiff which is similar to sqlCompare. I have two databases which should match in structure so as I compare I would like to construct a script such that if the ...
-1
votes
1answer
20 views

cannot consistently view or drop a trigger

I have a database trigger called ddl_refresh_views that provides dynamic binding for views (if you alter view V, it refreshes all the views dependent on V, and all the views dependent on those views ...
1
vote
2answers
41 views

I changed the max memory setting but I don't see memory usage rise at OS level

We have increased the RAM capacity on the OS to 40G and I have changed the max memory parameter to 36G in SSMS. When I select "current value", it shows 36G. However, monitoring memory usage at OS ...
1
vote
1answer
110 views

Copy Data between two databases

I have the following situation. An application writes logs into SQL Server 2012 Standard edition database. The incoming data are too big to leave in the operational DB because the application also ...
0
votes
1answer
28 views

SQL server 2012 Enterprise [duplicate]

Will CDC work with SQL Server Always on Availability groups? Do you need to set up CDC on both/multiples nodes if using Availability Clusters?
2
votes
2answers
36 views

Secondary reporting SQL Server

I have a SQL Server 2012 Std cluster that has a lot of writes going on. We'd like to offload some of the reporting to a separate (2012 Std) VM. It can be around 24 hours out of date. I think log ...
5
votes
1answer
340 views

SQL Server passing variable to a string in a stored proc

I'm trying to concatenate a custom string with a variable that is an int. 'Investigation is pending for ['+ @investigationidout +'] '. When I hover mouse pointer over the first + sign it says: ...