I have a big delete operation, then while deleting the server went on a restart.
When opening the server again, I got the database In Recovery mode.
What is the solution?
I have a big delete operation, then while deleting the server went on a restart.
When opening the server again, I got the database In Recovery mode.
What is the solution?
SQL Server 2008 R2 - 64 Bit
Version: 10.5.4260 (SP2 CU1)
OS: Windows Server 2008 R2 Enterprise 64 bit SP1 With Hotfix 2679255 installed
SQL Server Trace flag 8903 enabled
In the environment described above, we are sometimes experiencing the following error when restoring databases from backup:
SetFileIoOverlappedRange failed, GetLastError is 1314
Per blogs, forum posts, etc. (see the bottom of this post), I was under the impression that this error is fixed with SQL Server 2008 R2 in conjunction with Windows hotfix 2679255 and SQL Server Trace flag 8903. Yet this error still occurs.
Has anyone else seen this error AFTER updating to SP2 / T8903 / 2679255?
I realize that we can work around the issue by turning off T8903, but I'd still like to understand why this isn't working- seems like we have everything we need in place.
Any help appreciated!
Thanks,
Vince
Background posts:
I have a full text catalog defined on 2 VARCHAR columns of a single table. It works well except for a few words where indexation seems to cut the term where an accent is found. It doesn't do it for all accentuated words, only a minority of them. As a result,
querying on these exact terms won't return any result but querying on accent-stripped parts of them will work.
select mycolumn from mytable where Id = 2028
mycolumn
------------------------------
<P>Anaïs et Alizé</P>
select * from sys.dm_fts_index_keywords_by_document(DB_ID(),Object_iD('mytable'))where display_term like 'Anaïs%' or display_term like 'Alizé%'
keyword display_term column_id document_id occurrence_count
--------------------------------------------------------------------------------------------------
(no results)
select * from sys.dm_fts_index_keywords_by_document(DB_ID(),Object_iD('mytable'))where display_term like 'Ana%' or display_term like 'Aliz%'
keyword display_term column_id document_id occurrence_count
-------------------------------------------------------------------------------------------------------------------------
0x0061006C0069007A aliz 22 20259 1<== notice amputated words here
0x0061006E0061 ana 22 20259 1<== and there
I tried both to repopulate the index manually and rebuild it to no avail.
The odd thing is, we have a similar database on another server with the same data and exactly the same fulltext configuration and the complete words do appear in terms referenced by that index :
select * from sys.dm_fts_index_keywords_by_document(DB_ID(),Object_iD('mytable'))where display_term like 'Anaïs%' or display_term like 'Alizé%'
keyword display_term column_id document_id occurrence_count
---------------------------------------------------------------------------------------------------------------------
0x0061006C0069007A0065 alize 22 20259 1
0x0061006E006100690073 anais 22 20259 1
Environment details :
- Microsoft SQL Server 2008 (SP3) - 10.0.5828.0 (X64) Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
- Server Collation : SQL_Latin1_General_CP1_CI_AI
- Catalog - Accent Sensitive : false,
- Language for Word Breaker : French for both columns
- Catalog track changes : Automatic
- Catalog Stoplist : SYSTEM
Has anyone experienced anything like this ?
Thanks for your help
In a 2 node Availability Group with tcp and named pipe protocols enabled, how can you get named pipes to work ?
Say for example I have a Windows cluster called DEVL with 2 nodes DEVLA and DEVLB with an availability group listener called DEVLS.
All 4 have IP addresses(DEVL, DEVLA, DEVLB, DEVLS).
In a traditional cluster(before Availability Groups) we would specify the virtual node name when configuring the named pipe. The windows cluster would then determine which node was the active node(active/passive configuration).
Now, in a non-shared storage availability group we have 2 separate sql server instances and we connect to the listener name. The listener is configured with 2 tcp endpoints(default port 5022). It appears to not know anything about named pipe protocol as the listener is configured to use tcp.
If we setup a named pipe alias to use the windows cluster name, it will point to which ever node is the active node in the cluster. This might not be the primary replica pointed to by the listener. i.e. The cluster could be active on the DEVLB node and the listener points to the primary replica which is on the DEVLA node.
If we setup a named pipe alias to use the DEVLA or DEVLB node names, it of course points to just those physical nodes whether they are the primary replica or not.
If we setup the named pipe alias to utilize the availability group listener name(DEVLS), it just hangs and never connects. Both nodes have named pipe endpoints configured with public access and hadr_endpoint endpoints using tcp for the sql server service login.
The error we receive when we try to connect to the listener through named pipes is:
error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, error: 2)
Is there something we missed ? Do we need to setup named pipe endpoints somehow to 5022 ?
Greetings! I've installed and successfully configured our SQL 2012 AlwaysOn 2-node servers for our new "Intranet" that is coming out. I've gotten AlwaysOn working great, and our Front End servers for the Intranet will be using SharePoint 2013. The glitch is that SharePoint 2013 is configured to add databases automatically to our SQL Server 2012 back end, but NOT to AlwaysOn. In reading about this and in contacting Microsoft MSDN support, the default answer is "you must manually find, select, back-up and then add those new databases individually to get them into AlwaysOn."
But wait; that can be quite a task, constantly checking the SQL Back-end servers to see what databases were created, then having to add them into AlwaysOn, 7/24! I'm looking for a script or process that will check for new databases, back those new databases up in FULL mode, (for being added to AlwaysOn, of course) then add those databases to AlwaysOn, all automatically. Or have this run every...1-2 hours? (without user intervention)
What I've come up with so far is this script that actually identifies the newly-added databases, (not yet in AlwaysOn), and then backs them up to a shared location. My next task is to find those newly-added databases and through the various processes needed, get them added to AlwaysOn. This will involve some sort of looping action, I imagine. I'm not a T-SQL/scripting guru; is there any solution or script that I might access that would do this? (add databases to AlwaysOn automatically)?
Please advise, I'm sure I'm not the first person to have this issue. I have seen previous posts on various Internet Sites, and the solution is "sure, go ahead and just script that!". Thanks, but I need just a little more detail there.
Thanks again,
-Allen
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
-- specify database backup directory
SET @path = '\\atel-web-be2\backups\'
DECLARE db_cursor CURSOR FOR
select name from sys.databases
where group_database_id is null and replica_id is null and name not in('master','model','msdb','tempdb')
OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
SET @fileName = @path + @name + '.BAK'
BACKUP DATABASE @name TO DISK = @fileName
FETCH NEXT FROM db_cursor INTO @name
END
CLOSE db_cursor
DEALLOCATE db_cursor
We have a SQL server which has 24 GB RAM that runs slowly when doing a big SSIS package run (last about 4 hours). I see Page Life expectancy is very low , it goes down to 7 when the packages are running, when it is not running the server shows 25000 PLE. I think it is under memory pressure when the packages run. But the developer says the PLE could be a bit of false alarm where ETL concerned, They ran about 100 packages each night, most of thos 100 packages access different data set. So they think most of the packages don't reuse any cached data the previous pacakges users.
So why the PLE is so slow when the Packages run?
Thanks
SQLFriend
I have heard rumors that calling a stored procedure runs a little faster if you specify the schema, as in "exec dbo.mysp".
We have an app that is sending commands to SQL Server as RPCs, judging by the profiler. The textdata field *shows* as "exec mysp". Is there any speedup available by somehow specifying the schema as dbo? Exactly how is it likely that would be done in the app, in C#?
Thanks,
Josh
Had the case a few days ago I get an email about a job that failed. Although the name looked familiar, after taking a look at the server, I concluded it was not something I had worked on. What are some ways I can tell who created the job and when?
Can I get a script that can give me the details of :
Login Name-->User Name-->Permission-->database Name
Which database login is mapped to which databases and what permission are mapped.
Thanks
On our dev system, the trace flags 1204 and 1222 are on, deadlocks are detected and resolved, the reports appear nicely in the profiler, but they are not appearing in the system log. SQL 2008 not R2, 64 bit standard edition.
Also the system health event seems to have died in January, I'm just looking into that now, could it be related?
Thanks.
Josh
Hi,
We migrated our sql server instances that are mix of 2005, 2008, 2008 r2 (standard, enterprise) from physical to virtual. We have UCS in our data centre. In VM environment we are sharing CPU. Our licenses based on per cpu.
My question is:
For any new sql server or instance installation, should I use standard or enterprise edition of sql server. Which one will help to save money? I think enterprise edition is move expensive but gives benefits in vm environment when we have multiple instances on one server (vm).
Please help.
Thanks
Hi,
Newbie question. if this is not the right forum, let me know (I'm sure someone will!) SQL SERVER 2012 - I cannot create a foreign key. Error is:
Unable to create relationship 'FK_tblPersonnel_tblCompany'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_tblPersonnel_tblCompany". The conflict occurred in database "WellService2_BE", table "dbo.tblCompany", column 'CompanyPK'.
Problem is, I cannot find the constraint at all - see query output attached. Looked at every key, index, constraint - cannot find one with that name. CompanyPK is the primary key in tblCompany
Thank you -
Hi all,
I am unable to get the Indian Standard DateTime without based on System DateTime in sql server 2008 r2.
Can you please solve my problem.
Thanks in advance
I have a SQL server database using SQL Server 2008.
I had an update performance issue and found that it block by a stored procedure select SQL.
I put with (NOLOCK) on the stored procedure and the issue is resolved.
My question is should I have NOLOCK every where on the entire application and what will be impact, will my database have better performance if I have NOLOCK every where in the database stored procedures?
I learn use SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED can have entire database NOLOCK for all select clause.
I did it on my database, but I do not see any improvement for the database application.
Your information and help is great appreciated,
Regards,
Souris,
Hi, I am using http://ola.hallengren.com/, but I got an error when I schedule this in sql agent job. it says:1 Incorrect syntax near 'sde', can anyone help, I would exclude the index optimize for database -sde.
The code is:
sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d DBA -Q "EXECUTE [dbo].[IndexOptimize] @Databases = ' USER_DATABASES', -sde,@UpdateStatistics = 'ALL',@OnlyModifiedStatistics = 'Y',@LogToTable = 'Y'" -b
SQLFriend
Hello everyone, I am having a bit of an issue with SQL Server 2008, I am trying to know why my queries are not working correctly.
They only affect the first 299 rows or so, even if I do a "SELECT * FROM tableName" it returns an incomplete result, if I want to update and set one field to a single value, same thing happens.
Do you have any ideas of why this could be?
Thanks in advance;
Kindly, E
I have a table that gets inserted into several times a day. The current archive process thats in place does not include this table and it has almost a million rows in it, along with several indexes.
Which could likely be the culprit for poor insert times, the indexes or the fat that its a large table?
I have been having a problem with a third party tool we are using to do farm backups on Sharepoint. It is backing up the WFEs and app servers fine using VSS.. but when it comes time to backup the sql servers the SQLServerWriter keeps dying on me. It keeps going into a state of
Writer name: 'SqlServerWriter'
Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Instance Id: {7d547239-0f1f-4a37-be21-5873db2ecf49}
State: [8] Failed
Last error: Inconsistent shadow copy
When I restart the service/server the error clears .. but it never lets me do a backup of any of the database components in the Application logs I get errors like this
Preparing for backup
Preparing for backup complete!
Status of writer SqlServerWriter: Stable
Doing snapshot set...
Snapshot set complete!
Time to do snapshot set: 1.014 seconds
Status of writer SqlServer Writer: FailedAtPrepareSnapshotExcepetion type: Idera.Poinbackup.Shared.PBException
Message: Status of writer SqlServerWriter: FailedAtPrepareSnapshot
When I do a list shadows I see a shadow of that operation. but on the list writers I still get
Writer name: 'SqlServerWriter'
Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Instance Id: {7d547239-0f1f-4a37-be21-5873db2ecf49}
State: [8] Failed
Last error: Inconsistent shadow copy
My sharepoint databases are on a clustered server with 2 hosts.
We have the same setup on development and that works fine with no errors being produced. I have checked that sqlserverwrite is running as the localsystem and that that account is sysadmin on the sql server. I've tried deleting the existing shadows, failing over to the othernode, rebooting servers... but so far I am getting no luck and the vendor is stumped. I have tried uninstalling and reinstalling the app just in case it was a corrupt install.. but that didn't get me anywhere either. I was thinking about reregistering the vss components and I have seen a bunch of somewhate different posts on what to re-register.. so I was hoping one of you guys could point me at something relevant to my situation.
Thanks for any replies in advance!