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

learn more… | top users | synonyms (3)

3
votes
1answer
57 views

Plan guide validation with fn_validate_plan_guide gives false positives

When validating a plan guide for a piece of SQL in a stored procedure that references a temporary table named "#test" the function fn_validate_plan_guide returns the error: Invalid object name ...
0
votes
1answer
225 views

Reporting Services service restart fixes slow reports

SQL 2012, the reports are displayed on a WEB page or rendered to PDF I have an ongoing problem with reports suddenly slowing down. The only way to "fix" this problem is to restart the service. This ...
0
votes
0answers
10 views

Send SQL Server Snapshot to External FTP Server

I am trying to set up Snapshot-Replication for SQL Server 2014. I need Server 1, the publisher and distributor, to create a Snapshot and FTP to an external FTP server i.e. FTP server is not hosted on ...
1
vote
1answer
42 views

Create Linked Server using Active Directory account

I was able to grant access in MSSQL to an Active Directory group and add a service account to that group. It's working fine, I'm able to use trusted connection to login on that MSSQL using both my ...
1
vote
1answer
59 views

Deny users permission to create tables in master

I have noticed that I can create tables, schemas, stored procedures etc. the master database. I don't know what is granting this permission. It's annoying, because when we open a *.sql file in SSMS, ...
3
votes
2answers
83 views

Grant Admin to an Active Directory account in SQL Server

I have a SQL Server 2012 instance, and an Active Directory group, which I can add Active Directory users to. I have my personal AD account (MyAccount) and a service account (ServiceAccount) in that ...
5
votes
0answers
99 views

SQL Server Agent initiating self-termination

For the past month, one of my servers is facing issues with SQL Server Agent. It stops automatically with below error, which happens randomly: Sql Agent Output file [097] Memory leak detected ...
0
votes
1answer
760 views

Error message - view server state permission was denied - when connecing to SQL Server 2014 using SQL Server 2012 Management Studio

When right-clicking on a table and selecting "select top 1000 rows", I get this error: Is there any workaround, other than the obvious upgrade to SQL Server 2014?
0
votes
1answer
28 views

is there a max number of rows in a SQL Server 2008/2012 and MySQL table? [closed]

Im evaluating a RDBMS for a bank app solution and i need to be sure about these performance parameter. There is a lot of info on internet that is confusing me :O. Max number of concurrent ...
1
vote
1answer
110 views

Copy Data between two databases

I have the following situation. An application writes logs into SQL Server 2012 Standard edition database. The incoming data are too big to leave in the operational DB because the application also ...
1
vote
1answer
113 views

SQL Server full text search query takes way too long to execute

I've got query snippet as follows: SELECT * FROM CONTAINSTABLE(dbo.Analysis, *, 'FORMSOF(FREETEXT, "historic year-on-year exchange rates forecast year-on-year exchange rates")'); I'm running it on ...
3
votes
1answer
2k views

Inline edit SQL Server database rows from Visual Studio

I'm pretty sure Microsoft have pulled one of the most useful features for performing quick edits on a SQL Server Database within the Visual Studio IDE. It seems to have only affected SQL 2012 ...
3
votes
2answers
5k 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 ...
3
votes
2answers
532 views

Licensing SQL Server 2012 Standard Edition for development and test severs [closed]

Is there an economic way to license SQL Server standard edition on a test server? Given the following environment: live: SQL Server 2012 Standard Edition test: SQL Server 2012 Developer edition ...
2
votes
1answer
1k views

Running parallel delete statements

Problem: I have a massive table - occupies a whopping 9.5 TBs. I need to delete around 5 mil rows from it. The best method I have come up with deletes 1 million records in 2 hours! Since I can not run ...
2
votes
3answers
94 views

String Function to Get Left 1000, But Only To Last Period or Carriage Return

I have blocks of text, anywhere between 500 and 2000 characters long. What I need to be able to do is take a maximum of 1000 characters from the description but only to the last full stop or ...
0
votes
1answer
51 views

Setting up log shipping with an availability group

In my production environment I have a SQL Server 2012 AlwaysOn AG. The Server1 there is database "MessagesDB" and in an AG to secondary Server2 (in synchronous mode). I want to setup log shipping ...
0
votes
1answer
138 views

How to specify localhost for SSIS package source server?

I have a job running on SQL Server 2012, where one of the steps is of type "SQL Server Integration Services Package". For the "Package source" I choose SSIS Catalog. For the "Server", if I type in the ...
3
votes
1answer
70 views

Don't see it : Integration Services Catalog, and open the [All Executions] report

I have SQL Server 2012 Enterprise Edition (64-bit) on Windows NT 6.2. I am not seeing the option to the "[All Executions] report" in the Integration Services Catalog . How can I solve it? Update: I ...
1
vote
0answers
16 views

Server error in reports application

I have a server with SQL Server 2005 installed with the latest service packs. SQL Server 2012 express was been installed on same machine and seems to have broken the Reporting services service. When I ...
0
votes
1answer
150 views

Replication Configuration

I had a SQL Server 2008 Express edition as a Default instance and I am having SQL Server 2012 Evolution and SQL Server 2014 Evolution are my named instances. When I was trying to configure ...
3
votes
1answer
4k views

AlwaysOn Availability Groups go to Resolving status

We have a two-node cluster set up running SQL Server 2012 on Windows Server 2012 R2. The base cluster consists of only those two nodes. The quorum is set up as node + disk majority, with a shared ...
1
vote
1answer
116 views

Indexed view doesn't exist on the subscriber

I am configuring transactional replication in SQL Server. The subscription is configured as push from 2008R2 publisher (distributor is the same server) to 2012 subscriber. The object I want to ...
2
votes
3answers
38 views

Cannot create SSRS subscription for a report using SSAS as datasource

My questions is : how should I config SSRS subscription a report, which consumes SSAS datasource. I already googled and lookup stackoverflow a lot and still couldn't make it work. Problems: I ...
1
vote
1answer
245 views

fn_dblog not showing up deleted table data

I unintentionally deleted 4 rows from a table. I tried to fetch back the deleted data using a stored procedure (got from internet). However, I was able to see my data in the result of stored ...
3
votes
2answers
94 views

Transaction in a stored procedure

I need to perform an UPDATE and an INSERT in a single transaction. That code works fine on its own, but I'd like to be able to call it easily and pass in the required parameters. When I try to nest ...
0
votes
0answers
57 views

SSIS package fails, Odata connector to SharePoint Online

Using package developed in SSDT2012, deploying to SQL2012. I've worked through many errors/issues to get to this error: Package:Error: Failed to initialize SharePoint Client Runtime. Could ...
0
votes
3answers
53 views

Find how many SQL Server instances are installed [closed]

On a SQL Server 2012 instance, how can I get the names of SQL Server instances using a SQL query? I want to show instance names currently installed in SQL Server.
2
votes
1answer
36 views

querying sys.database_principals accross a linked server

I'm attempting to get a listing of the users and roles they are associated with on a remote server to be input into a database on the local server. But when I use the linked server ...
1
vote
1answer
64 views

Combining 2 SQL queries

I have these 2 queries below that I use to calculate net profits from Jan to Dec. Query 1 /* Profit for the Period 13 */ SELECT * FROM ( SELECT MONTH(T0.RefDate) AS Month, '311999' AS 'SAP Code', ...
0
votes
1answer
22 views

Find all stats that were sampled

I am using Ola's scripts for stats updates and for one particular index I want to do full scans when updating stats (to solve for the Ascending Key problem in conjunction with trace flag 2389). We ...
0
votes
0answers
32 views

Cluster network name resource 'XYZ' cannot be brought online

I have given wrong name for listener while configuring the always on in SQL Server management studio. One option I can see is deleting and re-creating the listener, But is it right way of doing ...
0
votes
1answer
32 views

Memory usage increases whenever I run stored procedures [duplicate]

I want to know why SQL Server memory use increases whenever I run stored procedures. After I stop and restart SQL Server, the memory used is just 1 GB. Each time I run stored procedures, the memory ...
3
votes
1answer
163 views

SQLCMD stuck on “set textsize 4096”

I am using SQL Data Compare to generate a script that updates data in a QA database (SQL Server 2012). The script is around 500mb and I added a GO every 100 lines. When I start the script with: ...
2
votes
1answer
79 views

what are the costs of enabling extended events?

I have been dealing with deadlocks, specifically getting their information, as you can see on this post here. On this same post Shanky recommended "You must now rely on extended events trace to ...
6
votes
2answers
394 views

SQL Server 2012 catalog.executions to sysjobhistory - any way to join them?

I have exhausted my resources and can't find a foolproof way to join the ssisdb.catalog tables to the jobs that run them. Trying to write some custom sprocs to monitor my execution times and rows ...
2
votes
1answer
166 views

Last user update for a table

Since my server was started one month back, I am getting 2015-07-31 as the value of last_user_update for a table. Does that mean my table’s data hasn't been modified (inserted, updated, deleted) ...
4
votes
2answers
221 views

Find out what columns are in a trace file

while tackling and unexpected CPU spike that was happening every 10 min one of my colleagues prepared a server side trace as follows: -- Create a Queue declare @rc int declare @TraceID int declare ...
3
votes
1answer
2k views

Removing secondary replica from SQL Availability Group causes large log file

Due to an unforeseen hardware error, I had to take our secondary replicas down for maintenance. This was really due to a storage issue and, it was decided at a higher level, to purchase a new storage ...
0
votes
0answers
14 views

Any potential issues with changing the owner of a symmetric key?

We're doing a security audit on a database I support, and there's one old, obsolete user who can't be removed because he owns a symmetric key in the database. The symmetric key is being used to ...
0
votes
2answers
40 views

After trying to restart moved database: Unable to open the physical file “D:\Data\MYDBNAME.MDF”

So the default location for databases on our server is c:\program files\microsoft sql server\mssql11.mssqlserver\mssql\DATA but due to space limitations we instead use d:\data I have now since ...
3
votes
1answer
41 views

Help with SQL Server and XML columns

I am writing a query to run against the SCOM 2012 OperationsManager database. SQL instance is Microsoft SQL Server 2012 - 11.0.5058.0 (X64). Within the database is a table called Monitors. The schema ...
3
votes
1answer
74 views

How to resolve this 'XML Validation: Declaration not found for element' error?

I'm new to SQL Server and I have this task to complete (for learning purposes), yet I'm unable to figure out this error due to inexperience with XML Schemas (I think) Here's what I'm trying to do - ...
1
vote
1answer
31 views
0
votes
1answer
29 views

sql agent job timeout auto restart

we have a DWH load job that sometimes hangs. We have not been able to determine why this is happening it seems to be random and network/hardware related (which we have no control over). We are ...
1
vote
1answer
31 views

Difference between Generate Script option at database level and backup and restore option

When doing that generate scripts on the database level what difference does it do from doing a backup and restore on the database? It seems to me that they both provide the same purpose. What would be ...
2
votes
2answers
31 views

Trying to drop database only if it does not exist by using the db_id function fails

When the database foo is not yet created and I I run this IF db_id(N'foo') IS NOT NULL BEGIN ALTER DATABASE [foo] SET OFFLINE GO DROP DATABASE [foo] GO END I get a message Cannot drop ...
-2
votes
1answer
100 views

Error 35338: Clustered columnstore index is not supported [closed]

On SQL Server 2012, I want to index a table with a columnstore index. But an error message apears: Msg 35338, Level 16, State 1, Line 1 Clustered columnstore index is not supported. My code ...
2
votes
1answer
58 views

How to automatically fix Orphaned Users with PowerShell and SQLCMD

I'm trying to properly capture output from SQLCMD in SQL Server 2012. Here is the PS script: $dbname = "MyDB" $InstanceTarget = "localhost\SQLEXPRESS" $FixOrphansSQL=@" WITH login_CTE (name, type, ...
7
votes
4answers
464 views

How to get response from stored procedure before it finishes?

I need to return partial result (as simple select) from a Stored procedure before it is finished. Is it possible to do that? If yes, how to do that? If not, any workaround? EDIT: I have several ...