Script out a single login including its database user info
Hi,I looked around for a script which can give the CREATE LOGIN .. CREATE USER .. script for a single login. Like you already have a login in sql & just want to script it out, the SSMS, rt click,...
View ArticleCould not allocate space for object 'dbo.SORT temporary...' when create undex
This is how tempdb looked like: TempDB: data: 12,393 MB;By 500 MB, Unlimited;G:\tempdb data: 12,370 MB;By 500 MB, Unlimited;G:\tempdb data: 11,731 MB;By 500 MB,...
View ArticleSQL Agent WMI Alert for file exist on remote server location
I have a SQL Agent Job that needs to be run only when there is a file existence on some remote server location that is shared like (\servername\foldername).I Was trying to use WMI Alert in SQL Agent...
View ArticleSQL Server 2012 restore back up of a database to a different computer
How best to restore a back up of a database to a different computer. Can we simply copy the back-up files (.bak) and paste/move it to the default back up folder of the other computer and restore to the...
View ArticleWhy it is not using more CPUs?
Hi experts, I have 2 queries…#1Select * from View.It takes 15 seconds to execute, and I see the query plan, everything has the parallelized icon...
View Articlewhy is sp_rename warning me when I rename tables?
I'm using sp_rename to rename some tables in a production job. I really don't need it to issue warnings every time it's called. Maybe that made some kind of sense in SQL Server version 4.21, but why is...
View Articleexplanation of OPTION RECOMPILE needed on OPTION (RECOMPILE)
Hi all,I've a stored procedure that uses the OPTION (RECOMPILE) clause. I expect that every time the stored is been executed, its plan is being recalculated and re-cached (correct me if I'm wrong).What...
View ArticleAfter creating contained user, existing connections fail to re-login
Please bear with me if this seems like its off topic due to some part of the sample being ADO.Net. I believe the problem is in the Database engine since all clients fail. It seems like after a...
View ArticleEncrypting a Column
Hi Guys,I am trying to encrypt a column in MSSQL Server table and I noticed SQL Server assign unique encryption key even when some rows have a matching value.For instance,.Card_Number...
View ArticleHow Far Back Can a SQL Server Backup Be Restored?
Does each version of SQL Server have a limit on how old a backup file can be and can still be restored?In other words, can a database backup file from SQL 6.5 be restored on a SQL 2016 instance?Dan...
View ArticleAnyone knows the meaning of the LOP_SET_FREE_SPACE etc?
Hi All,I am trying to figure out what operations caused the log grown so large, I used below query: SELECT Operation, Context, count(*) FROM fn_dblog (NULL,NULL) group by Operation,...
View ArticleDowngrade SQL Server 2014
Currently SQL Server 2014 running with enterprise MSDN license and we need to downgrade into standard edition sql2014. can I do it without touching the SSRS reports at all...???I was thinking to follow...
View ArticleUnique key constraint error, SQL Server 2008 r2
I have found discussion of a hotfix to address a "unique key constraint" error. Unfortunately, the hotfix applies to 2008 SP1. Can anyone lead me to a solution for 2008 r2?The error occurs after...
View ArticlePerformance issue.
I'm having weird performance issue in one of the database. There is a nightly data transfer process that transfers data from Oracle to SQL Server table. MERGE statement is used that uses conditional...
View ArticleRenaming the Server
Hi everyone, I am installed SQL Server 2012 SP3 on Windows Server 2012 R2. I restored the backup from another Server which is running SQL 2008 R2. Now the requirement is to change the host name of the...
View ArticleMoving a SQL Server database to a SQL Server 2014 in cluster
Hi,I need to plan the moving of some databases from a SQL Server 2012 machine into a new SQL Server 2014 in cluster.Can I simply do a backup to restore on the cluster as it was executed between tra un...
View Articlesql server Deadlock/Time out error
Dear sir We are doing this way..thus we are getting Deadlock/Time out error is any other option DELETE FROM <Table> WHERE AirlinesId = @AirlinesId AND Origin = @Origin AND Destination =...
View ArticleAborted statments complete after timeout send from application
On SQL 2012 SP3 EE,I see that when my application send timeout (after 30 seconds the query doens't return from SQL) the SQL gets the abort (in the profiler trace I see 2 - Aborted in the Error column)...
View ArticleSQL Server is not starting up
Hi All,SQL Server services are not starting up and giving the below error,although we have enough space on all drives of the server2016-01-30 18:35:36.20 spid9s Error: 17207, Severity: 16, State: 1....
View ArticleSSMS stopped working after upgrading from windows 7 home premium to windows 10
I am getting ''a problem has caused the program to stop working correctly.Windows will close the program and notify you if a solution is available''
View Article