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

learn more… | top users | synonyms (2)

-1
votes
1answer
16 views

Trying to add permission to a Role is failing

I am trying to add a role into Create and Restore permissions and After researching online, it sounds like it should be as easy as using the GRANT statement. So far so good. However, my simple grant ...
0
votes
0answers
54 views

Do SQL Server 2012 stored procedures handle optional parameters better? [on hold]

Does anyone know definitively whether SQL Server 2012 handles so-called "optional parameters" in stored procedures better than previous versions of SQL Server? For instance, a query like (but a little ...
0
votes
0answers
13 views

Replication / HA Planning for Disaster Planning

I am designing a system with MS SQL Server 2012-2014 / MS Server 2012-2014 and would like to know some methods that others have used. I currently have a clustered 2003 Environment 2 boxes at one ...
2
votes
0answers
18 views

MS SQL Server IO read increase appear randomly

The number of read (IOPS) in my MS SQL Server database increased randomly even during the night (low activities) from 0.3 MB/SEC (normal) to 25-30 MB/SEC. After like 30 minutes, it's capped to 6 ...
0
votes
1answer
30 views

What is the risk of doing a rebuild to my indexes in sql server 2012?

What is the risk of doing a rebuild to my indexes in SQL Server 2012? I have to do a REBUILD, but I don't know what are the risks . The server is running and a lot of information is going in and out. ...
3
votes
1answer
20 views

Microsoft SQL Server 2012 Mirrors Go Into Disconnected

I have some Microsoft SQL server 2012 mirrors, without a witness in asynchronous mode, that are sporadically going into disconnected. I am running SQL Server 2012 11.0.5058. Looking at the logs on ...
0
votes
2answers
38 views

How many records should be deleted when batch delete is used?

I am going to migrate a large amount of data from one table to other table. The target data source table has foreign key constrains, so I am not able to use DELETE with OUTPUT clause, but need to have ...
0
votes
1answer
36 views

Indexes in a big table. (About 400 mil of rows)

I have a little deal. I have this table in a SQL Server 2012 Standard edition database. The table contains about 400 mil of rows. CREATE TABLE [dbo].[prodeje] ( [id] [int] IDENTITY(1,1) NOT ...
0
votes
0answers
18 views

SQL Server service crashes when i run a linked server query

I'm using SQL Server 2012 on a Windows 7 Professional, 32 bit system. With the SQL Server service running, I run a linked server query and the service crashes. The OS is already updated and I change ...
0
votes
2answers
43 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 ...
0
votes
1answer
15 views

Setting Key Constraints using a Diagram

I been using SSMS for diagramming my databases and I got used to create the key constraints with this tool. Now I started thinking, while going through related chapter of a book, "...maybe this is not ...
0
votes
1answer
36 views

Restoring SQL Server 2012 DB - OPEN SYMMETRIC KEY SKey DECRYPTION BY CERTIFICATE NAME Not working

Database Admins, can you please help me out and let me know why my script is not allowing me to DECRYPTBYKEY once I restore my DB from a PRODUCTION BACKUP.... -- SET Staging to Single User Mode to be ...
1
vote
1answer
15 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 ...
0
votes
1answer
48 views

SQL Server: query for getting TOP X groups of records which have highest subsequent values

I'm querying each SQL Server DB CPU usage (based on query from here -- Get CPU utilization by database (Query 29) (CPU Usage by Database)) every 60 seconds and storing this information in dedicated ...
0
votes
1answer
22 views

How to optimize STDistance execution?

I am creating temporary table during stored procedure execution with the following structure: [ID] BIGINT [Point] GEOGRAPHY the ID is not unique - there are about 200 records for each ID. ...
0
votes
1answer
44 views

DB Permission: User can drop only their created db's?

I want to set permission against a user, which can create database and drop on their created databases neither any database. Any idea/suggestion ?
1
vote
1answer
54 views

SQL Server Mirroring can't connect to mirror database

I am at my wits end with this. I am trying to set up mirroring between a development server and my local machine. The error that keeps coming up is: Msg 1418, Level 16, State 1, Line 1 The ...
-1
votes
1answer
40 views

Restoring a backup of a database from SQL Server 2014 into SQL Server 2012 [duplicate]

Is it possible to load a backup of SQL server 2014db into SQL server 2012? Trying to import/restore is throwing backward compatibility issues. Thanks
0
votes
0answers
23 views

Hide Inconsequential Result Sets From Stored Proc

How does one mask resultsets in multi-layered stored proc calls? Due to stored proc reuse, I have an issue where a top level stored procedure calls multiple stored procedures (directly) and in-tern ...
0
votes
1answer
21 views

SSIS Package not retaining parameters in SQL Server agent job

I have an SSIS package stored in the Integration Services catalogs on a SQL server instance. This package is used as a step in a SQL Server agent job. The package has 4 required parameters. Using ...
1
vote
2answers
28 views

How to identify and remove the SQL table row which contains UTF 8 BOM characters

I recently identified that some of the rows in our table contains UTF 8 BOM (Byte Order Marking) characters ().. Is there a way to identify those rows and removing the BOM characters from those ...
0
votes
1answer
14 views

Could not find prepared statement with handle -1 SQL Server Profiler

So I have this issue where I'm running Sql Server Profiler and I'm getting hundreds(at least) of Could not find prepared statement with handle -1.(error 8179) per second. I can't seem to really ...
0
votes
0answers
16 views

Could not find prepared statement with handle -1 SQL Server Profiler

So I have this issue where I'm running Sql Server Profiler and I'm getting hundreds(at least) of Could not find prepared statement with handle -1.(error 8179) per second. I can't seem to really ...
0
votes
2answers
33 views

How do I extract a repeating string pattern from multiple rows?

I have the following data: | ID | BadCol | +------+-----------------------------------------------+ | 1 | All of R489804 R489805 R489806 R489807 ...
0
votes
0answers
3 views

SSMA not moving partition info from MySQL to MSSQL

I am trying to convert my existing database from MySQL5.x to MSSQL 2014. While all the table schemas gets ported from MySQL into MSSQL, table partition info are not being carried over. ...
0
votes
0answers
44 views

SQL Server 2012 Express installation failed

I'm trying to install SQL Server 2012 Express on a computer with Windows Server 2012 Foundation, I must recall that this is an Active Directory domain controller but I cannot install the server on ...
0
votes
2answers
24 views

Does a mirroring configuration requires the database do stop receiving requests?

I want to configure a SQL Server 2012 Mirroring. I know that I have to create a full backup of the Principal server and restore it at the Mirror server. After that, I will backup the transaction log ...
0
votes
1answer
21 views

How to safely resume a SQL Server Mirroring scheme that had a expired certificate?

We have a production database with a SQL Server 2012 Mirroring scheme with three machines: Principal, Mirror, Witness. The mirroring was configured with a certificate that had only one year of expiry ...
1
vote
0answers
20 views

Can I Parse and/or include “And” in my SQL Statement for a full text index?

So I have a query that looks at a full text index like this: SELECT * FROM Table1 q INNER JOIN CONTAINSTABLE(Table1,TableField, @Keywords) search ON q.Key = search.[KEY] Now @Keywords ...
0
votes
0answers
24 views

Scale-Out Query Server: SQL Server 2012/2014 Enterprise vs BI Edition

Was reviewing the Features Supported by the Editions of SQL Server (2012, 2014) and noticed what appears to be a mistake, but I'm just not certain and looking for confirmation. For 2012/2014, there ...
0
votes
1answer
35 views

Transaction over linked server causing time out

When I execute this query on [RemoteServer] linked server, it works just fine: INSERT INTO [RemoteServer].[DbName].[SchemaName].[TableName] VALUES (1, 'bar'); but when puting it inside a ...
0
votes
1answer
22 views

backup a specific set of tables to be moved to a remote system [duplicate]

I need to generate either backups or data dumps for about 30 tables. I want to generate a file of some sort that contains the data for these tables and transfer them to a different system. Each ...
7
votes
1answer
148 views

How does SQL Server's optimizer estimate the number of rows in a joined table?

I am running this query in the AdventureWorks2012 database: SELECT s.SalesOrderID, d.CarrierTrackingNumber, d.ProductID, d.OrderQty FROM Sales.SalesOrderHeader s JOIN ...
0
votes
1answer
17 views

How do I get the corresponding row for a RowsetID?

We're faced with the following error when a query runs against a partitioned table with Read-Only file groups: The index "ix_my_index" for table "dbo.my_table" (RowsetId 72057600379912192) resides ...
0
votes
1answer
40 views

Clustered index on a column with low selectivity

I have a table with a lot of columns. Two lookup functions are performed: 1) lookup by using column name (this happens rarely, maybe twice a season), and 2) lookup by column date. The column name has ...
0
votes
0answers
12 views

Filestream on a SQL Cluster during failover sits at 'Pending Recovery'

We have an application using FILESTREAM storage which is also hosted on a SQL cluster. Unfortunately, when we fail the SQL cluster over between say, node 1 and node 2, it works on one node, but when ...
0
votes
1answer
29 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
0answers
59 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
48 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
29 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
34 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
114 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
33 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
50 views

SQL Server inserted/deleted tables [closed]

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
43 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
36 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
62 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, ...
2
votes
3answers
84 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 ...