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

learn more… | top users | synonyms (3)

1
vote
0answers
54 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
1answer
37 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
27 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 ...
3
votes
1answer
69 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 ...
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 ...
0
votes
0answers
49 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 ...
1
vote
1answer
55 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 ...
0
votes
2answers
74 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
51 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 ...
3
votes
2answers
7k views

Restore msdb from SQL Server 2008 R2 to SQL Server 2012 instance

I'm moving from a SQL Server 2008 R2 instance to a SQL Server 2012 instance on a separate box. I want to restore msdb to get all my agent jobs and the like and I'm getting the following error: ...
1
vote
0answers
254 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 ...
3
votes
2answers
26k views

Access denied when trying to run an agent job

Can someone please point me in the right direction. I keep getting the below error message when I try to run a job that executes a package I created and saved on the SQL Server. 12/03/2012 ...
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
0answers
105 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 ...
4
votes
1answer
118 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
32 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
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. ...
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 ...
2
votes
3answers
85 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 ...
0
votes
0answers
72 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
56 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
1answer
51 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 ...
1
vote
2answers
201 views

Is Database Mail worth the risk / a standard practice

I enabled Database Mail XPs and was testing it on my dev machine. I was just wondering if the DB Mail is a bad security choice, and if it more secure (or standard practice) to send this kind of ...
5
votes
5answers
23k views

Cannot start SqlLocalDB instance with my Windows account

I'm the administrator and simply run the command: sqllocaldb start v11.0 Result: Start of LocalDB instance "v11.0" failed because of the following error: Error occurred during LocalDB instance ...
7
votes
1answer
1k views

What is the migration/deployment path from a LocalDB solution to Enterprise instance?

Given the extant definition for SQL Server 2012's LocalDB as SqlLocalDB is a local, low-overhead database engine of SQL Server 2012 (and future versions) that allows developers to focus on ...
-1
votes
1answer
574 views

Change server name for SQLLocalDB instance

Is there any way to change the instance name of LocalDB of SQL Server 2012 from (LocalDB)\xxxx to just xxxx? I need it for an application that needs SQL Server DB instance name to be MSSQLDEFAULT.
0
votes
1answer
34 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 ...
10
votes
2answers
6k views

SQL Server Management studio slow connection or timeout when using Windows Authentication

I'm getting extremely long delays (10~30 seconds) in SQL Server Management Studio 2014 when attempting to connect to a SQL Server 2012 instance over TCP using Windows Authentication. This happens when ...
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
2answers
71 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 ...
2
votes
1answer
29 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 ...
5
votes
2answers
110 views

Help optimising delete statement

Using SQL Server 2012 Standard - I'm running a delete on a table based on the contents of another table. It's taking rather a long time (5 hours) and doesn't seem to be optimal to me, would appreciate ...
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() ...
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
62 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 ...
0
votes
1answer
45 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 ...
0
votes
0answers
72 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 ...
6
votes
1answer
596 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
42 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 ...
4
votes
1answer
508 views

How to troubleshoot how resource governed query is being throttled in SQL 2012?

I have a parallelized query on SQL 2012 SP1 (ent) that is running in a user defined resource governor pool much much slower (2 seconds versus 125 to 140 seconds under user defined pool = ~75 times ...
0
votes
1answer
153 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 - ...
1
vote
1answer
255 views

set right permission to get connection ip for a user mapped to login

I have a problem with properly settings the rights permissions for my user to get access to connections ips. I know that, to get the conn ip I must set the VIEW SERVER STATE to the login that I use ...
0
votes
2answers
2k views

Is it possible to use ExpressMaint with SQL Server 2012 (Express)?

When I try running ExpressMaint on a server with SQL Server 2012 installed, it fails with an error saying it cannot find the Microsoft.SqlServer.Smo libraries (SQL Management Objects). From what I've ...
2
votes
1answer
73 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
46 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 ...
6
votes
1answer
3k views

High CPU in SQL Server supporting SharePoint databases while running FAST search crawl

I have a a SQL Server 2012 (SP1) #cu5 (X64) instance used as SharePoint 2010 back end and for the most part use only 10 - 30% CPU but there is a high CPU usage when running FAST search crawl(both ...
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
vote
1answer
184 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 ...
1
vote
2answers
80 views

Partial backup restore of read-only file group on new database

Let's say, I have a database myModel2015 that contains two file groups - Primary A and Secondary Read-Only B. Then, I am creating a partial backup of the secondary file group. Now, let's create a new ...
2
votes
1answer
504 views

Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)

I try to deploy new version of existing SSIS project into Intergration Service Catalog and getting error: "Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)" ...