This tag is for SQL Server 2012, major build version 11.00.xxxx.

learn more… | top users | synonyms (2)

0
votes
1answer
19 views

Dynamically change a db in transact sql

I am trying to run a script against a database that is dropped from a third party daily so the name of the database changes daily. I can get the name of the new database using the sys.databases ...
0
votes
1answer
33 views

I cannot restore a SQL Server database in a new location

Made backup of the database on server c, SQL Server 2012, moved on to the local computer with SQL Server 2012, restore database does not work. When checking the validity of the file on the server ...
0
votes
0answers
40 views

SQL Server Timesheet Query Performance

I am working on a webapp for timesheet administration. I write a query to group all the time entry of an employee by week. And I also have to use paging. The query is already slow with something like ...
0
votes
0answers
23 views

View Job Properties Fails for Job Owner

Domain user MyDomain\UserA has a login with a server role of public and is a user of the msdb database with membership in the SQLAgentUserRole. The user owns a job, Daily Job. When logged in as the ...
0
votes
0answers
19 views

Best way to run a formula (segment) a large number of users with custom attributes

Here is my question. I have a table that stores a large number of people (80 mil). Each person has a GUID id. Then I have another table (or set of tables) that stores information about people. e.g. ...
0
votes
1answer
27 views

how can I see the arguments passed to a stored proc on Azure?

The query that I'm using: SELECT deqs.execution_count, deqs.last_execution_time, dest.objectid, SUBSTRING(dest.[text], (deqs.statement_start_offset/2)+1, ...
0
votes
2answers
83 views

Storing IP addresses - varchar(45) vs varbinary(16)

I am going to create a table with two fields - ID as BIGINT and IPAddress as either varchar(45) or varbinary(16). The idea is to store all unique IP addresses and use a reference ID instead the actual ...
0
votes
1answer
26 views

XACT_ABORT ON not working as expected on SQL Server 2012?

It looks like XACT_ABORT ON is not working as expected. Here are a table and a procedure that inserts into it: CREATE TABLE rain ( rain_time DATETIME , location VARCHAR(100) ); GO ...
1
vote
0answers
44 views

SQL Server inserted/deleted tables [on hold]

I have the following logic flow Start transaction insert record 1 into table1 insert record 2 into table1 insert record 3 into table1 commit transaction I have a trigger on table1 that is using ...
2
votes
1answer
41 views

Can't connect to new instance of SQL Server

I was trying to upgrade to SQL Server 2014 from SQL Server 2012, but I kept getting a failure on one of the pre-installation checks saying that I needed to have SP1 or later installed for SQL Server ...
0
votes
0answers
31 views

lock request time out period exceeded. When revoking db_owner access

I am trying to revoke db_owner access of an user and I am getting this below error! I have no active transactions User (whom I want to revoke access) is not connected to any db DataBase owner is ...
0
votes
0answers
13 views

Debugging value of varchar set to empty string crashes SSMS?

DECLARE @test varchar(1) = ''; SELECT @test When debugging, hovering over @test displays a little {...} token, and clicking the magnifying glass to open the text visualizer causes an application ...
1
vote
1answer
55 views

Can you optimize a view with many UNION ALLs to external databases?

Given these views in a Sql Server 2012 database: create view vManyUnions as select 1 as p, a from vSubQuery_1 union all select 2 as p, a from vSubQuery_2 union all select 3 as p, ...
-3
votes
2answers
47 views

optimisation for 4million + records [on hold]

I have a table full of addresses in one state. ID, address, state_id,region_id, suburb_friendly_url,street_name_friendly_url I have indexes on all of these fields. A cluster index on address. Doing ...
2
votes
3answers
77 views

Any way to track who has been executing what queries? who has been on my lawn?

I have a database in which most of tables are readable for users in one particular security group. I know most of the users are from my team, but lately I found that it's been used by more and more ...
3
votes
2answers
173 views

sql querying for a pattern

I was hoping someone could steer me in the right direction with this one. I have a table that has student grades. Create Table StudentGrades ( StudentID references Student(StudentID) int not null, ...
2
votes
1answer
33 views

SQL AlwaysOn Availability 2 synchronous nodes on either side of an asynchronous link

Say we have two datacentres, DC-A and DC-B. Say in each DC, there are two SQL servers. DC-A has SQL-A1 and SQL-A2 and DC-B has SQL-B1 and SQL-B2. Is it possible to have SQL with an AlwaysOn ...
0
votes
0answers
26 views

Heap having high fragmentation

Does high fragmentation on Heap impact query performance? Can I rebuild the heap with ALTER TABLE Rebuild to get rid off the fragmentation?
0
votes
1answer
18 views

Change Data Capture in a services environment

Change Data Capture looks to be exactly what I need... Except. All of my database actions come from users that system accounts. We have WCF service that is called by an application. The WCF Service ...
1
vote
0answers
23 views

Include LOCK_ESCALATION in CREATE Script in SQL Server 2012

Consider following T-SQL script: USE [DB1]; GO CREATE TABLE [T1] ( [C1] INT NOT NULL, [C2] TEXT NOT NULL ); GO ALTER TABLE [T1] SET (LOCK_ESCALATION = AUTO); GO When I explicitly set ...
2
votes
1answer
31 views

How to group list of start times by a category?

I have a list people and when they started occupied various rooms in the building. Like so: IF OBJECT_ID('tempdb..#RoomAssignments') IS NOT NULL DROP TABLE #RoomAssignments; CREATE TABLE ...
1
vote
1answer
30 views

SQL Server execution plan using a view, but no view is inside the stored procedure

I am troubleshooting this slow stored procedure and when checking the actual execution plan I noticed a warning of a possible missing index. Taking a closer look, it's against one of the views, not an ...
2
votes
2answers
58 views

Upgrading a database from SQL Server 2005 to 2012 uncovered a syntax error

I recently upgraded from SQL Server 2005 to 2012. During validation however, a bug was discovered. A certain trigger was coded as follows: CREATE TRIGGER [dbo].[trigger] on [dbo].[foo] FOR UPDATE, ...
1
vote
1answer
17 views

Registered Server window does not show Database Engine or Local Server Groups

I am running SQL Server Management Studio 2012 on a Windows 7 machine. After a failed attempt to import my registred servers from SSMS 2008, the icons for Database Engine and Local Server Groups are ...
0
votes
2answers
37 views

How can I decide Rebuilding Index with DETAILED or SAMPLED on SQL Server

I want to rebuild my indexes and statistics on DB. How can I select this option on production maintenance. SQL Server Version : Microsoft SQL Server 2012 - 11.0.2100.60 (X64) (Build 7601: Service ...
0
votes
1answer
34 views

on every row on SELECT Query must lookup to other table

I'm working on Login/Logout System and I'm facing this problem regarding on SELECT Query. I have 2 tables namely dtr_tbl and shift_tbl. In dtr_tbl are the logs of the user(login/logout time details) ...
1
vote
2answers
25 views

SQLOS Resource Monitor and QueryMemoryResourceNotification Win API

Here's some info about SQLOS and the Resource Monitor I found from Jonathan Kehayias: As a general rule, SQL Server will use as much memory as you can give it, and it will not release the memory ...
3
votes
2answers
238 views

RAID10 vs. RAID5 for data files

We are trying to evaluate the potential performance improvements that could be gained by switching an existing applications .mdf files to a RAID10 LUN vs. the existing RAID5 LUN they are living on ...
1
vote
1answer
21 views

Distrubution1 Database Offline - I have no clue what this is

I have a SQL Server 2012 installation with a hosting provider that is an active/passive high-availability setup. (Exact version 11.0.5058) We recently migrated to this server from a 2008 install in a ...
2
votes
1answer
26 views

Implications of setting READ_Write

I am looking to update several users on READ_ONLY databases. As the databases are used 24/7 globally, and maintenance windows have just past, I would like to do this during a low-activity moment (to ...
0
votes
0answers
24 views

Can I change “Category_Id” & “Current_execution_status” value in SQL Server 2012 through stored procedure?

I have created one job in SQL Server 2012 through SQL Server agent, and that job is not running due to some security privileges. When I am seeing through below SQL query to that my created job ...
1
vote
0answers
50 views

sys.dm_os_volume_stats problem

Today I have been having quite an interesting issue, which I can't seem to fix. I am getting drive information for a Failover Cluster Instance SQL Server 2012. These drives are Volume Mount Points. ...
2
votes
1answer
14 views

Domain User lockout after SQL Cluster Failover

We have this one user who uses SSMS to connect to a 3 node 2 instance fail over cluster. He also uses SSIS, Excel, SharePoint, SSAS etc.. to connect to this database instance I'll call TEST. There are ...
2
votes
0answers
41 views

Performance differs on same query against two (almost) identical tables?

I'm running these two queries in SQL Server 2012: SELECT tpua.Field1, CAST(round(twg.Field2 * 2, 0) / 2 As Decimal(8,1)) As Field2, CAST((round((twg.Field3/10.0) * 2, 0) / 2) * 10 As int) As ...
0
votes
1answer
45 views

MS SQL Server 2012 enlarge database space

I tried to enlarge a database size of database instance on my MSSQL server 2012 . I manually added a new MDF file under database instance After restart on shrink database dialog I can see ...
1
vote
0answers
18 views

How to check particular SQL UserID windows permissions in MS SQL SERVER 2012?

I would like to say as per my network system administrative security of windows Server 2012 R2. I am unable to start SQL Server agent. As per in MS SQL Server 2012 , i have "sysadmin" & "public" ...
1
vote
1answer
22 views

What to do when Sql Server Agent refuses to run a Job Step that references a missing database snapshot

I have a SQL Server Agent Job creating a snapshot of my main database every minute: -- delete snapshot if it exists if exists (select * from sys.databases where name = 'mydb_snapshot' ) begin ...
0
votes
0answers
10 views

Control locking behavior for Snapshot Replication

I want to have snapshot replication of several databases into single one for reporting purposes. I choose replication because i need to publish just certain columns. I don't need transnational ...
0
votes
2answers
26 views

High Availability using SQL Server 2012 requires how many licenses [closed]

For on premise solution, is it possible to implement high availability for SQL Server 2012 using a single license, or, one needs to buy extra licenses? Also, for high availability with SQL Server, ...
0
votes
0answers
9 views

Join two tables and count a column using mdx

I am trying to join the two tables as below Table1 --------------------------- Product| StoreType| Store --------------------------- 1 | 10 | X ...
2
votes
0answers
66 views

Index Optimization Error in SQL Server 2012

I have an Index optimization job set on the database SWHSJ having two data files with unrestricted growth in the J drive with 174GB free, as you can see below: ...
0
votes
1answer
14 views

Maintaining permissions on a replicated view after reinitialization

When we were on SQL Server 2005, there was some way that I was able to keep custom permissions on a view at the subscriber. Now that I'm on SQL Server 2012, there doesn't seem to be a way to do ...
2
votes
1answer
57 views

Add linked server from SQL Server 11.0.5058 to SQL Server 10.50.4000 [closed]

I tried to add a linked server running on SQL Server 2008 R2 (10.50.4000) from SQL Server 2012 (11.0.5058). I keep getting this error: The linked server has been created but failed a connection ...
0
votes
0answers
42 views

Purging Data that has Foreign Keys

I have a transaction database that we recently went live with. The number of rows in the tables are starting to climb into the millions. So I am looking at how to purge the older data. I have written ...
-3
votes
0answers
27 views

Preventing historical data changes in MDS

We are prototyping MDS/DQS as a master data solution. We have a business requirement to prevent historical master data from being updated, i.e. in master data sets with effective dates, we are not ...
0
votes
0answers
11 views

How to accomplish SQL Server 2012+2014 high availability [duplicate]

(Copied from here) Maybe I'm searching for the wrong thing, but I can't see how I can do this. I have two servers: Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 ...
0
votes
0answers
32 views

Backup File Size Almost 50% of Database File Size with TDE Enabled

I'm really hoping someone can help shed some light on this for me. I receive a full backup of a very large database once per week from a vendor. It contains transactional data which we then load into ...
0
votes
1answer
27 views

How to accomplish SQL Server 2012+2014 high availability

Maybe I'm searching for the wrong thing, but I can't see how I can do this. I have two servers: Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 installed) Server A provides ...
0
votes
0answers
46 views

SQL Server performance is slow when migrated from SQL Server 2012 to SQL Server 2014

We are trying to migrate from SQL Server 2012 to SQL Server 2014 on Windows 2012 R2 OS. After the upgrade, we are doing performance testing and observed huge difference in running a simple query from ...
1
vote
0answers
41 views

High performance SQL Server - Poweredge R730xd [closed]

Last year I wanted to move our critical SQL Server solution from Virtual to physical. I liked the Poweredge R720 with it's 2 RAID controllers and favoured filling it with 2.5" Samsung EVO SSDs - not ...