New answers tagged

0

This may be better addressed with an outer apply. (thus eliminating the need for the group by *) If you are confident of an 1:n cardinality: SELECT A.*, B.CountFoo FROM TABLE1 A outer apply (select count(B.Foo) as CountFoo from TABLE2 B where A.PKey = B.FKey) B If Table1 has duplicates on PKey (though depending on your use, you start to have a wash in terms ...


0

Old post but very helpful!! I proved it does move in SQL Server 2017 by truncating partition 2 after the update and the record is still there in partition 1 TRUNCATE TABLE IDRanges WITH (PARTITIONS(2)) select * from sys.partitions where object_id = object_id('IDRanges') partition_id object_id index_id partition_number hobt_id rows ------------ ---------...


2

Do you want one email per server or one email for all servers? One per server is easy, push out a job that does your check and send the email using sp_send_dbmail. This can be done through an MSX server if you want. One mail for all servers requires a client that query each servers and collect the info and finally send email. Powershell is likely a good idea....


0

Not seeing the SQL Server Agent icon in SSMS' Object Explorer tree on a non-express edition SQL server where you are not a member of sysadmin, but are a member of at least one of the SQL Server Agent Fixed Database Roles can also be because you login using a windows login that is allowed in through a windows group only: no entry exists in master.sys....


Top 50 recent answers are included