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

learn more… | top users | synonyms (3)

4
votes
1answer
85 views

Find rows where data resets

So I have a table tbl where I'm trying to pull data that increments at a variable rate. I need to identify when the data resets so I can make a cumulative value. Here's an example table: ID VAL ...
-7
votes
1answer
32 views

Store Procedure which INSERT, UPDATE, DELETE any table(for any table) where table name and its values are passed as parameter [on hold]

Stored procedure which performed operations like inserting data to table,updating data,and deleting data of table where table name is passed by parameter Parameters of stored procedure : table name ...
3
votes
1answer
13 views

How to change location of SQL Server 2012 database which is already configured with a merge replication

I have SQL Server 2012 configured with merge replication. currently the location of the replication database and the .mdf and .ldf files reside in C:\ drive. The C:\ drive is now full due to that ...
0
votes
3answers
62 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 ...
2
votes
1answer
1k views

Connection to local SQL Server 2012 can be established from SSMS 2008 but not from SSMS 2012

I have two local SQL Server instances running on my local machine. The first is SQL Server 2008 R2 Enterprise Edition (named MSSQLSERVER) and the 2nd is SQL Server 2012 Business Intelligence Edition. ...
1
vote
1answer
58 views

What is the best option to easily fix fragmented heap indexes?

I have SQL Server 2008 R2 SP2 and also SQL Server 2012 SP2 on these servers. I have a database in which there is a lot of heap indexes which are more than 90% fragmented. What is the best option ...
3
votes
1answer
35 views

Insert a range of numbers from a call to sp_sequence_get_range

Given the following code: CREATE SEQUENCE dbo.NextTestId AS [bigint] START WITH 10 INCREMENT BY 2 NO CACHE GO DECLARE @variableNumberOfIdsNeeded INT = 7, -- This will change for each call ...
4
votes
1answer
26 views

Can we use FILESTREAM in case of SQL Server cluster

I saw this point on Technet article about RBS. The local FILESTREAM provider is supported only when it is used on local hard disk drives or an attached Internet Small Computer System Interface ...
2
votes
0answers
62 views

No significant performance increase after migrating from SQL Server 2005 32bit 4 Cores 4 GB RAM to SQL Server 2012 64bit 4 Cores 32 GB RAM [on hold]

We run regularly a series of data analysis scripts on one of our databases. The MDF File of the database is several gigabytes big, the scripts perform not only selects, but also inserts, updates and ...
5
votes
3answers
9k views

What permissions are necessary for truncating a table?

I have a sql account with the following permissions on a database: The db_executor role you see this account being a member of was created by this script: CREATE ROLE [db_executor] AUTHORIZATION ...
0
votes
0answers
20 views

Object refernce not set… Maintenance plans SQL server 2012

I need to perform a backup but while executing the existing maintenance plan, I recieve the following error message (also after creating new maintenance plan): Object reference not set to an ...
2
votes
1answer
9k views

Cannot connect remotely to sql server 2012 instance using SSMS

I have installed sql server 2012 Express on a local network machine, then added a new login: "sqlUser" mapped to "database1", and configured the instance to accept the remote access with both Windows ...
2
votes
1answer
12 views

Trouble removing filestream file / filegroup

My database was originally using filestreams in one table. For reasons that I won't go into here, we decided to stop using filestreams. I therefore wrote a migration to copy the filestreamed table ...
1
vote
1answer
327 views

Error while running SSIS Package job in SSMS

Error while running SSIS Package job in SSMS Hi! A SSIS package named "My_Package" has been scheduled as a job in SSMS to be executed daily at 5:00 AM daily. SQL Server Version : Microsoft SQL ...
2
votes
0answers
33 views

Disk setup for Windows 2008 R2 and SQL Server 2012 [on hold]

I am wondering what would be the best disk/RAID setup for a Windows server 2008 R2 OS and SQL Server 2012 database that has heavy read/write. I have the following disks I can use: 4x 15k 146GB 2x ...
1
vote
1answer
301 views

Error message when importing data into SQL (Import & Export Data Wizard)

I am trying to use the Import & Export Data Wizard to import the contents of a CSV file into a table in MSSQL. I have no issues if I import all columns as strings however, I need one column to be ...
2
votes
1answer
135 views

Run SQL Server agent job in a particular resource governor pool

I read Considerations for Writing a Classifier Function on MSDN. The only way I see possible is to create a separate user account for each resource governor pool and to classify sessions based on that ...
0
votes
1answer
121 views

The SQL Server Network Interface library could not deregister the Service Principal Name

After windows patching (windows 2008 R2 , SQL Server 2012 Sp2). I could not start SQL Server Service . I get error 1067 and this from the error log* The SQL Server Network Interface library could not ...
4
votes
4answers
12k views

How to view an encrypted view or stored procedure

I am working on a third party database. When I try to view the definition of a view by right clicking, CREATE TO and then to NEW QUERY EDIT WINDOW, I am getting an error: This property may not ...
2
votes
1answer
36 views

Can I use a script to restore multiple SQL databases from .bak files?

I'm migrating 100 plus SQL databases over to a new server in a new location. I have the maintenance plan in place to take full back ups and then a script to copy over the .bak files to a temp ...
0
votes
1answer
14 views

XQuery on Extended Events joining with dm_exec_query_plan not working [duplicate]

I have this XQuery for my extended event session which works fine but when I try joining the plan_handle to dm_exec_query_plan to get the query plan, it says Msg 257, Level 16, State 3, Line 1 ...
1
vote
1answer
43 views

Dynamic Partition Elimination when using “OR ” or “IN”

Say I have a query like this: SET @ContainerId = 5 SELECT * FROM Container.Container_Partitioned WHERE containerId = @ContainerId When I run this, I get a query plan with Actual Partition ...
6
votes
2answers
115 views

SQL Server 2012 Standard Edition Disaster Recovery Options?

Could you please suggest me the best method for My DR plan. Currently we have set of databases (6) used for our application and we in the process of building DR and HA plan. As we are into small ...
23
votes
6answers
12k 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 ...
0
votes
0answers
845 views

Database Properties Error - sys.spt_values missing but dbo.spt_values works?

We have SQL2012 SP1 installed on several servers and have run into an issue on one instance trying to view the database properties in SSMS. (This happens with both SSMS 11.0.5058.0 and 11.0.3128.0.) I ...
0
votes
1answer
15 views

Replicate a database to one secondary replica, but not the other secondary replica using Availability Group

I have a 3 nodes cluster in an availability group. There are two databases on the primary node. One database I want to replicate to the 2 secondary nodes. Another database I just want to replicate ...
2
votes
2answers
348 views

Targeting MSX with job on Multi-Server Administration

I am using Multi-Server Administration to execute jobs on multiple targets. This works well, but I am not able to enlist the master as a target. I receive the following error when attempting to enlist ...
0
votes
1answer
147 views

SSRS 2012 Report variables scope

I have a report that uses data from several datasets. I chose to do it this way because the alternative would be to join about 12 tables. From what I can gather, I have to use the dataset name to ...
2
votes
1answer
61 views

DR option for SharePoint databases? ideas and experiences

First let me clarify that I am not looking for thoughts in terms what is the best or the bad options for a DR for SQL Server. I am just looking for for inputs from experienced people. We are running ...
1
vote
2answers
27 views

Role to view SQL server job log

We have a monitoring tool that can check if Microsoft SQL Server jobs have run successfully. What I want to do is create a user that has as little permission as possible but it must be able to watch ...
0
votes
1answer
854 views

How to access SQL Server 2012 on EC2 server from my ASP.NET website published on the same EC2 server?

My site is not able to establish a connection to the SQL Server 2012 from EC2. My connection string is as follows: Data Source=AMAZONA-2SSRDM3;Initial Catalog=MyDatabase;Integrated Security=SSPI; ...
0
votes
2answers
38 views

Retrieve Data from a Specific Database [closed]

Goal: I want to retrieve the value of [data].[Mobiles] when you use a query document that is for the database [test] (use [test]) Problem: Based on picture two, I cannot retrieve the value ...
0
votes
2answers
24 views

Retrieve data from SP inside of From

Goal: Retreive a list of data from a stored procedure that is acting as a database name. When you have retrieved the list from stored procedure, I want to make another new data manipulation. Problem: ...
0
votes
2answers
371 views

SQL Server 2005 to 2012 Replication, cannot access replicated data

I have created publication (snapshot, small table with 10 rows) on MS SQL Server 2005. Then, I created push subscription on MS SQL Server 2012. When I try to select data form table, process takes ...
0
votes
1answer
274 views

SSIS 2012 metadata not refreshing on re-deploy

I have three systems: DEV, UAT, PROD, all running SQL 2012 Enterprise. I have existing packages that hit objects on these systems. Every time I have to make a change that affects metadata, it's not ...
2
votes
3answers
358 views

Listener pointing to incorrect AlwaysOn Availability Group

All, Thanks in advance I have two instances of SQL Server 2012 SP1 on a three node WSFC with a HAdr group on each instance with a corresponding listener. Instance 1's listener points to Instance 1, ...
1
vote
2answers
263 views

Error when restoring SQL Server 2008 R2 backup on 2012

I am trying to restore a .bak file (backup taken on SQL Server 2008 R2, compatibility level 100). I am restoring the backup on SQL Server 2012 edition. I get the below error. Unfortunately the ...
5
votes
2answers
57 views

Predicate not resulting in expected scan

So I have this query that I'm trying to tune and am running into an issue that I'm having trouble understanding. First of this is the query I'm using. SELECT si.LoanNbr AS [LoanNumber], ...
2
votes
1answer
56 views

How to Retrieve value from a User-Defined Table Type (UDTT)

Goal: I want to reach and display the value of @data inside of [wwtest]. Problem: The UDTT is from the database [test] and I receive an error message: The type name 'test.dbo.tvf_id' contains ...
1
vote
0answers
12 views

Compare Traces with RML Utilities

I am new to RML and am trying to use it to capture a trace, replay it on another server and then compare the two. I have managed to capture a trace using the server side script that comes with it and ...
1
vote
0answers
23 views

Does SQL Server 2012 Standard Edition have an option for select a window over time range?

As an example, in StackOverflow they answer the question Finding a count of rows in an arbitrary date range using Oracle. One of the queries is very similar to what I need, but in reverse, I need ...
-3
votes
2answers
30 views

SQL DBA Monitoring and basic check [closed]

I need to improve SQL monitoring for backups, blocking job failure, high availability failure, log size, DB status, server status...etc...(basic check) Which way is reliable? as our company does not ...
6
votes
2answers
121 views

SharePoint 2013 Database encryption

I'm using SharePoint 2013 with SQL Server 2012 as persistence layer. I need to encrypt the data stored in the database. I stumbled upon the SQL Server feature Transparent Data Encryption (TDE). What ...
3
votes
1answer
28 views

A Customized Table with Chronological order

Goal: My request is the retrieve the return result from sp_Test as 8, 2, 4, 1 ,3 (take a look at picture 1) based on the chronological list from User-Defined Table Type dbo.tvf_id. Problem: When I ...
6
votes
2answers
182 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 ...
2
votes
0answers
35 views

Is there a TSQL command or another way to rename AOAG (Always On Availability Group)?

We have an AOAG named with "space" and I need to rename it to not have "spaces". It was created before my time. The 3rd party vendor tool does not work with AOAG that has spaces. There are about 40 ...
5
votes
1answer
4k views

Error 18456 error severity 14 state 5 SQL Server 2012 SCCM2012 SP1

We had a primary site for SCCM 2012 SP1 running fine. I then installed CAS for SCCM on another server. The prerequisites required me to change the collation on the existing server. I did this and ran ...
2
votes
1answer
39 views

Partitioned Database restore is very slow on SQL Server 2012 with SP2

Team, We have a Partitioned database which is very small in size(112MB backup size). This is partitioned with 15000 files for one table and 7500 files for other table. Currently we are running into ...
3
votes
1answer
202 views

SQL Server DOUBLE keyword

There is a reserved keyword DOUBLE in SQL Server, but I know that it's not a data type (other languages' double is float or real in SQL Server); does anyone know why this is a keyword? I've tried to ...
4
votes
2answers
3k views

“No row was updated error” in SQL 2012 - worked fine in SQL 2005 and 2008

I have a database in SQL Server 2005. We are currently looking at upgrading to SQL Server 2012. I installed SQL Server 2012 in a test environment (Windows Server 2012 virtual machine). Backed up ...