We’re rewarding the question askers & reputations are being recalculated! Read more.
4

For SQL Server 2016+, you can use AT TIME ZONE. It will automatically handle the day light saving times.


4

The accepted answer states "Auto close on" is a likely culprit but doesn't state why and doesn't list other possibilities. This is perfectly documented behaviour and the reasons you could be seeing that error message are listed on the Microsoft support site. If you observe this error message on a somewhat regular basis it's likely because at that time ...


3

If it's a sql login and you have access to the application servers, you could look for it in connection strings on those. Otherwise, there is no way to find the password. Your only option is to reset the password.


2

Maybe Compatibility_level = 90 is of MSSQL-2005, then is it really been upgraded to MSSQL-Server-2012 or not? how may I know? If it's running on the 2012 instance, then that database's metadata has been upgraded. So you're good. Could anyone please explain me why restored database also showing Compatibility_Level as '90' and not '110'? When you restore ...


2

A CROSS JOIN or CROSS APPLY will return a 'Cartesian product' or 'cross product' (i.e.: every combination of rows from the two tables.) In this case, those operators are functionally equivalent. -- set up our tables CREATE TABLE Customer ( CustomerNumber int ) CREATE TABLE Product ( Product varchar(15) ) INSERT INTO Customer ( CustomerNumber ) ...


1

The server has 64GB RAM installed, however in taskmgr there are only 32GB available. I believe this is a Standard Windows Server limitation, just want to confirm. You are correct max memory limitation for Windows Server 2008 Standard is 32 GB. This is mentioned in Memory Limits of Windows Server Machines. On other side, we have checked the SQL Server ...


1

It's a bit unclear what you want, but you can use rank() to collect duplicates, and then another window function that counts those, and filter them out if there is more than one: SELECT qty.Id , qty.Product_Name , qty.Product_Type FROM ( SELECT qty.Id , qty.Product_Name , qty.Product_Type , COUNT(Rnk) OVER () as cnt FROM ( ...


1

tl;dr I don't think what you want is an option with the tools you have available. I do not believe it is possible with SQL 2005, to actually have your data export as .xls or .xlsx format. Over the years I have tried with several different tools to do just this. I did not have the option to select different tools. In anycase, for most window devices ...


1

Finally traced the issue to a table on the Subscriber that was missing the PK index. Still not too sure how this could have happened as all subscribers were initialized from the same snapshot at the same time. Re-initializing the individual subscriber had no affect. I had to; - remove the article from the publication - run the Snapshot Agent - ...


1

Since you are migrating to a new server, you don't need to bring SQL Server 2008 into the mix. As stated by SQL Server expert Paul Randal, You can upgrade from any version 2005+ to any other version. Paul states: There’s a persistent myth that you cannot upgrade a database to a version more that is more then two versions newer. It’s not true. ...


1

An addittion to Mark Sinkinson's excellent comment: NOT IN requires you compare a single column from one table with a single column from another table or subquery. You can, actually, perform NOT IN with more than one column. E.g. this is a prefectly legal* SQL query: SELECT E.first_name, E.last_name FROM employees E WHERE (E.first_name, E....


1

You do not need to remove the whole replication. You can just remove the single article (aka your table) from the replication. In SSMS connect to the publishing server, expand Local Publications -> Properties -> Articles. Uncheck the table you want to rename, then rename the table, then re-add it to the article list (make sure to uncheck "Show only checked ...


1

I found this because I just deleted a bunch of backup tables because my database had "maxed out". I kept looking at the "Size" property, thinking why isn't this getting smaller?. After reading this, no, I don't want to shrink the database. What I want to do is "reclaim" the space for the junk I just deleted. What I needed to be looking at was "Space ...


1

SHRINKDATABASE will only shrink the database (at best) to its MinSize, so that will not help you. When you try you shrink the FILE via the SSMS UI using the defaults, it uses 'DBCC SHRINKFILE (N'MyDB' , 0, TRUNCATEONLY)'. That command will only shrink the file (at best) to the last allocated extent. If you want to shrink the file below the MinSize, just ...


1

This will allow a specific user (user1) to run any Sql Agent job. Members of SQLAgentUserRole and SQLAgentReaderRole can only start jobs that they own. Members of SQLAgentOperatorRole can start all local jobs including those that are owned by other users USE [msdb] GO CREATE USER [user1] FOR LOGIN [user1] GO USE [msdb] GO ALTER ROLE [SQLAgentOperatorRole] ...


1

Starting in SQL Server 2019 (currently in beta / "Community Tech Preview"), there is native support for UTF-8 via a new series of UTF-8 collations. HOWEVER, having the ability to use UTF-8 does not mean that you should. There are definite drawbacks to using UTF-8, such as: Only the first 128 code points are 1 byte (i.e. the standard 7-bit ASCII set) The ...


Only top voted, non community-wiki answers of a minimum length are eligible