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

learn more… | top users | synonyms (3)

2
votes
0answers
9 views

The transaction log for database 'database' is full due to 'LOG_BACKUP'. Nothing works

I have about 30 databases on SQL server 2012. One of the databases is erroring with "The transaction log for database 'database' is full due to 'LOG_BACKUP'." I have spent several hours googling and ...
2
votes
1answer
38 views

Behavior of case sensitivity of RAISERROR when run remotely

I have a remote SQL Server that I can connect to using a local instance of SSMS. When raising errors, we use RAISERROR( 'This works', 16, -1 ) Remotely, this works fine if it's all uppercase, or ...
0
votes
0answers
9 views

domain group is db_owner of database, yet has no right for CREATE TABLE

We've setup a SQL Server (2012 Full Enterprise), and through certain domain user groups, have given certain access to several databases. For instance, group 'ADB' has for several databases following ...
0
votes
0answers
9 views

Odd service broker behavior

I have an established service broker relationship between two databases in our production environment. We do a weekly restore of these databases to another server for the purposes of testing our ...
2
votes
1answer
94 views
+50

How to Replicate data between a hosted database and a local database

I have a Cloud hosted Database, maintained by a different company. Here is my scenario: Cloud Hosted Database SQL Server 2012 - Need to connect through a VPN. We setup a local Server with with ...
0
votes
0answers
14 views

SSIS ODBC: Mapping result set columns to variables returns error “Value does not fall within expected range”

In SSIS 2012, I'm using an "Execute SQL Task" to call a stored procedure that returns a single row with two columns. I'd like to map that result set to two SSIS user variables. Should be easy, ...
0
votes
0answers
23 views

Timeouts on Full-Text Search when using CONTAINS(*, 'value1 OR value2 OR … valueN')

I have an odd problem when using the Full-Text Search in combination with CONTAINS on all columns (without specifying the column where to search). The problem is when I specify more than 5 or 6 values ...
1
vote
1answer
119 views

No rows in sys.dm_exec_procedure_stats for a particluar stored procedure

I am running DMV queries to get stats for my stored procedure, but I am not finding any rows against this SP under sys.dm_exec_procedure_stats. Please suggest what could be various reason for this ...
15
votes
1answer
1k views

Why 0 is equal to empty string?

I need some help in finding why the following T-SQL statement returns 1 (true): SELECT IIF( 0 = '', 1, 0) I guess someone has change an ANSI option like SET ANSI_NULLS or something else that is ...
-2
votes
0answers
26 views

Data retention and purge process [on hold]

how can i verify that purge process is working in database. Pls help any links or any information on it will be appreciated. I have SQL server 2012 database
1
vote
1answer
2k views

Mirror / replicate only 1 table of a database

I need a good way to replicate a single table in SQL Server 2012 between different servers and different databases. I tried replica which works just fine, but there might be a much better / easier way ...
12
votes
2answers
4k views

Limit connection rights on SQL Server

I have an app to deploy in production that uses 'honor system' security. That is, all users connect to the DB using a SQL user/passwd credential and the app manages permissions itself. The latter part ...
2
votes
1answer
37 views

How can I create a role to create,update,delete stored procedures and views

what permissions do I need to give in order to achieve the above task to get users the capacity to create,update,delete stored procedures and views to a database role.
3
votes
4answers
5k views

How to make SSMS upper case keywords

I recently started using Management Studio 2012. When using MySQL Workbench, a handy feature was that I could stay all in lower case and any reserved word (like SELECT, INSERT) would convert to upper ...
1
vote
0answers
18 views

SSIS: Trying to configure branching logic in Foreach loop

Full disclosure: I posted this on SQL Server Central yesterday but got no answers. I hope someone here can assist me. I'm working on importing flat files into a database. I have used a Foreach loop ...
1
vote
1answer
16 views

Can we create Fail over clustering for sql server 2012 standard edition on amazon EC2?

We are planing to move on amazon's EC2 services. So my question is that can we create fail over clustering on amazon EC2 using sql server 2012 standard edition ?
0
votes
0answers
15 views

Why does OpenQuery hang for hours before raising Query timeout expired when query timeout on Linked Server is set much shorter?

In production have two SQL 2012 instances on separate servers, with a Linked Server set up between them. No problems there. In development, I have the databases for both in one 2012 instance, and have ...
-2
votes
0answers
49 views

Want to setup full database in sql server 2012 [on hold]

I need to setup full database let say want to create tables, stored-procedures, cursors, functions etc. I have one xml file and all the related scripts. I need to know is there any way that I can ...
1
vote
3answers
50 views

Get Column Value from Subquery in Stored Procedure

In my stored procedure I got code like @Select = '... (Select ...) AS NAME ... AS AGE ... AS CLASS ' @Where = 'CLASS = ...' I can make validation ...
-5
votes
0answers
34 views

I want to write query as per business requirement [on hold]

Universe Addition for Historic Data: Expired Contact Company Associations with companies as defined in universe, provided the record has either Committee or Compensation info, and belongs to Company ...
8
votes
2answers
255 views

Shrinking a SQL Server Transaction Log

I’m currently having to deal with a SQL Server transaction log that has got out of control. Disclaimer: I’m not a dba and this isn’t my area of expertise so please bear with me. Currently I have a ...
-4
votes
1answer
37 views

SQL db deadlocks [on hold]

could any one please tell me how to monitor SQL db deadlocks How to prevent deadlocks How to cancel deadlocks without restarting the service. really highly appreciate your information
7
votes
3answers
80 views

Find the source of a recurrent mass SQL edit on a server

I'll try to explain my problem as clear as possible. The server of a company I support runs many websites. This server runs Windows Server 2012 with Microsoft SQL Server 2014. Almost all of the ...
2
votes
0answers
30 views

Very high avg_write_stall_ms for tempdb [duplicate]

What could be causing (and how to fix) my tempdb files (8 equal size) to have [avg_write_stall_ms] of 7300ms and the next highest data file is 47ms. System is Hyper-V fail-over cluster, SQL 2012 ...
3
votes
1answer
29 views

Working SQL script fails to create objects when run as SQL Agent job

As a crude 'integration test' style environment, I am updating a copy of production with a delta script based on "development vs prod". The tool used to create said delta script is free, and as such ...
1
vote
1answer
665 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 ...
3
votes
1answer
35 views

SQL 2012 CLR error: “The context transaction which was active before entering …”?

I am experience strange error with SQL 2012 and CLR: The context transaction which was active before entering user defined routine, trigger or aggregate "My routine" has been ended inside of ...
9
votes
3answers
781 views

Find the identity of the client firing a query in SQL Server without using triggers?

I'm currently using Change Data Capture (CDC) to track data changes, and I wish to track the host name and IP address of the client submitting the query that made the changes. If there are 5 different ...
0
votes
2answers
51 views

SQL With Multiple Condition and Column

I have 3 tables: Employee +----+--------------+--------------------+----------------+ | Id | EmployeeName | EmployeePermission | Position | ...
0
votes
0answers
25 views

How to implement SQL Server Service Broker with external activator

I am trying to execute an external app using SQL Server Service Broker and the External Activator provided by Microsoft. I have created the following script: IF EXISTS (SELECT * FROM sys.databases ...
1
vote
2answers
640 views

After Restore Log_reuse_wait_desc of Replication

I'm wondering if anybody has ran into this issue before and has any suggestions on what's causing it/how to fix it. We are restoring a database into lower Dev environments and after the restore the ...
-4
votes
1answer
24 views

Can not connect to HP\SQLEXPRESS [duplicate]

Can not connect to HP\SQLEXPRESS a network related or instance specific error while spablishing a connection to sql server. The server was not found or was not accessible. Verify that instance name ...
3
votes
2answers
329 views

ApplicationIntent=ReadOnly Traffic when no Readable Secondary Available

We have a SQL 2012 AlwaysOn Availibility Group with 2 nodes. We have synchronous commit between the 2 replicas. They are both set to accept ReadOnly connections when acting as secondaries and to ...
1
vote
2answers
248 views

Is it possible to set stand-by database to active, do changes and then continue restore chain?

Basically, I'm using a custom log shipping method on a sql 2012, where the transaction files are manually copied to an offsite location. The files are then restored using something similar: RESTORE ...
0
votes
0answers
32 views

While querying view using linked sever getting error as “Requested conversion is not supported” [on hold]

While querying a view using linked sever getting below error as: "Requested conversion is not supported." OLE DB provider "SQL11" for linked server "DB_SQL" returned message "Requested ...
3
votes
2answers
40 views

Modify linked server definition (Oracle) in SQL Server 2012

I have created a linked Oracle server in SQL Server 2012 using Oracle Provider for OLE DB and TNSNAMES.ORA (the Oracle database is clustered and, as far as I know, no other connection method works ...
2
votes
0answers
22 views

Does Disabling Page Level Locking Have an Adverse Effect on Other DBs

I got the following from a vendor about what their software (“IM”) needs: “IM needs its own SQL Server Instance if the DB is installed on a shared SQL server. This is a mandatory prerequisite because ...
1
vote
1answer
206 views

Availability Group: ReadIntent connection failing

I have two nodes configured in an AG group in a dev domain: node1.DevDomain.com node2.DevDomain.com My own workstation is on our production domain: MyMachine.ProdDomain.com When I test ...
0
votes
0answers
47 views

Slow application performance [on hold]

We are experiencing slow application performance on a couple of apps. We are on SQL Server 2012 Standard Edition 64 GB. This is installed on a Windows 2012 R2 server. The database is without mirroring ...
3
votes
2answers
31 views

User has db_owner through AD group but cannot create table

We've setup a SQL Server 2012 Enterprise, and through certain domain user groups, users are granted access to several databases. For instance, group 'ADB' has for several databases following rights: ...
3
votes
2answers
166 views

Unable to create UNIQUE Filtered index with IGNORE_DUP_KEY = ON

I have a table , in SQL Server 2012 enterprise edition, for which I want to have a unique index with IGNORE_DUP_KEY = ON, however I only want this index (and ignoring the duplicates) to apply only to ...
2
votes
1answer
244 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
3
votes
0answers
37 views

How to deal with Users Needing to Enter Mixed Data Types in MS SQL Server

I have a form in a C# application that I can't change with a data table bound to a query. The user enters a mark for a student's task or 'A' for absent. However, the person who designed this had the ...
3
votes
1answer
49 views

Error 909 restoring a database on Standard Edition

I ran into a problem with SQL Server 2012 Standard Edition (64-bit). I have rebuilt a system with the exact same specifications for software as it had been built previously (Windows 2012, SQL Server ...
0
votes
1answer
993 views

DB2 Linked Server on SQL Server 2012 - Grant Access to Users

I have a linked server on SQL Server 2012 instance pointing to a DB2 database and I have Sys Admin access to that instance. I am unable to test connection to that DB2OLEDB database as I get below ...
4
votes
2answers
2k views

How to find which edition the SQL Server installation media belongs to

Without installing SQL Server media 2008 and 2012, how can we know that the media belongs to a certain edition (like Developer, Standard or Enterprise)?
2
votes
1answer
163 views

sys.dm_db_index_physical_stats is extremly slow

I have a database that is around 4.5TB, since we have parallel inserts (to reduce daily load time) on one table (partitioned by month) the clustered index on this table tends to be heavily fragmented. ...
1
vote
2answers
2k views

Is MSDTC required for SQL Server 2012 Fail Over Cluster?

I am making a 2 node SQL Server 2012 Fail Over Cluster, do I need to install MSDTC also? If yes then can both be installed on single shared disk?
8
votes
2answers
107 views

Unable to create restore plan due to break in LSN chain

My backup plan is: Full backup - once a day Differential backup - every four hours Transaction Log backup - every 30 minutes. All database backup are stored on my computer. I add some wrong ...
4
votes
1answer
56 views

Advice on how to improve the efficiency of a stored procedure using lots of joins

I have a stored procedure that is returning search results for items in a database grouped by customers who own them. The user performing the search is restricted as to what items they can see by ...