Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all 6525 articles
Browse latest View live

SQL Server Service Pack Installation

$
0
0
Hi Experts,We have 2 node active \Passive cluster with 1 instance and 2 node active\active cluster with 3 instances. Can i install service pack without downtime?When I installed service pack the disk went offline, I am doing something wrong?

User mapping changes dissappear

$
0
0
Hi All,Whenever I change a server login's database user mapping, everything seems to work fine, but then when I reopen the login's properties none of the changes that I made persist. I've tried this through the GUI, T-SQL, at the server level - login - properties - user mapping, and at the database level - role - properties - membership. No matter what I try (GUI or scripting) nothing errors, everything completes successfully, but the changes are not made. Some online research points to not being able to drop a user from a role if that user is the dbo, but this is not the dbo user. Any thoughts on what might be happening would be greatly appreciated.Thanks,JimiHaze

Log Shipping Issues

$
0
0
I have a test suite result DB that a few users run some heavy reporting queries against which conflict with the actual creation of test suite run results so I figured I would configure a read only version using log shipping and thus offload the reporting to that DB. Did this with T-sql many years ago in earlier version but am now running 2014. So I have used the wizard to set everything up, smooth process however I get one error all the time and another a bit intermittently. To briefly explain the configuration; the secondary DB is on the same host machine and SQL Server instance as the primary and I setup the restore with STANDBY mode and to disconnect users when restoring. At first I didn't have a copy job and tried to backup/restore from the same directory. I ran into the same issues I keep having, even after separating the backup/restore folders. As for the schedules of backup/copy/restore they initially ran the same minute on a 15 minute interval. The file retention is the default (120 minutes). The first issue I get all the time is the following message in the job log:Message2016-04-12 07:55:01.12 *** Error: An error occurred restoring the database access mode.(Microsoft.SqlServer.Management.LogShipping) ***2016-04-12 07:55:01.12 *** Error: Alter failed for Database 'FrostingReadonly'. (Microsoft.SqlServer.Smo) ***2016-04-12 07:55:01.12 *** Error: An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.SqlServer.ConnectionInfo) ***2016-04-12 07:55:01.12 *** Error: Failed to update database "FrostingReadonly" because the database is read-only.The above is [b]always [/b]in the log, even if the actual restore step [b]succeeds [/b]:w00t:.What is the logshipping .exe trying to alter? I do believe I caught it in Profiler and its trying to set it to SINGLE USER mode. I was also suspecting that the reporting application used was constantly refreshing connection to the DB, I did get a higher success rate when I added a T-SQL step prior to restore that just KILLed every session to the secondary DB.Some mornings I am greeting by many failed restore jobs and this is additionally in the log:2016-04-12 07:55:01.14 *** Error: The file 'E:\Logshipping\restorefrom\Frosting_20160411223000.trn' is too recent to apply to the secondary database 'FrostingReadonly'.(Microsoft.SqlServer.Management.LogShipping) ***2016-04-12 07:55:01.14 *** Error: The log in this backup set begins at LSN 1335000000245100001, which is too recent to apply to the database. An earlier log backup that includes LSN 1206000012058200001 can be restored.So I understand that I have an broken sequence and there is a tlog that hasn't been restored but I don't know what causes it. I am suspecting the tlog file was actually deleted before it was restored? I would be surprised if this is the case, I mean the "delete" of tlogs should be based not only on age of file but also the LSN of the tlog file and the secondary database. If it hasn't been restored then don't delete it. I assumed this would be the functionality. Is this a common issue that can arise for certain job schedule/file retention/restore delay configurations? Any help would be greatly appreciated!Timo

Unable to locate saved SSIS package

$
0
0
I was using the Data Import task to do a one-time import of an Excel file. The import refused to function because a date column was formatted as a text column. I tried to change this in Excel, but the task editor had the file locked. So I saved the package with all of the mappings in it. I chose to save it in SQL Server (I figured I could find it in SSMS). After formatting the column in Excel, I then tried to find the package. I can't find it.The Integration Services Catalogs folder in SSMS is empty. Is that where it would be? I also tried to connect to Integration Services on my machine (the server in question is a local SQL Server 2014 Developer Edition). I cannot connect and receive a long error message about administrative permissions. I have also tried to run SSMS as an administrator. That just leaves UAC repeatedly telling me "requires elevated permissions." Apparently I don't have those on my local machine.Calling the company help desk is going to be pointless.So where did my package get saved? Surely it's on disk somewhere that I can find? Or is it locked under administrative permissions? (Which raises the question: why can I save a package to SQL Server that I can't get back out?)

Issues with CheckDB running long after MSSQL 2014 upgrade.

$
0
0
We have recently upgraded a server from MSSQL 2008R2 Enterprise to MSSQL 2014 Enterprise. The one thing we didn't count on was a change to the database integrity checks. Using the exact same criteria and command, we have found that in 2008R2 a CHECKDB on all databases has gone from being a 1 hour task to a task that has run up to 18 hours and not completed. Our largest database is about 400GB, and running the same check on it now takes at least 4 1/2 hours to complete when ran on a low usage weekend. Has anyone else seen an increase in times when switching to 2014 for the CheckDB command? I am seeing at a minimum 4x the time for this one database, and if this is normal, we are going to have to look at a different way to do this.

Log Shipping fails restarting database

$
0
0
I am trying to setup log shipping for about 50 databases across 2 SQL 2014 servers.I'm getting intermittent errors when it is attempting to restart the db.The actual error log is below:2016-04-12 19:19:43.39 spid60 Error: 17066, Severity: 16, State: 1.2016-04-12 19:19:43.39 spid60 SQL Server Assertion: File: <recovery.cpp>, line=5062 Failed Assertion = 'ckptEnd->GetCkptBeginLsn () == m_SeenCkptBegin'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted.2016-04-12 19:19:43.39 spid60 Error: 3624, Severity: 20, State: 1.2016-04-12 19:19:43.39 spid60 A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.2016-04-12 19:19:43.63 spid60 Error: 3414, Severity: 21, State: 1.2016-04-12 19:19:43.63 spid60 An error occurred during recovery, preventing the database 'xxxxxxx' (25:0) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.Most of the time this process works fine and when it does happen it happens against a different db every time.Details: - both SQL versions are 12.0.4439.1 - 50 dbs on an Azure server (on SSD drives) doing log backups every 15 minutes to a location accessible to a local server (also running SQL 2014) - Every 10 minutes those .trn files are getting copied locally to our local server - Every 1 hour I'm doing a restore on all the files - I'm doing recovery with standby so we can use the local server for reporting purposes - Instead of having a 3 jobs for every database (backup, copy, restore) I've created one backup job that loops through all the databases and does backups (same thing for copies and restores) - I did this because I was thinking that this was a timing issue where all these jobs started at the same time.

sp_send_dbmail - Error when passing @query parameter.

$
0
0
Hi All,When I send mail using "sp_send_dbmail" it works fine.But it fails when I set "@query" paramerter, fails with below error."Failed to initialize sqlcmd library with error number -2147024809.Can someone please help on this ?.Thanks in advance.San.

Creating an Index Strategy

$
0
0
I'm currently in the process of looking to implement a index strategy for the first time and as I've never done this before I would just like to share some questions and hopefully understand if this is the right way or if there is a better process.I've been using MSDN, TechNet & also some online guides to get me in the right direction. The % that being passed around as a guide are below: 1. If frag > 5% and < = 30% then ALTER INDEX REORGANIZE2. If frag > 30% then ALTER INDEX REBUILD WITH (ONLINE = ON) Based on the piece of SQL code below say it returns 1000 indexes in the criteria:[code="sql"]SELECT OBJECT_NAME(ind.OBJECT_ID) AS TableName, ind.name AS IndexName, indexstats.index_type_desc AS IndexType, indexstats.avg_fragmentation_in_percentFROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, NULL) indexstats INNER JOIN sys.indexes ind ON ind.object_id = indexstats.object_id AND ind.index_id = indexstats.index_idWHERE indexstats.avg_fragmentation_in_percent >10-- using 10as an example....ORDER BY indexstats.avg_fragmentation_in_percent DESC[/code]1. If all are above 10%, does this mean I should "Reorganize" or potentially "Rebuild (if I decided to)" all 1000 or is it overkill? 2. Should I only do a small subset of say 100 indexes a night and let my job run once a day for 10 days in case it causes performance issues? should this process be avoided during office hours?3. Should I only target the ones that are most frequently used? if so how do I know that these are definitely the ones. What is it that I'm looking for as a reason? reads/writes/fill factor? sorry for the questions, just want to target this correctly first time around and understand the process going forward so I know best practice.

Not able to restore DB in SQL 2014

$
0
0
While restoring a database backup file taken in SQL 2005 Standard edition to new database in SQL 2014 Standard edition; the backup set is not filling so that it can be selected for restoration.

active active servers with availability groups

$
0
0
Hi,If I have Server A and Server B and want to use them both like active active sql clusters but with Availability Groups so not true SQL clusters do I need to create a different cluster on each server?On Server A I have created a failover cluster called clusterA with two nodes Server A and Server B. An availability group has been configured on server A with Server B being the secondary.Now I want to do the opposite with server B.Should I create a cluster on Server B?I hope this makes sense. Thanks for any help.

Best Practices - SSIS location

$
0
0
Hi Guys,What are the best practices to implement SSIS server.Application server?Existing DB server?Dedicated server per environment? one dedicated server for all environments?Or any other options.Please share your thoughts. SSIS is new to our environment. We are looking for the best practices to implement.Many thanks!

Understand Sharepoint

$
0
0
We are running Sharepoint 2013 on a SQL 2014 Server. I discovered a query recently and the execution plan is indicating that the query performance will improve by about 90% if a non-clustered index is added. The query in question is causing blocking, excessive RESOURCE_SEMAPHORE and shared lock wait type (LCK_M_S).According to the following Microsoft KB article, I can't even add an index to the database. How do I deal with this situation?https://support.microsoft.com/en-us/kb/841057 Thanks,MC

Unable to install SP1 or SP1 CU5

$
0
0
I have SQL Server 2014 installed along with .NET 3.5 and 4.5When I try to install SQL 2014 SP1 I get the following error: Please advise.The Microsoft >NET Framework 2.0 or 4.0 must be installed on your computer before you can install Microsoft SQL Server 2014 Setup Support Files. Please install the .NET Framework 2.0 or 4.0 and then install Microsoft SQL Server 2014 Setup Support Files.NOTE: I have installed this on multiple servers with no problems.

Corruption issues on one of our databases on x server

$
0
0
I have hit this corruption issue lately in one of our databases. I am not sure how it all started, but lately I was seeing a lot of events of the nature as described below. I am not a SQL DBA, but more so an accidental DBA, and the only thing I found on google was to run dbcc checkdb for the corrupted database, and when it ran it suggested me the minimum allowable repair level is with data_loss. I am not sure how much, and what all data would be lost after fixing this issue, and is there any way I can restore some data out of the backups without incurring much loss.Thanks

Creating AG read only node for cluster

$
0
0
THought I had this right but here is where I am stuck. Built active passive 2014 Ent Edition Cluster which seems to be fine. Added a stand alone server to the cluster (windows cluster) which will house read only ag node.In this new node (lets call it an01) i tried to install sql server and during setup I get an error that Standalone server on WFC cluster can not have shared storage (it has it's own disk subsytem to house RO database.AM I missing a step or did I fumble something?

(Urgent) SSIS - Clustered DTC Problem

$
0
0
I have a newly built SQL 2014 cluster which has me at my wit's end when trying to execute SSIS packages with "transactions required".Namely, I receive the following error when executing the SSIS package from dtexecui.exe or as a part of a job step:"The SSIS Runtime has failed to start the distributed transaction due to error 0x8004D027 "MSDTC was unable to read its configuration information.". The DTC transaction failed to start. This could occur because the MSDTC Service is not running. End Error DTExec: The package execution returned DTSER_FAILURE (1)."I googled until my eyes bled and tried just about everything I found. Made sure that:- Clustered DTC resource resolves via DNS- Under Security Settings for the clustered DTC, DTC network is enabled, remote clients are enabled, transaction manager communication Inbound and Outbound are enabled.- Testing distributed transactions from SSMS works:begin distributed transelect * from [linked_server].master.sys.sysdatabasescommitThis test correctly returns the remote server's list of databases and I see the committed and total transaction count increment in the Transaction Statistics under the Clustered DTC section of Dcomcnfg.exe. I use one of the instances on the same cluster as the remote linked server for the purposes of this test.I'm honestly stumped. Ready to provide any further info needed to resolve this. Please help!

test

$
0
0
Hi,I've restored a back up to my Test server but I cannot add the role db_owner to my user. It fails with error:Add member failed for DatabaseRole 'db_owner'. (Microsoft.SqlServer.Smo)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=12.0.2000.8+((SQL14_RTM).140220-1752)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Add+member+DatabaseRole&LinkId=20476------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission. (Microsoft SQL Server, Error: 15517)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.4213&EvtSrc=MSSQLServer&EvtID=15517&LinkId=20476[b]Image:[/b][url=https://www.dropbox.com/s/kjnz4qda4upa3as/error.png?dl=0]https://www.dropbox.com/s/kjnz4qda4upa3as/error.png?dl=0[/url]

Error after changing SQL server service account

$
0
0
Hi guys,I get this error after changing sql server service account from LocalSystem to a domain account (SQL 2008)."Windows kernel object 'Global\SQL_90_MEMOBJ_MSSQLSERVER_0' already exists. It's not owned by the SQL Server service account. SQL Server performance counters are disabled.Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions.Perfmon counters for resource governor pools and groups failed to initialize and are disabled."I have followed the steps below when changing service acc:Added to local policies:Act as part of the operating systemBypass traverse checkingLock pages in memoryLogon as a batch jobLogon as a serviceReplace a process level tokenAdjust memory quotas for a process.Perform volume maintenance tasks. (Instant file initialization)The service account has been added to the following1. In administrator group2. In SQLServerMSSQLUser $<ServerName> $<instanceName>3. In SQLServerSQLAgentUser $<ServerName> $<instanceName>4. In all the local policy mentioned above5. Full control on data, log, temp db and backup drive letters.6. Full control for Mssqlxxxx folder under c:program files7. Log on and log off the server with the new SQL Server Domain Account .8. change the service account on configuration manager for all the services and restart the sql services.Any thoughts on this? When the windows server is restarted, I don't see this error.Many thanks

Having a promblem installing SQL 2014 on a Windows 2012 Failover Cluster Servers Nodes

$
0
0
I have trying everything, Perstaging the SQL Network name with the right permissions and I'm still this error Log Name: SystemSource: Microsoft-Windows-FailoverClusteringDate: 4/14/2016 2:43:48 PMEvent ID: 1194Task Category: Network Name ResourceLevel: ErrorKeywords: User: SYSTEMComputer: BLUESQLNODE02.BLUESKY-INC.COMDescription:Cluster network name resource 'SQL Network Name (VSSQL2014)' failed to create its associated computer object in domain 'BLUESKY-INC.COM' during: Resource online.The text for the associated error code is: Access is denied.

Creating AG Listener when nodes are on different subnets

$
0
0
Hello SQL Gurus,I am seeking advise on how to resolve my issue in creating/configuring an "Availability Group" listner for a 3 node cluster. Topography of my setup is as follows...[b]Node 1[i][/i][/b] - In Data Center-1[b]Node 3[i][/i][/b] - In Data Center-2[i](Nodes 1 & 2 are configured to be in a failover cluster)[/i][b]Node 3[i][/i][/b] - In Data Center-3I am able to successfully implement "Always On" using these 3 nodes, with Node1 as primary, and Nodes 2 & 3 as Secondary replicas. I tested different types of failure scenarios successfully, some of which are...When Node1 fails, Node2 becomes primary automatically.When Node1 comes back up, it becomes secondary automatically.When both Nodes 1 & 2 fail, Node 3 is still available as readable secondary, which can be manually made to be primary.Now I need to implement a generic name that can be used by the application so that it remains agnostic to which node is active at any given point in time. I am trying to achieve this by creating an "Availability Group" listener, using an IP that matches the Network identifier of Nodes 1 & 2. However this creation is failing because of the fact that Network identifier and host identifier of the IPs for Nodes 1 & 2 are significantly different from that of Node 3 (since it is hosted at a different data center, as expected to be in the case of a DR instance). I get an error that reads as follows...[i]"None of the IP addresses configured for the availability group listener can be hosted by the server "Node-3". Either configure a public cluster network on which one of the specified IP addresses can be hosted, or add another listener IP address which can be hosted on a public network for this server. (Microsoft SQL Server, Error: 19456)"[/i]Can someone please shed some light on how I can overcome this and create a virtual server that can talk to all 3 nodes and keep track of which is active so that my application can run smoothly?Your help is very much appreciated.Sincerely,SQL Curious
Viewing all 6525 articles
Browse latest View live