Quantcast
Channel: SQL Server Database Engine Forum
Viewing all 15872 articles
Browse latest View live

High Availability database backup Error 18204, Severity16 2012R2

$
0
0

SQL 2012R2 11.0.5058.0 Enterprise Edition

Backing up all databases on a sql server that hosts secondary high availability databases as well as other databases.  The other databases back up fine, but the high availability secondaries all get the same error:

BackupDiskFile::OpenMedia: Backup device 'F:\MSSQL\Backup\dbname\dbname_backup_2015_MM_DD_tttttt_ttttttt.bak' failed to open. Operating system error 2(The system cannot find the file specified.)


Take only last 1 year data BackUp using script from SQL server

$
0
0
Hi,

I have last 5 years data in my database(SQL server).
I want to take backup only last 1 year(last 365 days) data using SQL script.
could you please help me.

Thanks in Advance,

Thanks,
Chantan

RODC utilization

$
0
0

Team,

How to check the performance monitoring for RODC on server through performance monitoring. What all are the parameters and counters need to select.

Perfmon counters collect to SQL DB

$
0
0

I have a Win Serv 2008 R2 and want to collect perfmon counters of this server to remote SQL database using ODBC.

I created data collector set in User Defined. In properties collector set "DSN"I selectedthe name of database.

Some days it works. But after system restart when I try to start data collector set, I have an error PHD (event ID 3042 Qualifiers 49152 Level 2) :

SQLExecDirectcall isendedwith an error[the Microsoft Corporation] [ODBC SQL Server Driver]attachedinsufficient number ofcolumns   (by google translate)




Licensing for maximum virtualization

$
0
0

Hi all,

I have a physical server on my production site, I know from the "SQL Server licensing guide" that if I license every physical core in my server with SQL Server 2014 Enterprise Edition, and if I add Software Assurance (SA) to each license, I can run an unlimited number of VM running an unlimited number of SQL Server instances regardless of the virtual processor assigned to the VMs. This sounds clear to me.

I know that SA coverage, grants me the right to run a passive server for HA purposes without having to buy additional licenses for it (assuming that server is truly passive, so no backup, no read only workload).

May these two benefit be combined? Assuming that I've used "licensing for maximum virtualization" on my physical server on production site, may I run some virtual machine on a disaster recovery site only for HA scopes? For example, may I run a VM on the production site that hosts the primary replica of an Availability Group and on the DR site a VM that host the secondary (not readable) replica of that Availability Griup?

Tempdb reserved space not being released

$
0
0

Hi,

In on of the server tempdb is not releasing the reserved space after completion of data loads,as of now 99% of free space available in data file,we tried to shrink the datafile ,and space has not been released .

Shutdown or disable all connections from Stored Procedure

$
0
0

I have an auto exec stored procedure that needs to complete successfully or:

- the server should shutdown, or

- disable remote connections

Officially I cannot issue a Shutdown from a Stored Procedure. In addition, I can't see how to programatically disable remote connections.

Any tips would be appreciated. I'm sure others have had to do something similar.

Backup Job is taking more time than usual.

$
0
0

Hello Expert, 

My backup job runs on the night and it takes around 3 hours. If I run this job manually at morning it takes only 30 minutes. 

I am testing this server. No application or no any other job is scheduled in this evening time. 

Can you please suggest the detail process.



SQL 2012 R2 Reindex within Mtc plan doesn't do anything.

$
0
0

Microsoft SQL Server 2012 - 11.0.5058.0 (X64) 
May 14 2014 18:34:29 
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

Have many separate reindexing maintenance plans, to reindex a different handful of tables each night.  They complete successfully but finish in 2 seconds and don't appear to do anything.  Fragmentation is still very high (99%) on these tables. A snipet from the job history:

The last step to run was step 1 (Subplan_1).,00:00:02,0,0,,,,0

Question regarding installing SQL 2012 on a windows cluster with non-shared storage

$
0
0

Hello, we have windows clustered with non-shared storage, now I am trying to install SQL 2012 on that two node non-shared storage cluster. Just wondering if you can refer me any articles regarding that.

Thanks!


sqldev

A significant part of SQL server process memory paged OUT

$
0
0

Hi All~ I have the following config

SQL Server 2008R2 bits

Windows 2008 32 bits  on VM

Memory : 4GB

vcpu: 4

There was SSIS triggered on that server @ midnight, and some times I see the following in SQL errorlog

A significant part of SQL Server process memory has been paged out. This may result in performance degradation.This may result in a performance degradation. Duration: 0 seconds. Working set (KB): xxxxxx, committed (KB): xxxxx, memory utilization: 43%.”

I am wondering SSIS process itself also eat resource on the same database server. how to avoid it ?

Can I also set lock page in memory in 32bits  OS/SQL? and my sql server/agent  startup account is local system.~

Why are my query windows now saying "BEGIN TRAN ROLLBACK"? How do I turn that off?

$
0
0

Why are my query windows now saying "BEGIN TRAN      ROLLBACK"?  How do I turn that off?  I am sure I must of done something to do this, but I know just a few short weeks ago it didn't come up.

BEGIN

 

TRAN

ROLLBACK

SQL Server Database Files configuration

$
0
0

Hello,

I need some expert advise on below Database Files setting.

1.      Server with 2 disk drives as below :

a.      D drive : 1TB (For database files)

b.     E drive : 1TB (For log files)

2.      I have created 2 different databases for creating disk tables and in-memory tables.

3.      For DiskDatabase, files are – (default settings, I have not changed anything here)

a.      DiskDatabase (Initial size : 2099MB, Auto growth by :  1 MB, Maximum size : Unlimited)

b.     DiskDatabase_Log (Initial size : 4524MB, Auto growth by :  10 percent, Maximum size : limited to 2,097,152)

4.      For InMemoryDatabase, files are – (default settings, I have not changed anything here)

a.      InMemoryDatabase (Initial size : 3MB, Auto growth by :  1 MB, Maximum size : Unlimited)

b.     InMemoryDatabase_Log (Initial size : 1MB, Auto growth by :  10 percent, Maximum size : limited to 2,097,152)

c.      InMemory_FileGroup (Initial size : 153MB, Auto growth by & Maximum size : Unlimited)

Questions are :

  1.       Is it better to have disk database and in-memory database separate in terms of clearing transaction logs?
  2.       Though both the drive sizes are 1TB, maximum file size shows : limited to 2 TB by default. Is that okay? Won’t we get Transaction full error ?

 

Please suggest on this configuration of database where we have to run huge active transactions on millions of records.

Thank you,

Mittal.

Cluster resource could not be brought online due to an error bringing the dependency resource 'SQL Network Name xxx online

$
0
0

I am trying to install a second named, clustered SQL Server 2012 instance on a Windows 2008 R2 cluster.

The precheck passes, the installation proceeds with no errors on the first node, until the installer tries to bring the cluster resource group for the new clustered instance online.

At that point I get an error that the cluster resource group can't be brought online because of a dependency issue.

The dependency appears to be something with the network resource (IP?) required.

When I look in the installation logs, I did find this:

Cluster network name resource 'SQL Network Name (TX2012MX)' failed to create its associated computer object in domain 'dfw01.corp.com' for the following reason: Unable to create computer account.

The text for the associated error code is: Access is denied.

In doing the installation, I am running as a user with Admin privs, and the accounts specified are AD accounts that do exist, and are already used to run the first instance, which is fine, and where I did not encounter any of these issues.

-How can I determine what computer object the installation is trying to create?

-What access might be missing?

- Is there any way to get more information from Windows Cluster Manager about what may be missing to bring the dependency online?

Thanks

Sandra


Sandra


How to catch who killed the active session / connection on SQL Server 2008 R2.

$
0
0

Hello,

Is there any specific event i have to select in SQL profiler to monitor the process / user that kills active connection which is performing a batch data transfer.

Any other alternative other than profiler that catches this (like XEvents)?

Thanks,


Does restarting a SQL database kill all processes?

$
0
0

A couple of days ago, our SQL Server 2008 R2 was having issues.

All reports coming from it either timed out or took extremely long to run.

Logging onto the server over remote desktop seemed slow as well.

CPU and memory usage on the server was high but not 100% pegged.

Tried to look at Activity Monitor within SSMS but clicking on processes caused a time out as well.

I looked at the running queries but nothing stood out.

I ended up restarting the server itself and after it came back up, the CPU and memory came down like expected but all reports were still slow or were timing out. Activity Monitor still timed out as well.

When I came in the following morning, however, the system worked normally. I didn't change anything, which is driving me crazy.

If you restart the server, does any process just automatically start back up again that could cause the slow down and that same process can time out after a period of time?

This server is running SQL Server 2008 R2 on a Windows 2008 R2 box. Nothing else runs on it besides SQL Server (single instance and 3 databases) and a SSIS package that runs on it overnight that usually takes about 2 1/2 hours to run.


Heath

What is exec sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' 1500 ?

$
0
0

Hi guys, 2 quick question...

I am scripting out my database, and at the end I get this code... what is this?

exec sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' 1500
width = 1500
width = 1500
width = 1500
width = 1500
(...)

I even try to execute it and I get "object is invalid"

Last one! I am migrating from sql 2000 to 2012 (I am following all the procedures, no issues so far); is there any site with a list of 'lesson learned' or do you guys have any extra precaution to share?

Thanks!!!!!!!!

Issue using Windows login for Oracle linked server, SQL login works fine with same permissions

$
0
0

I am seeing a issue with one of the oracle linked servers. I as a SA can access everything and am having no issues. One of the sql windows logins which the app is using is having issues with one partiucular oracle table, that login can acess other tables. Login has dbo permissions on the sql database. I created a test sql login and made it dbo on the same db & I got access error to SYS.XP_PROP_OLEDB_PROVIDER, following solved it:

USE [master]
GO
CREATE USER [] FOR LOGIN []
GO
USE MASTER
GO
GRANT EXECUTE ON SYS.XP_PROP_OLEDB_PROVIDER TO [];

---

now the test sql login had no issues running the linked server OPENQUERY t-sqls. I gave the same permission to the windows login but it still fails on a particular OPENQUERY:

SELECT *
FROM OPENQUERY(linkedservernamehere, 'SELECT * FROM problemtablenamehere')

--

giving following error:

The OLE DB provider "OraOLEDB.Oracle" for linked server "linkedservernamehere" supplied inconsistent metadata. The object "[OraOLEDB.Oracle]" was missing the expected column "columnnamehere_which_I_don't_see_when_run_as_sa_on_results".

--

so, all in all, if i login as a SA on SQL - no issues. If I login as a sql login with same permissions as windows login - no issues. But if the app engg logs in using WINDOWS login - then he gets the errors only on a single problem table, he can access others with no issues, not sure how to proceed, thanks.


D

Intermittent Error - Failed to create AppDomain

$
0
0

We keep getting this error intermittently and the database becomes unresponsive. Feel that this error maybe related to the Geometry data type.

Message: Failed to create AppDomain "xxxx.sys[runtime].8".
Could not load file or assembly 'System.Data, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its
dependencies. Not enough storage is available to process this command.
(Exception from HRESULT: 0x80070008)

However, when the error is thrown we do have more that 75% of allocated memory available. OS is Win Server 2012 and DB is SQL Server 2014.

Would appreciate any help or suggestion.. Thanks!

2014 Enterprise much slower for analytics queries than 2008 Standard

$
0
0

Hi all,

I have a simple OLTP database that i've created some views over to transform it into a star schema. This star schema is used to generate an extract (basically a denormalised select * from all views inner joined). The fact view has 1.2million rows

It runs in <3 minutes on 2008 Std sp3 (2 core, 4gb ram)

I've restored the db onto a 2014 enterprise SP1 server, converted the relevant tables into CCI - server is an azure vm (16 core, 114g ram)

sql 2014 is on SP1. they've been running for 30+minutes without returning a single row


The views by themselves run ok and in the same amount of time as on the 2008 box, but join them up and it all goes to hell VERY quickly.


The format of the views is

    WITH North_Header AS (
        SELECT DISTINCT x.buskey, 1 AS IsInferredMember FROM DB1.dbo.orderheader x
    ), North_Cust AS (
        SELECT  cust.buskey
        ,       other dim attributes
        ,       0 AS IsInferredMember
        FROM        DB1.dbo.customers cust
    ),South_Header AS (
        SELECT DISTINCT x.buskey, 1 AS IsInferredMember FROM DB2.dbo.orderheader x
    ), South_Cust AS (
        SELECT  cust.buskey
        ,       other dim attributes
        ,       0 AS IsInferredMember
        FROM        DB2.dbo.customers cust
    )
    SELECT  'N-'+rtrim(ISNULL(c.buskey,h.buskey)) AS CustomerKey
	,		other dim attribs
    ,       'North' AS Source
    ,       COUNT(*) OVER (PARTITION BY ISNULL((c.buskey,h.buskey)) AS DupeCheck
    ,       ISNULL(c.IsInferredMember,h.IsInferredMember) AS IsInferredMember
    FROM        North_Header h
    FULL JOIN   North_Cust c
    ON              h.buskey = c.buskey
    UNION ALL
    SELECT  'S-'+rtrim(ISNULL(c.buskey,h.buskey)) AS CustomerKey
	,		other dim attribs
    ,       'South' AS Source
    ,       COUNT(*) OVER (PARTITION BY ISNULL((c.buskey,h.buskey)) AS DupeCheck
    ,       ISNULL(c.IsInferredMember,h.IsInferredMember) AS IsInferredMember
    FROM        South_Header h
    FULL JOIN   South_Cust c
    ON              h.buskey = c.buskey

GO

this caters for inferred members etc etc. This expands to a very complex overall query when you're joining about 10 views like this to a fact table that is itself a union all of two tables across two databases. Joins are done on the manufactured keys (like CustomerKey above)

But the issue is that it's taking much less time on a old 2008 Standard instance of sql server on a much MUCH weaker machine.

It's not even beginning to complete on the 2014 box.

It's the same issue when using 'normal' indexed tables to perform this task.

Is there some bug or hotfix im not aware of?

Thanks



Jakub @ Melbourne, Australia <a href="http://jakubka.blogspot.com">Blog</a>

Viewing all 15872 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>