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

cannot see any sql server jobs - sql server 2008

$
0
0
Hi,

There are several SQL server jobs which are running as per their schedule daily\weekly and all... when i double click on 'Job Activity Monitor' or when i right click on 'Job Activity Monitor' and select 'View Job Activity' i cannot see any jobs... but when i right click on 'Jobs' folder and select 'View History' it shows the history of all the jobs....

Sql server 2008 SP4 (10.0.6241.0) is my sql version...

any help is appreciated..

thanks in advance....

VVinayPrasad


difference between contained user and guest user in sql 2012

$
0
0

Hi all.

I am trying to get understanding of contained user in Sql 2012 which is a new feature of sql 2012.

i am not clear with  user that I create using following syntax in database"CREATE USER SalesRep1 WITHOUT LOGIN"
and guest user and the one I create with contained user concept.

Thanx in advance


srm_2010

SQL Server Developer 2017 INSERT SELECT Performance Issue with 10 MB data.

$
0
0

Hi Everyone,

The current problem description is as follows:

I have uploaded two files on OneDrive.

File 1: "script.zip"  Link is:

https://1drv.ms/u/s!AuV9gXqFVffxhEQgLpnrQ79O0cf8

Download and scan using anti-virus and unzip the file. Unzipped size is 15MB.

File 2: "GrantFritchey_SSC_Guru_Test.sql" Link is:

https://1drv.ms/u/s!AuV9gXqFVffxhEUDp310bNPqZ2QF

Download and scan using anti-virus.

Link of discussion on SQLServerCentral.com:

https://www.sqlservercentral.com/Forums/2000350/SQL-Server-2017-2012-Express-Edition-Insert-Select-Performance-Issue-with-very-less-data?PageIndex=1

Do the following:

1) Create a new database in SQL Server Developer 2017.

2) Use the new database.

3) Execute "script.sql" (takes 23 seconds), it will create 6 tables, 3 indexes and populate the data in the tables. Total data in all tables is around 10 MB. I provided "script.sql".

4) Then execute a test written by Grant Fritchey (SQLServerCentral.com Guru). File is "GrantFritchey_SSC_Guru_Test.sql" (takes 12 seconds) on the data in the new database.

The description of test created by Grant Fritcheyis:

1) Grant created a SELECT that returns 1967190 rows from these tables.

2) The result of the SELECT is stored in a real table, temp table and table variable.

Grants results (CPU times not mentioned by him):

Insert into Real table: elapsed time = 5 seconds.

Insert into Temp table: elapsed time = 1.011 seconds.

Insert into Table variable: elapsed time = 0.944 seconds.

My result:

Insert into Real table: CPU time = 8563 ms. Elapsed time = 9036 ms.

Insert into Temp table: CPU time = 1515 ms. Elapsed time = 1546 ms.

Insert into Table variable: CPU time = 1437 ms. Elapsed time = 1464 ms.

We can see that test results that Grant got is similar to result I got, "Insert into real table table" taking much longer than "Insert into temp table/table variable".

We can also see the elapsed time(9.036  seconds) of "Insert into Real Table" is approximately 6 times the elapsed time (1.546  seconds) of "Insert into temp table/table variable". Why this difference?

Reason given by SQLServerCentral(Gurus) for this difference was: "Insert into real table" is written to disk, where as "Insert into temp table/table variable"  is written to RAM. And writing to disk is much slower than writing to RAM. So there is an IO time difference.

I Agree.

Question is: Why is CPU time (8.563 seconds) in case of "Insert into real table" approximately 6 times the CPU time (1.515 seconds) of "Insert into temp table/table variable". As the SELECT and the underlying data is same the CPU times should be consistent across all three. Only difference should be in IO time. Any guess why CPU times are not consistent?

Please try running this test and share the CPU times and elapsed times of the Insert into real table vs insert into temp table/table variable.

Running this test and posting a reply should not take more than 5 minutes, as the files are really small, creating an empty new database and executing just 2 scripts will not take more than a minute.

Regards,

Sharat


Database Partitioning Sliding Window

$
0
0

Hi All,

Greetings!

I am working through a POC on SQL Server database partitioning (SW) and need some help, below is the partition function and schema (RIGHT RANGE) 

PRIMARY

<=YEAR1 (31/12/2014)

YEAR 2015

<=YEAR1 (31/12/2015)

YEAR 2016

<=YEAR1 (31/12/2016)

YEAR 2017

<=YEAR1 (31/12/2017)

MONTH 1

Jan

MONTH2

Feb

MONTH 3

Mar

MONTH 4

Apr

MONTH 5

May

MONTH 6

Jun

MONTH 7

Jul

MONTH 8

Aug

MONTH 9

Sep

MONTH 10

Oct

MONTH 11

Nov

MONTH 12

Dec

For the current year we are using monthly file as monthly partition. For next year Jan Partition will be merged in YEAR 2017 and will be reused for JAN 2018 and for all other files as we move ahead.

We have no issues merging the monthly files into the YEAR 2017 partition, but as we move along we like to move the monthly data from Year 2017 to 2016 to 2015 to PRIMARY partition

How can this be achieved


How to fix my table partition?

$
0
0

I have a table (e.g.) like below
MyTable:
    CountryID int,
    CityID int,
    CityBorder geography
PK: (CountryID, CityID) clustered.
I have Filegroups
   FG_000 (for all the small countries)
   FG_100 (for large country 100)
   FG_110 (for large country 110)
   FG_120 (for large country 120)
   ...
And I have Partition function
   CREATE PARTITION FUNCTION [fn_Parti_CountryId](int) AS RANGE LEFT FOR VALUES
(
    N'99', -- country id < 100  small ones
    N'100',
    N'109', -- Country id 101 to 109 small ones
    N'110',
    /* N'119',  */ -- country id 111 to 119 small ones But I missed it by mistake
    N'120,
    ....
)

and I have Partition scheme
CREATE PARTITION SCHEME [sche_Parti_CountryId] AS PARTITION [fn_Parti_CountryId] TO
(
  FG_000, -- 99 country id < 100  small ones
  FG_100,  -- Country 100
  FG_000,  -- country 101 to 109
  FG_110,  -- Country 110
  FG_000,  -- Meant for Country 111-119 but It mapped to Coutry 120 because my mistake in the function
  ....
)

How can I fix this?
TIA.
John

Always encrypted and management studio

$
0
0

According to the following links:

https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/configure-always-encrypted-using-sql-server-management-studio?view=sql-server-2017

I should have able to insert/select with where clause for encrypted column .While I am currently using SSMS 17.8.1

and enable Parameterization for Always Encrypted . And also added Column Encryption Setting=Enabled to connection properties

but still, I trying to do something like :

declare @inputname varchar(50)
set @inputname='Peter'
select * from  dbo.encryptedphone where name=@inputname

throw the following error.

Msg 33299, Level 16, State 6, Line 9
Encryption scheme mismatch for columns/variables '@inputname'. The encryption scheme for the columns/variables is (encryption_type = 'PLAINTEXT') and the expression near line '7' expects it to be (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'CEK_Auto1', column_encryption_key_database_name = 'AdventureworksLT') (or weaker).

why is that??

name is the encrypted column with deterministric function.

DPAPI returns TRUE but out parameter is empty

$
0
0

Hello !

It's the first time i am using DPAPI and i can't find my mistake over my code. Can someone enlight me please ?

Here is the code and the different outputs :

BOOL crypt(const char *in, char *out)
{
        //print "test" - correct
	Log(("in value = {%s}", in));
	BOOL isCrypt = FALSE;
	DATA_BLOB inBlob;
	DATA_BLOB outBlob;

	BYTE* pbDataInput = (BYTE*)in;
	DWORD cbDataInput = strlen((char*)pbDataInput) + 1;
	CRYPTPROTECT_PROMPTSTRUCT promptStruct;

	//Initialize inBlob
	inBlob.pbData = pbDataInput;
	inBlob.cbData = cbDataInput;

	//Initialize outBlob
	outBlob.pbData = NULL;
	outBlob.cbData = NULL;

	//Initialize promptStruct
	ZeroMemory(&promptStruct,sizeof(promptStruct));
	promptStruct.cbSize = sizeof(promptStruct);
	promptStruct.dwPromptFlags = CRYPTPROTECT_PROMPT_ON_PROTECT;
	promptStruct.szPrompt = L"No Prompt in particular";

        isCrypt = CryptProtectData(&inBlob, L"Encrypt data for user", NULL, NULL, &promptStruct, NULL, &outBlob);

        //Print 0 - no errors
	Log(("CryptProtectData returned error code : GetLastError = {%d}", GetLastError()));

        //Print 1 - function returned TRUE
	Log(("isCrypt = {%d}", isCrypt));

	memcpy(out, outBlob.pbData, outBlob.cbData);

        //Print nothing - out is empty
        //Same behavior when printing outBlob.pbData
	Log(("out = {%s}", out));

	return isCrypt;
}
		

Here it is. Does someone see something i would have missed ?

Gratefully.


What is Elapsed time, CPU time in SET STATISTICS TIME ON.

$
0
0

Hi Everyone,

I have a simple Question.

When we do SET STATISTICS TIME ON and run a query.

We get results like:

SQL Server Execution Times:
   CPU time = 5672 ms,  elapsed time = 5867 ms.

As I understand:

elapsed time = CPU time + IO time.

IO time = IO time (read) + IO time (write) + network time.

Is my understanding correct?

Regards

Sharat K Gupta


What is elapsed time in return from Set Statistics Time

$
0
0
I have the following message when I run a simple query "Select Distinct Orderids from tblOrders"
CPU time = 47 ms, elapsed time = 1692 ms.

Other elasped times within the last 18 hours include 3198 ms, 5189 ms and 8698 ms, and even over 11,000 ms. The CPU time is always between 35 ms and 50 ms. So we need to know what is the cause of this other elapsed time. Is it the network? Is it SSMS? Is it something else on the server? Does anyone have any ideas? Does anyone have any idea how we can check this with only DB_owner rights on some of the databases on the server?

Edward R. Joell MCSD MCDBA


Troubleshooting Deadlock, Victim holding on to shared lock

$
0
0
I am trying to troubleshoot the below deadlock situation
[![enter image description here][1]][1]

Looking at the deadlock xml, both session are using read committed isolation level.
Question is, in read committed isolation level, in this situation, why is the victim holding on to the shared lock?  My understanding and I just tested it, is that while reading tables, it would acquire shared lock on page/row level and then release it immediately.  In what situation in read committed isolation level, would a session want to hold on to shared lock on page that it had acquired?

All the locks are on a nonclustered index on a table.
<deadlock><victim-list><victimProcess id="process11634c19088" /></victim-list><process-list><process id="process11634c19088" taskpriority="0" logused="0" waitresource="PAGE: 11:13:52372905 " ownerId="57900000774" transactionname="SELECT" lasttranstarted="2018-10-12T09:48:05.360" XDES="0x3e7feedc00" lockMode="S" schedulerid="12" kpid="8544" status="suspended" spid="72" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2018-10-12T09:48:05.360" lastbatchcompleted="2018-10-12T09:48:05.377" lastattention="1900-01-01T00:00:00.377" clientapp=".Net SqlClient Data Provider" hostname="hostname1" hostpid="6912" loginname="ENETTAD\SVC_APP" isolationlevel="read committed (2)" xactid="57900000774" currentdb="11" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056" databaseName="database1"><executionStack><frame procname="database1.dbo.uspBatch_Search" line="88" stmtstart="5068" stmtend="7128" sqlhandle="0x03000b00fad68c201937da0036a9000001000000000000000000000000000000000000000000000000000000">
    SELECT @TotalRowCount = COUNT(*)    
      FROM dbo.Batch     
      JOIN #child ce    
       ON ce.ECN = requestednce    
      WHERE BatchId = ISNULL(@BatchId, BatchId)    
       AND RequestedUsername = ISNULL(@RequestedUsername, RequestedUsername)    
       AND requestednce = ISNULL(@requestednce, requestednce)    
       AND BatchStatusId = ISNULL(@StatusId, BatchStatusId)    
       AND BatchStatusId != @NewStatusId   and  BatchStatusId != @CancelledStatusId    
       AND (  (@IsReportRequired = @true AND ReportBlobId IS NOT NULL)     
       OR (@IsReportRequired = @false))    
       AND ( (     
       (@DateType = @CreatedDate AND CreatedDate BETWEEN cast(@FromDate AS varchar(20)) AND cast(@ToDate AS varchar(20)) )    
        OR     
       (@IncludeCurrent = @true AND ( BatchStatusId IN (@QueuedStatus,@InProgressStatus,@ReportingStatus)     
          OR     
           CompletedDate BETWEEN cast(@FromDate AS varchar(20)) AND cast(@ToDate AS varchar(20)))  )    
      )     
      OR @DateType = @IgnoreDateRange    </frame><frame procname="adhoc" line="1" stmtstart="386" sqlhandle="0x01000b005101d12e207be87f2100000000000000000000000000000000000000000000000000000000000000">
    EXEC @RETURN_VALUE = [dbo].[uspBatch_Search] @ECN = @p0, @BatchId = @p1, @requestednce = @p2, @RequestedUsername = @p3, @DateType = @p4, @FromDate = @p5, @ToDate = @p6, @StatusId = @p7, @IsReportRequired = @p8, @IncludeCurrent = @p9, @StartRowIndex = @p10, @SortExpression = @p11, @MaximumRows = @p12, @TotalRowCount = @p13 OUTPUT    </frame><frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
    unknown    </frame></executionStack><inputbuf>
    (@p0 int,@p1 int,@p2 int,@p3 varchar(8000),@p4 varchar(8000),@p5 datetime,@p6 datetime,@p7 int,@p8 tinyint,@p9 bit,@p10 int,@p11 varchar(8000),@p12 int,@p13 int output,@RETURN_VALUE int output)EXEC @RETURN_VALUE = [dbo].[uspBatch_Search] @ECN = @p0, @BatchId = @p1, @requestednce = @p2, @RequestedUsername = @p3, @DateType = @p4, @FromDate = @p5, @ToDate = @p6, @StatusId = @p7, @IsReportRequired = @p8, @IncludeCurrent = @p9, @StartRowIndex = @p10, @SortExpression = @p11, @MaximumRows = @p12, @TotalRowCount = @p13 OUTPUT   </inputbuf></process><process id="process2e950984e8" taskpriority="0" logused="10880" waitresource="PAGE: 11:13:14044552 " waittime="241" ownerId="57900000848" transactionname="user_transaction" lasttranstarted="2018-10-12T09:48:05.367" XDES="0xf7c3c0c3b0" lockMode="IX" schedulerid="2" kpid="5476" status="suspended" spid="234" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2018-10-12T09:48:05.370" lastbatchcompleted="2018-10-12T09:48:05.367" lastattention="1900-01-01T00:00:00.367" clientapp=".Net SqlClient Data Provider" hostname="hostname1" hostpid="6912" loginname="ENETTAD\SVC_APP" isolationlevel="read committed (2)" xactid="57900000848" currentdb="11" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056" databaseName="database1"><executionStack><frame procname="database1.dbo.uspBatch_Update" line="32" stmtstart="1934" stmtend="2586" sqlhandle="0x03000b00b243467b8df206000ba7000001000000000000000000000000000000000000000000000000000000">
    UPDATE Batch      
    			SET  BatchStatusId = @BatchStatusId,      
    			ReportBlobId = @ReportBlobId,      
    			CompletedDate = @CompletedDate,    
    			ImportReportVersion = @ImportReportVersion,    
    			ExportReportVersion = @ExportReportVersion,  
    			ErrorCode = @ErrorCode  
    			WHERE BatchId  = @BatchI    </frame><frame procname="adhoc" line="1" stmtstart="236" sqlhandle="0x01000b009c24d728c05a7d06ab00000000000000000000000000000000000000000000000000000000000000">
    EXEC @RETURN_VALUE = [dbo].[uspBatch_Update] @RequestId = @p0, @BatchId = @p1, @BatchStatusId = @p2, @ReportBlobId = @p3, @CompletedDate = @p4, @ErrorCode = @p5, @ImportReportVersion = @p6, @ExportReportVersion = @p7    </frame><frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
    unknown    </frame></executionStack><inputbuf>
    (@p0 uniqueidentifier,@p1 int,@p2 int,@p3 varchar(8000),@p4 datetime,@p5 int,@p6 int,@p7 int,@RETURN_VALUE int output)EXEC @RETURN_VALUE = [dbo].[uspBatch_Update] @RequestId = @p0, @BatchId = @p1, @BatchStatusId = @p2, @ReportBlobId = @p3, @CompletedDate = @p4, @ErrorCode = @p5, @ImportReportVersion = @p6, @ExportReportVersion = @p7   </inputbuf></process></process-list><resource-list><pagelock fileid="13" pageid="52372905" dbid="11" subresource="FULL" objectname="database1.dbo.Batch" id="lock9f21680580" mode="IX" associatedObjectId="72060857777979392" databaseName="database1"><owner-list><owner id="process2e950984e8" mode="IX" /></owner-list><waiter-list><waiter id="process11634c19088" mode="S" requestType="wait" /></waiter-list></pagelock><pagelock fileid="13" pageid="14044552" dbid="11" subresource="FULL" objectname="database1.dbo.Batch" id="lock1506883db00" mode="S" associatedObjectId="72060857777979392" databaseName="database1"><owner-list><owner id="process11634c19088" mode="S" /></owner-list><waiter-list><waiter id="process2e950984e8" mode="IX" requestType="wait" /></waiter-list></pagelock></resource-list></deadlock>


  [1]: https://i.stack.imgur.com/qmwwE.png

linked servers test connection is ok but can't query data

$
0
0

hello,

i have 2 sql server 2014 instances which i want to link: server1 and server2. database 'db1' with data i want to query is on server1. i created user 'linked_srv' on both servers with the same password. on server1 i mapped user to 'db1' and add select permission to view 'v1'. on server2 i created new linked server with the following properties:

name: sever1
server type: sql server native client 11.0

and chosen security:

be made using this security context; remote login and password is the same as 'linked_srv' login on both servers.

test connection is successful but there are no objects in server2 catalogs under the linked servers. when i run query:

select * from server1.db1.dbo.v1 

i get the following message:

The OLE DB provider "SQLNCLI11" for linked server "server1" does not contain the table ""db1"."dbo"."v1"". The table either does not exist or the current user does not have permissions on that table.

what am i doing wrong or missing?

thanks in advance

How to Init-cap the characters in SQL server in SQL query without creating any function?

$
0
0
Hello Everyone,

There is a question raised by kiran.rajenimbalkar on SQLServerCentral.com, link is:

https://www.sqlservercentral.com/Forums/1998921/Initcap-the-characters-in-SQL-server?PageIndex=2

Question is: How to Init-cap the characters in SQL server in SQL query without creating any function?


If OBJECT_ID('abc','U') Is Not Null Drop Table abc GO create table abc (Month_Name nvarchar(10)) GO INSERT INTO abc VALUES ('APRIL'); INSERT INTO abc VALUES ('AUGUST'); INSERT INTO abc VALUES ('DECEMBER'); INSERT INTO abc VALUES ('FEBRUARY'); INSERT INTO abc VALUES ('JANUARY'); INSERT INTO abc VALUES ('JULY'); INSERT INTO abc VALUES ('JUNE'); INSERT INTO abc VALUES ('MARCH'); INSERT INTO abc VALUES ('MAY'); INSERT INTO abc VALUES ('NOVEMBER'); INSERT INTO abc VALUES ('OCTOBER'); INSERT INTO abc VALUES ('SEPTEMBER'); GO

 SSC laurie-789651 replied:

SELECT UPPER(LEFT(Month_Name,1)) + LOWER(SUBSTRING(Month_Name,2,8))
FROM abc


jonas.gunnarsson 52434 replied:

-- Alter the dbo.abc table with Id.
declare @abc table (
    Id int not null primary key,
    Month_Name nvarchar(10) not null
    );

-- Insert all month
set language US_English;
declare @i int = 1;
declare @MonthName nvarchar(10);
while @i <= 12
begin
    select @MonthName = upper(datename(month , dateAdd(month, @i, -1)));
    insert @abc(Id, Month_Name)    values (@i, @MonthName);
    set @i += 1;
end

-- Use a select to get the propername, in current language.
set language US_English;
select Id,
    Month_Name,
    dateName(month, dateAdd(month, Id, -1)) as ProperMonthName
from @abc
order by Month_Name asc;

Joe Torre replied:

USE Jic
GO
CREATE TABLE dbo.abc (Month_Name nvarchar(10) NOT NULL PRIMARY KEY)
GO
INSERT dbo.abc ( Month_Name )
VALUES (N'APRIL')
     , (N'AUGUST')
     , (N'DECEMBER')
     , (N'FEBRUARY')
     , (N'JANUARY')
     , (N'JULY')
     , (N'JUNE')
     , (N'MARCH')
     , (N'MAY')
     , (N'NOVEMBER')
     , (N'OCTOBER')
     , (N'SEPTEMBER') ;
CREATE TABLE dbo.ProperMonths (ProperMonthName nvarchar(9) NOT NULL PRIMARY KEY);
GO
INSERT dbo.ProperMonths ( ProperMonthName )
VALUES ( N'April')
     , ( N'August')
     , ( N'December')
     , ( N'February')
     , ( N'January')
     , ( N'July')
     , ( N'June')
     , ( N'March')
     , ( N'May')
     , ( N'November')
     , ( N'October')
     , ( N'September') ;
SELECT a.Month_Name
     , p.ProperMonthName
FROM dbo.abc a
JOIN dbo.ProperMonths p ON a.Month_Name = p.ProperMonthName COLLATE Latin1_General_CI_AI;
DROP TABLE dbo.abc;

My Solution:

Select *, LEFT(Month_Name,1) + Lower(RIGHT(Month_Name,LEN(Month_Name) - 1))
From abc

What do think which is the best solution?

Regards,

Sharat K 


Changing the password on a SQL Service Account

$
0
0
I know for a fact that the Best Practice for changing a SQL Service account is to use the SQL Server Configuration Manager. However, my question is if I am onlychanging the password do I have to use SSCM? Can I use a third party application?

SQL Server Alert System: 'Severity 016' occurred on \\SQLSERVER1

$
0
0

Good Day Everyone,

I keep getting this error on my SQL Server on average by the hour. This is a SQL2014 server with the latest sp (virtual).

DESCRIPTION:   TCP connection closed but a child process of SQL Server may be holding a duplicate of the connection's socket. Consider enabling the TcpAbortiveClose SQL Server registry setting and restarting SQL Server. If the problem persists, contact Technical Support.

I verified no antivirus is causing the issue. I verified CPU, memory everything in tact. Server is behaving normal for clients except our middle tier agent and web servers disconnect every once in a while but it does not align with every instance this error occurs. Any assistance or words of wisdom would be appreciated.

Have a pleasant day.

Best,

Frank


A SQL Server MVP or MSFT Eng should be replying soon as well. Hope this helps. Frank Garcia *** Please select "Vote As Helpful" if the information provided was helpful to you. If an answer to your issue solved the problem then please mark it as"Propose As Answer" located at the bottom. Thank you. ***

Restore of transaction logs in SQLServer 2014 is soooo slow. Need some urgent help please.

$
0
0

Hi SQL Server Gurus,

New DBA for SQL Server here need some urgent help.

I have a 800GB database and i'm trying to rebuild the Secondary Node which was down due to some issue. We have full DB backup and it takes around 9 hours to complete and the restore of the full DB backup takes around 10 hours.


   Command: 
    restore database [dbname] 'C:\temp\fulldbbackup.bak' with norecovery, stats

However, the transaction log backups continuously running and i need to apply it into the Secondary node (which is in Norecovery Mode). The transaction logs generated for the 10 hours is around 7GB only. The 7GB transaction log will take me 11 hours as well. Is it so slow!!!!!!!!!!!!!!!!!!!!

   here's the command i used: (there are around 100 files)

RESTORE LOG DBName from DISK = 'C:\temp\DBName\trans_log_2018_06_07_051003_6924971.trn' WITH NORECOVERY,STATS
RESTORE LOG DBName from DISK = 'C:\temp\DBName\trans_log_2018_06_07_052002_5593358.trn' WITH NORECOVERY,STATS
RESTORE LOG DBName from DISK = 'C:\temp\DBName\trans_log_2018_06_07_054003_8381476.trn' WITH NORECOVERY,STATS
RESTORE LOG DBName from DISK = 'C:\temp\DBName\trans_log_2018_06_07_055004_4179314.trn' WITH NORECOVERY,STATS
RESTORE LOG DBName from DISK = 'C:\temp\DBName\trans_log_2018_06_07_061007_9681859.trn' WITH NORECOVERY,STATS


My inquiries are:

  1. Why it's sooooo slooww restoring the Transaction log.
  2. How can i query in secondary node the what have been processed or log applied.
  3. How can i make this restore faster? i've been working on this the last 4 days.

Need some help please., Windows 2012R2, SQLserver 2014.

NOTE: i can only stop the Database but not the instance as there are several databases running.

Thanks,


full text indexed down

$
0
0
I have a database which is the subscriber froma transactional replication sql2000 (publisher and subscriber db) windows 2000 server cluster
the full text indexing has failed. the text index properties on all tables are greyed out.
the full text catalogs are empty.

the command

exec

 

 

 

 

sp_fulltext_databaseN'enable'

fails with the following message:

Msg 7619, Level 16, State 1, Procedure sp_fulltext_database, Line 46

Execution of a full-text operation failed. The parameter is incorrect.

the microsoft search sevice is running (I restarted it just to be sure)
how can I get the functionality up and running again?

What is the purpose of Transaction Log in Tempdb

$
0
0

Hi Experts,

There are a lot of questions and blogs on truncating and reducing the transaction log of tempdb. But what I understand is that the purpose of transaction log is to recover database (on restarting of instance and on database restore), restore upto point in time, and high availability (mirroring, log shipping, and replication) and none purpose is applicable to tempdb. So why a lot of resources wasted in making and saving the transaction log of tempdb?

Thank you.

Code in Standard vs Processor SQL Server 2012

$
0
0

Hi all

I am planning on a SQL Server upgrade but I have the following questions........

Am I correct in assuming that there is no difference between SQL Server 2012 standard and processor, they are both the same, you don't install one version as opposed to the other depending on what licence you have?

Also how do you determine if the key have is standard or processor? or does it not matter, so if you purchase a processor licence but install with a standard key, it makes no difference?

Any light shed on these 2 would be most welcome.

Thanks

Kev




Code: 0xC002F210

$
0
0

Hi All,

Error: 2011-01-25 07:00:58.03
   Code: 0xC002F210
   Source: Update Statistics Task Execute SQL Task
   Description: Executing the query "UPDATE STATISTICS [dbo].[INVESTMENT_TRANSACTION_AL..." failed with the following error: "A severe error occurred on the current command.  The results, if any, should be discarded. A severe error occurred on the current command.  The results, if any, should be discarded.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

from the above error message, please explain the following:

1) Code: 0xC002F210
2) A severe error occurred on the current command.  The results, if any, should be discarded. A severe error occurred on the current command

Thanks,
Satish Kumar.

Thanks, Satish Kumar.

Unable To Install Database Engine

$
0
0

From last one week i am installing and unistalling sql server in windows 10 but is always showing an two three messages while installing 1.Attemp to perform unauthorized access 2. SSIS exception 

Than at last data base engine failed ,Rs failed,DQ ,FullText,Replication,IS all are failed 

Detail File :

(01) 2018-10-06 17:29:16 Slp: Prompting user if they want to retry this action due to the following failure:
(01) 2018-10-06 17:29:16 Slp: ----------------------------------------
(01) 2018-10-06 17:29:16 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
(01) 2018-10-06 17:29:16 Slp: Inner exceptions are being indented
(01) 2018-10-06 17:29:16 Slp: 
(01) 2018-10-06 17:29:16 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
(01) 2018-10-06 17:29:16 Slp:     Message: 
(01) 2018-10-06 17:29:16 Slp:         Attempted to perform an unauthorized operation.
(01) 2018-10-06 17:29:16 Slp:     HResult : 0x84bb0001
(01) 2018-10-06 17:29:16 Slp:         FacilityCode : 1211 (4bb)
(01) 2018-10-06 17:29:16 Slp:         ErrorCode : 1 (0001)
(01) 2018-10-06 17:29:16 Slp:     Data: 
(01) 2018-10-06 17:29:16 Slp:       WatsonData = netfxperf.dll@OpenPerformanceData@CollectPerformanceData@ClosePerformanceData
(01) 2018-10-06 17:29:16 Slp:       DisableRetry = true
(01) 2018-10-06 17:29:16 Slp:     Inner exception type: System.UnauthorizedAccessException
(01) 2018-10-06 17:29:16 Slp:         Message: 
(01) 2018-10-06 17:29:16 Slp:                 Attempted to perform an unauthorized operation.
(01) 2018-10-06 17:29:16 Slp:         HResult : 0x80070005
(01) 2018-10-06 17:29:17 Slp:         Stack: 
(01) 2018-10-06 17:29:17 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.LoadPerformanceCounter(String symbolInstallPath, String counterPrefixServiceName)
(01) 2018-10-06 17:29:17 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounterCore(String libraryFileName, String openFunction, String collectionFunction, String closeFunction, String symbolInstallPath, String counterPrefixServiceName)
(01) 2018-10-06 17:29:17 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounter(String libraryFileName, String openFunction, String collectionFunction, String closeFunction, String symbolInstallPath)
(01) 2018-10-06 17:29:17 Slp: ----------------------------------------
(01) 2018-10-06 17:30:53 Slp: User has chosen to cancel this action
(01) 2018-10-06 17:30:53 SSIS: ERROR: Failed to set up SSIS service performance counters. Exception: Microsoft.SqlServer.Configuration.Sco.ScoException: Attempted to perform an unauthorized operation. ---> System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

what to do next 

Viewing all 15872 articles
Browse latest View live


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