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

SQL Server 2008 R2 quiesce - How?

$
0
0

We have a 38TB SQL Sever instance which we are moving to a bigger hardware. Part of the move, we are using SAN split-mirror technology to recover the databases on the target. Unfortunately, the databases are not recovered cleanly as the source database is constantly changing. How do we put the database in consistent mode (in other terms, hot backup mode or quiesce)? We are using EMC storage.

Thanks.


SQL SERVER 2008+SQL SERVER 2008 r2

$
0
0

Hi All,

Here am facing a problem with the SQL SERVER 2008 r2 and SQL SERVER 2008.

I have installed both the editions in my system and am not able to view the SQL SERVER 2008 r2 Configuration Tools and Management Studio Icon.

Could you pleas let me know further to open 2008 r2 Edition.

Thanks in advance.

Thanks & Regards,

Balaji Sunku.

Distribution agent failed to create temporary files in

$
0
0

Hello,

we are configured transnational replication in sql server 2005 location, all replication jobs are running fine,

while we checking sql server errorlog showing below error :

Distribution agent failed to create temporary files in  'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5.

NOte: normally we are configured replication 2005 [90] , but while see the above error it shows [100] comparability level . 

Computed Column definition altered on creation

$
0
0

Hi,

I have a very large partitioned table and one of the columns is a computed column. When trying to create an identical table (automated process) to switch out a partition into it I encounter a problem: The switch out fails due to difference in column definition.

In the original table the computed column looks like that:

(CONVERT([numeric](19,4),[COL1]*[COL2],0))

When creating the switch out table the computed column is created like that:

(CONVERT([numeric](19,4),[COL1]*[COL2],(0)))

 

When trying to switch out I get an error:

Switchout: ALTER TABLE SWITCH statement failed. Computed column 'COL3' defined as '(CONVERT([numeric](19,4),[COL1]*[COL2],0))' in table 'TABLE1' is different from the same column in table 'TABLE1_Out' defined as '(CONVERT([numeric](19,4),[COL1]*[COL2],(0)))'.

 

There is no way for me to create the out table without the parenthesis becauseit’s added automatically no matter what I do

(I tried even creating it manually, explicitly without the parenthesis and the column is still created with them).

Why are the parenthesis added? How can I create the computed column without them? Is there another way to switch partitions out?

I would appreciate any help on this issue!

Thanks,

Adi.

There is insufficient system memory in resource pool 'internal' to run this query

$
0
0

hello Everyone,

today i am getting one error while opening activity monitor.

i am unable to open AM and i checked in sql server error log i received error message description about memory dump.

below mentioned message. 

There is insufficient system memory in resource pool 'internal' to run this query...

AlwaysON backup question

$
0
0

Hello!

I'm trying to set up backup for the database in an AlwaysOn group using Add Maintenance Plan wizard and got puzzled by the following:

http://msdn.microsoft.com/ru-ru/library/hh245119%28v=sql.110%29.aspx


if "the default behavior" is to take backups on the secondary replicas AND the only backup type supported on those secondary replicas is copy-only full backups, it is NOT possible to backup such databases (that to be backed up on secondary replicas) using Back Up Database (Full) method at all...

Q1:  -Is it correct?

Q2: If that is true what's the purpose of copy-only full backups if no "really"full backup can be created? As far as I understand there's no way to take full backups of AlwaysON databases on secondary replicas out of box, am I right?

Q3: After checking "Copy-only" checkbox my Mainenance Plan (backup) completes successfully but no .bak or .trn files are created on the secondary replica...???


Thank you in advance,

Michael






default Trace

$
0
0
I am trying to change the default trace value from 2 to 6, to incorporate rollover and server shutdown.  I am using this code to create a new trace (with id: 2) with the value of 6 and use that to overwrite the default trace (with id: 1):

    DECLARE @new_trace_id INT;

    EXECUTE master.dbo.sp_trace_create
      @someinteger = @new_trace_id OUTPUT,
      @someinteger = 6,
      @someinteger = N'C:\trace\TestTrace';

Then I disable the default trace.  I am then using this code to overwrite the default trace (with id: 1) and replace with new value default trace (with id: 2):

       -- get trace status 
       SELECT * FROM ::fn_trace_getinfo(NULL)
       -- stop trace
       EXEC sp_trace_setstatus @traceid = 1 
                    , @status = 0  
       go 
        -- delete trace
       EXEC sp_trace_setstatus @traceid = 1 
                    , @status = 2

Then I enable the default trace.  It works perfectly (default trace with id 1 is showing value 6) until I restart.  Upon restart no default traces are enabled, once I run the script to enable the default trace then the values for the default trace (with id: 1) are back, and my value for rollover/server restart is back to 2.

Any thoughts?

NUMALPHA increment function

$
0
0

I have a field can contain numeric and Alpha value information like following and would like to have it increment

0001, 0002, 0003, 0004, ... 0009,000A, 000B, ....000Z, 0010, 0011, .... 001Z, 0020

I would like to generate the next number from my application for users.

Are there any easy way to have a function to increase just like a numeric number?

Your help and information is great appreciated,

Regards,

Souris,


Limiting no of core with Sql Server 2012

$
0
0

Hi All,

we are planning to use Sql Server 2012 EE on a hardware with 64 logical processors but want to limit Sql Server to use only 16 logical processors. Please assist for a solution which should also comply with MS licensing.

Best Regards

khalil

ASYNC_DISKPOOL_LOCK

$
0
0

Hi All. I am doing a DB backup , and it holds are 90% for a very long time, so I cancel the restory query,however there is still a processes

has the following waittype

ASYNC_DISKPOOL_LOCK.

I try kill that proceses, which doesn't work, I tried to change database to single_user, offline.. all doesn't work..

we can I do now :?

Intermittent connection failures to the database. SQL is 2008R2 + SP2

$
0
0
The application login is facing intermittent connection failures. When this happens they try to connect back and it works. There are no errors at the SQL Server end. I'd like to use profiler or perfmon to check the failure. Can someone let me know what specific counters related to connections that we can use to check. And also some suggestions on how to go about troubleshooting this.

My 'Buffer cache hit ratio' is constantly over 2600.00

$
0
0

I am setting up some alerts on my company's SQL Server Database. All of the documentation I read tells me that the'Buffer cache hit ratio'  should be 100 or less as it is a percentage. Mine is constantly 2500.

Please can somebody explain about the 'Buffer cache hit ratio'  and tell me why mine doesn't seem to follow the rules?

Thanks

Les

Page Splits/Sec - Can't Find It

$
0
0

Guys, this is pathetic, but I cannot find the Page Splits/sec counter in Profiler.  I know it is supposed to be under Access Methods from searching, but I cannot find that either.

This is on Sql Server 2012 SP2 and I am opening a new trace in Profiler and then I click on Show All Events, but I do not see anything that leads me to the above.

Can someone point me to the above?

By the way, I want to monitor this during an update to a new column.  The column has nulls allowed and when I update the column, it is taking up a bunch of new space.  My theory is that the pages are pretty full and we are getting a bunch of page split from the update.

Any help is much appreciated...

syspolicy_purge_history throws an error

$
0
0

Have scoured the Internet looking for an answer to the syspolicy_purge_history error we are having.  It is a stand-alone Windows 2012R2 virtualized server running Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)   Jun 28 2012 08:36:30   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor) 

Process Exit Code -1073741502.  The step failed.

Anyone with a suggestion?!?

one of server core 12 and showing in sql server 24. how it possible?

$
0
0

Hello  everyone,

I'm confused in sql server 2008 r2 when try to check no. of cores in sql server property are double in sql server and os showing 12 cores.

one of my friend saying 1 cores= 2 processors. 

What is happen behind that...

Thanks in advance...


SQLServer 2012 Web Backup error that SUPENDED KILLED/ROLLBACK problem never disappear

$
0
0
Hi at all,

I need help about an installation of SQLServer 2012 Web Edition Sp1.

It's first time that I use Web Edition so tu backup database I developed a .net console application that do Backup with SMO object of SQLServer.

Sometimes this procedure exit with backup error and all future backup tenative will throw an error exception that sound like other operation lock something and backup can't start.

I try to Kill process that is SUSPENDED and KILLED/ROLLABACK status, but that process never disappear.

I try to use Kill with statusonly to get information about rollback completion % but this percentage remain at 16% for a couple of days so I need to power off database server to resolve this issue, but it's a big problem for my production environment.


I used SQLServer from 2005 with Standard edition and I've never had problem like this.


Could you help me ?

Is it a know bug ? Is there a workaround to solve my problem ?



Thanks for help 

Unreliable partitioned view execution table scan, SQL Server bug?

$
0
0

The query still scans all the tables where it supposes to scan only one table when the tables have more than, say, 10000 rows. 

The details can be found here.

http://stackoverflow.com/questions/25691738/unreliable-partitioned-view-execution-table-scan-sql-server-bug?noredirect=1#comment40155612_25691738

Troubleshooting Hung Query: flat 25% CPU, no disk or network I/O

$
0
0

I work in an environment where all servers (and SQL Servers) run inside of VMware, using a single EMC disk array with all disks placed into a single huge array that is carved up and handed out.  Not an optimal situation, but the workload I'm monitoring is 5 -10 GB of data with 4 vCPU and 32 GB of RAM allocated (on my primary testing server for this issue) - so it should at least be able to run.  I have had the following symptoms show up on multiple servers with different Windows and SQL Server versions of varying hotfix levels.

Situation

A query starts to run and for the first minute or two I see disk, network, and cpu activity - and all three are fluctuating.  Then, the CPU activity flatlines (sometimes at 5%, sometimes at 25%, etc) and the disk and network go to no activity.  The query runs in this state forever (in one situation I let it run for 36 hours before I killed it).

Counters

All counters that are logged for historical purposes look good.  buffer cache hit >= 98, page life in the 5-6 digit range, login/logout/connections <= 1, total server memory = target server memory, compilation/recompilation <= 1, no deadlocks.

Server team says that all the counters at the Windows level look good, all counters at the VMware level look good, all counters at the SAN array level look good.

Any thoughts on what to look at or what could be the issue to research?  I believe the issue to be something external to SQL Server - but thought it worth asking a question in case anyone has experienced a similar situation.

Thanks for your time!

Tables not showing in a new Database created using CREATE DATABASE command

$
0
0

Hi there! I've created a database using "Script Database As" in SSMS. Here's the code generated:

USE [master]
GO

/****** Object:  Database [PLMAINDB]    Script Date: 08/22/2014 11:25:44 ******/
CREATE DATABASE [PLTESTDB] ON  PRIMARY 
( NAME = N'CLIENTSPRIME_Data', FILENAME = N'C:\TEMPDB\CLP_Data.mdf' , SIZE = 217472KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
 LOG ON 
( NAME = N'CLIENTSPRIME_Log', FILENAME = N'C:\TEMPDB\CLP_Data.ldf' , SIZE = 1024KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO

ALTER DATABASE [PLMAINDB] SET COMPATIBILITY_LEVEL = 80
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [PLMAINDB].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO

ALTER DATABASE [PLTESTDB] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [PLTESTDB] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [PLTESTDB] SET ARITHABORT ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_CLOSE ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_CREATE_STATISTICS ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_SHRINK ON 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [PLTESTDB] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [PLTESTDB] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [PLTESTDB] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [PLTESTDB] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [PLTESTDB] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [PLTESTDB] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [PLTESTDB] SET  DISABLE_BROKER 
GO

ALTER DATABASE [PLTESTDB] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [PLTESTDB] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [PLTESTDB] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [PLTESTDB] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [PLTESTDB] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [PLTESTDB] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [PLTESTDB] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [PLTESTDB] SET  READ_WRITE 
GO

ALTER DATABASE [PLTESTDB] SET RECOVERY FULL 
GO

ALTER DATABASE [PLTESTDB] SET  MULTI_USER 
GO

ALTER DATABASE [PLTESTDB] SET PAGE_VERIFY TORN_PAGE_DETECTION  
GO

ALTER DATABASE [PLTESTDB] SET DB_CHAINING OFF 
GO

The mdf and ldf files for PLTESTDB were created successfully. The issue I'm having is that tables are not showing when under PLTESTDB. I've searched online and most answers point to Permission issue. I already added user with the ff. database roles 

db_owner

db_reader

db_writer

But even after refreshing or even closing relaunching SSMS, i could not see any table under PLTESTDB. I've spent  a lot of time already on this but can't find the fix. I might be missing something here. I tried it on another computer but same issue persists. 

Any ideas or suggestions on how to get this resolved are highly appreciated! Thanks in advance. 



Bong Robles

The transaction log for database 'Test_db' is full due to 'LOG_BACKUP'

$
0
0

My dear All,

Came up with another issue:

App team is pushing the data from one Prod1 server 'test_1db' to another Prod2 server 'User_db' through a job, here while pushing the data after some duration job is failing and throwing the following error'Error: 9002, Severity: 17, State: 2.'The transaction log for database 'User_db' is full due to 'LOG_BACKUP'''.

On Prod2 server 'User_db' log is having enough space 400gb on drive and growth is 250mb. I really confused that why job is failing as there is lot of space available. Kindly guide me to troubleshoot the issue as this issue is occuring from more than 1 week. Kindly refer the screenshot for the same.

Environment: SQL Server 2012 with sp1 Ent-edition. and log backup duration is every 15 mints and there is no High availability between the servers.

Note: Changing to simple recovery model may resolve but App team is required to run in Full recovery model as they need of log backups.

Thanks in advance,

Nagesh



Nagesh

Viewing all 12554 articles
Browse latest View live


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