Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12554 articles
Browse latest View live

Sql server insert speed vs san writing speed

$
0
0

HI,

i am working on inserting millions of rows, 

there are no indexes involved in the destination table on production server,

But it is very very slow,

on the other hand i have another server that has its separate SAN it writes the same data faster.

how can i justify that its slow writes on SAN issue. 


k


Facing error-2147217900-[Microsoft ODBC SQL server][Sql Server]server xxxx is not configured for RPC. But RPC is configured in DB.

$
0
0

2147217900-[Microsoft ODBC SQL server][Sql Server]server xxxx is not configured for RPC-

First i check the DB-its configured properly for RPC. Then i checked ODBC connection it wasn't there. So created one DSN. It worked fine. I did it yesterday.

Today, again facing the same issue in some other place of the application.

Can anyone please help us?

Note- in Windows 2012 server, i created the DSN for 64 bit.

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 .

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



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

Msg 3287, Level 16, State 1, Line 1 The file ID 1 on device 'D:\_DEV_file13.bak' is incorrectly formed and can not be read. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally.

$
0
0
Getting error while restore SQl 2012 to sql 2014 

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,

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>

Failing to restore SQL 2008R2 SP2 Enterprise Edition with CDC enabled to SQL 2012 SP2 Standard Edition

$
0
0

We currently restore a CDC Enabled SQL2008R2 Enterprise Edition backup to a SQL2008R2 Standard Edition server for our OAT, but when I try to restore the same to SQL2012 Standard Edition using the same scripting I receive the error:

Database 'xx' cannot be opened. It has been marked SUSPECT by recovery. 
See the SQL Server errorlog for more information.
Msg 934, Level 21, State 1, Line 3
SQL Server cannot load database 'xx' because Change Data Capture is enabled. 
The currently installed edition of SQL Server does not support Change Data Capture. 
Either disable Change Data Capture in the database by using a supported edition of SQL Server, 
or upgrade the instance to one that supports Change Data Capture.

My question is, have the restrictions been tightened up for SQL2012?

Thanks

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 Cluster Database Recovery pending mode while failover "VMWare RDM shared storage"

$
0
0

Hi all,

we had build SQL Cluster 2012 on VMWare with Shared storage are RDM, everything working fine, after some days we found check disk on failover cluster, and after we try to failover to second node we found databases issue [some databases get in suspect mode and some database get in recovery pending mode].

We need help to identify cause of issue and how to resolve it, I have backup from databases will restore it. but we need to resolve main issue, because this happen to or three times.

Thanks all

Page life expectancy increases dramatically from a minute to another

$
0
0
               Hello. I measure PLE on my server and insert them every minute into a table. Now, when I look into the table I just dont know how to interpret the following data. I dont understand how is that possible. It's an sql server bug? or? Can you help me tointerpret that data please? 
Viewing all 12554 articles
Browse latest View live


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