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

learn more… | top users | synonyms (2)

0
votes
2answers
56 views

All queries on the server have slowed down, cpu is normal, plenty of free memory but SQL is using very little

The other day I logged onto our server to see SQL was using 100% cpu and the server was slowed to a crawl. I decided to stop SQL and restart it. However, it refused to stop properly and stopped ...
0
votes
2answers
33 views

Insert data into a column where other columns have constraints

I want to insert data into the zipcode column of the employee3 table. SQL says write - INSERT INTO Employee3 (ZipCode) VALUES (28279);, however I keep getting this error message: Msg 515, Level 16, ...
1
vote
1answer
31 views

How do I resume log shipping?

I was log shipping. I disabled the jobs, and restored the database on the secondary machine and used them for a bit. Now I want to undo this. I don't care about history or syncing, I simply want to ...
1
vote
1answer
65 views

Dealing with large transaction logs in a cluster

Disclaimer: I'm a dev, not a DBA. I've gleaned what I can from MSDN, but could do with some expert guidance! I'm working with a SharePoint 2013 installation on a SQL Server 2012 cluster of two DB ...
3
votes
1answer
2k views

How to check connection string in SSMS2012?

I'm connected to database. I use db by Management Studio 2012 Express. Can I check connection string by click something in Management Studio?
0
votes
2answers
37 views

How do I set a database back to 'Restoring…'?

Sorry if this is a noob question. I have transaction log shipping set up for a failover scenario. All the databases are in 'Restoring...' state until I do restore database x with recovery. At this ...
5
votes
1answer
239 views

How to get output from trigger on linked server

Fair warning, I know this isn't the best way to do this, but I'm trying to extend some existing code without needing to do a rewrite. Anyway, I've got two SQL Server 2012 installs, one local in my ...
4
votes
2answers
817 views

SQL Server 2012 always-on backup, full vs copy-only

I need a quick clarification on copy-only backup vs full backup as it pertains to transaction log numbering and restore if required. I have SQL Server 2012 setup with always on for multiple ...
2
votes
1answer
79 views

TSQL- Column DataType Length

Can anyone please explain me the below one. I used the below query in getting the table columns info, but the max length seems to be x*2 of the actual col length. I mean if I have a col with datatype ...
0
votes
0answers
39 views

tsql to find out sql server alias

Using TSQL, is there any way to find out SQL server alias configured at configuration manager? Such as follows? Thanks!
0
votes
1answer
48 views

SQL Server 2012 Express SP1 install still not 11.1

I run the SQL Server 2012 Express SP1 install and it succeeds. After I have rebooted my computer, I do a select @@version But still I only have version 11.0.21600.64. I have tried this on two ...
1
vote
2answers
548 views

Free up disk space on sql server

Assuming I have a sql database server with disk space as follows: D Drive: 10GB (For the MDF file) E Drive: 10GB (For the LDF file) And I have only one database on the server with the following ...
12
votes
1answer
214 views

“Cannot create a row of size 8074 which is greater than the allowable maximum row size of 8060” while altering the table

I am trying to alter a column in a table. The existing table is like this: CREATE TABLE [dbo].[table]( [id1] [int] NOT NULL, [id2] [int] NOT NULL, [id3] [int] NOT NULL, [name] ...
1
vote
1answer
1k views

Installing SQL Server 2012 SP2 on instance with Cumulative Update #10

We have Cumulative Update #10 installed on SQL Server 2012 SP1 that we need because of a specific fix to DQS. Since the recently released SQL Server 2012 SP2 only contains fixes from CU1 through CU ...
1
vote
0answers
55 views

What are the “additional actions” available for “Recovery Pending” databases?

I've used powershell to run a sql script on several databases on a test server. Disk space was low, so the script failed on 34 out of 75 databases. All fair enough. In any case, afterwards 10 of my ...
1
vote
0answers
46 views

Scheduling a task to run after a SQL SERVER 2012 executes a different set of scripts?

Im working on a project for a job I am interning for. I've had a few months of database design. I am still learning all the techniques. I am currently trying to schedule a console app to run every ...
1
vote
0answers
70 views

Database Archival Process [closed]

I am designing a database archiving process - which is a automated process. Do you have any advice for how to accomplish these goals? Below are my thoughts : create another clone database ...
2
votes
1answer
71 views

SQL Server Replication questions

This is kind of the part 2 of Replicating a SQL SERVER database & Optimization that I started earlier this week, but I believe it owes to be a different questions now that I have a clear idea of ...
1
vote
0answers
96 views

Rolling Back Stored Procedures in Entity Framework

I currently working a on project that operates within a transaction in entity framework. Before now all of the changes were made using a DataContext. I need to add a call to a stored procedure using ...
5
votes
2answers
887 views

Mirroring in SQL Server 2012

I have been trying to learn to do this. I've got newly installed Win 2008 R2 machines, in a workgroup, in the same subnet, and of course SQL Server 2012. I allowed login with SQL Server ...
2
votes
1answer
57 views

What does role db_owner allow

I have been trying to troubleshoot a login that is not able to view certain tables in a SQL Server 2012 database. In doing so I find I don't quite understand what membership in the db_owner role ...
0
votes
1answer
26 views

Remove Cluster Nodes after Cluster Object was deleted

While building new 2012 servers to move to we had some change in requirements. We are using Availability Groups on the new servers. Here's where we started. Servers: Serv1a Serv1b Serv2a Serv2b ...
4
votes
1answer
117 views

Which version of Microsoft Tape Format is supported by which MS SQL Server

When you create a backup with Microsoft Sql Server, the resulting file is in Microsoft Tape Format. Different versions of SQL Server apparently use different version of this format. Which version of ...
3
votes
1answer
349 views

Set simple recovery mode and shrink log files for all user created databases

I hope you can point me in the right direction. I'm not a frequent user of T-SQL, but I did some googleing, and found the script below. I corrected the script a bit. I want the script to: To select ...
3
votes
2answers
4k views

Connect to SQL Server 2012 from an Windows XP client

We have an SQL Server 2012 Standard database, to connect to it we use SQL Server 2008 Management Studio (since 2012 SSMS is not supported on Windows XP). The problem is that SQL Server 2008 gives all ...
1
vote
1answer
113 views

Map a Login to a User that was Created Without Mapping to a Login

This question has been asked before, but I didn't see any answer (http://stackoverflow.com/questions/6468813/assign-a-login-to-a-user-created-without-login-sql-server) How does one map a login to a ...
0
votes
1answer
64 views

Changing Databases Dynamically using Variables [closed]

I want change into a database programatically using in code: DECLARE @SQL nvarchar(2000) DECLARE @DBName sysname SET @DBName= 'foo' SET @SQL = 'USE [' + @DBName + ']' select @SQL execute @SQL ...
-2
votes
1answer
44 views

how to select column3 from rec1 value which is matched to column1 val in rec2

i am having following scenario : col1 col2 col3 10 2 13 13 4 14 14 5 15 15 6 16 form the above given table col3 value(13) in row1 is seen in col1 value(13) in ...
2
votes
1answer
49 views

Best Practice in storage allocation for compressed and partitioned tables

I have a fairly large database that basically consists of one table, this table is paritioned by month and all partitions are compressed with page compression. After the initial load of the data there ...
1
vote
2answers
547 views

Improve query performance when selecting almost all rows with many “group by” columns

I have a table with 20 columns and about 600,000 records. The maximum row size is only around 100 bytes. The table is repopulated every few days, but the number of records remain about the same. For ...
5
votes
3answers
2k views

SQL Server Management Studio 2012: How to have folders in the SSMS project?

I'm using SSMS 2012 to talk to the SQL server 2012 and Azure SQL servers we use. I admit I'm not a SQL expert so I've been saving most of my SQL scripts for future reference. I've quickly run into 20 ...
1
vote
2answers
124 views

Backup of database X on SQL Server 2008 on server A - restore to SQL Server 2012 database Y on server B

I want to copy a SQL Server 2008 database to SQL Server 2012 with a different database name. Took a backup of 'production' and copied it to the SQL Server 2012 machine. Created a new SQL Server 2012 ...
0
votes
1answer
22 views

Best scenario for replication type

We are using SQL Server 2012 and we have the Main office server. All modification on the product pricing table is done through the Main office. We have 10 remote sales branches. Those remotes ...
0
votes
1answer
50 views

Inhibit SQL Server trigger execution

A table with various prices per item have a trigger that will update price 3 when price 0 is changed. The ERP that uses this database has a utility that when run updates the database with ...
8
votes
1answer
200 views

Sequence is reusing

I have a sequence that generates tracking numbers for objects in my system. It had been working fine for quite some time. Last week we noticed that it was starting to re-use values. What seems to ...
1
vote
0answers
39 views

Manual Fulltext index population time in SQL Server 2012

I would like to know if there is a way to see how much time did it take SQL Server 2012 to index all the data in a table? In my example I create the table, create the index and set the population to ...
1
vote
1answer
66 views

How can I have a gap in the SQL Server Job Agent history for a job?

I have a job (Update Tickets) scheduled in Job Agent with a single schedule of "Occurs every day every 30 minute(s) between 12:00:00 AM and 11:59:59 PM. Schedule will be used starting on 11/4/2013." ...
1
vote
1answer
534 views

Restore master database from SQL Server 2008 R2 on SQL Server 2012

I have a process that restores all my backups on a centralized server for testing. I have recently upgraded this server to SQL server 2012, and now I am getting an error when restoring master from SQL ...
6
votes
1answer
187 views

How can I tell how many Cores SQL Server is actually using?

I have two servers running SQL Server. Server 1: SQL Server 2008 R2 Express (4 core) Server 2: SQL Server 2012 Developer Edition (8 core) As far as I am aware SQL Server 2008 R2 Express should ...
3
votes
1answer
58 views

Should I change my old datetime columns from SQL Server 2005 to just date datatype for SQL Server 2012

My database was developed in 2005 for SQL Server 2005 version. In that time for columns which store pure date without time we used datetime data type. Our database has survived up today and now we ...
1
vote
0answers
40 views

Issue with MDS data when viewed in Excel addin after connecting to MDS Model

In MDS 2012, while exploring for a entity, I can see the data in Client and Product column are properly assigned as Code and Code {Name} as seen below: but while connecting to the MDS model via ...
1
vote
1answer
147 views

Understanding execution plans using TVPs

I have some slow running queries (8 seconds across 1M records grouped by months) and have been trying to make sense of the execution plans. We use around 10 TVPs to send in a set of filters that the ...
1
vote
1answer
69 views

changing auto shrink setting breaks backup?

I have a database that seems to be functioning fine with no apparent errors except that any full backup taken is broken - attempting a restore fails with an error "RESTORE detected an error on page ...
2
votes
1answer
121 views

Fix Linked Server Without Restarting SQL Server Instance

Problem: Occasionally a nightly job will fail, and when I look into it, it is the result of a query across a linked server failing. But for some reason that query seems to remain 'open' in some way ...
3
votes
2answers
357 views

SQL Server Database Mirroring is going to die. How can I guarantee high availability now?

The Database Mirroring feature of SQL Server is going to die: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan ...
2
votes
0answers
161 views

SQL Server 2012 Local SSD TempDB Slow

I have a production deployment using local SSDs for tempDB. I have 2 SSDs in a RAID1 configuration. I am seeing average reads of 1-2ms but the average writes are showing as 1377ms on all four of my ...
0
votes
1answer
95 views

Script to automate converting a clustered index on primary key (with foreign keys to it) column to non clustered?

What's a good way to easily convert a clustered index on a primary key column to a nonclustered index? I know how to do this manually, but it's time consuming if there are several tables which have ...
2
votes
1answer
135 views

SQL Server large transaction log for simple recovery model? help! [closed]

Hi all i'm building a data warehouse and noticed that my tran log is massive (in simple recovery). MDF file is 2.6 GB. LDF file is 7.8 GB!!! Why is this??? i don't want a stupid tran log that's why ...
0
votes
1answer
67 views

apply cdc to existing data warehouse

I'm building an education data warehouse. I have various dimensions that i would like to track changes to i.e. DimStudent, DimClass, DimCollege, DimExamPaper etc. etc. My solution currently drops ...
13
votes
5answers
6k views

What is a good, repeatable way to calculate MAXDOP on SQL Server?

When setting up a new SQL Server 2012, I use the following code to determine a good starting point for the MAXDOP setting: /* This will recommend a MAXDOP setting appropriate for your machine's ...