|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
The Client Key | |
Which key is stored on the client, or accessed by the client, and used for the encryption/decryption operations in Always Encrypted? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Clearing Backup History If I want to clear the backup history for only the Scratch database from my instance, and not remove history for the Sales database, how do I do this? Answer: Run sp_delete_database_backuphistory with a parameter of 'Scratch' in the msdb database Explanation: sp_delete_backuphistory only takes a date parameter to trim history for all database backups. sp_delete_database_backuphistory allows you to specify a database, but this must be run from msdb. Ref: sp_delete_database_backuphistory - https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-delete-database-backuphistory-transact-sql?view=sql-server-2017 |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
USERSTORE_TOKENPERM growing very fast - Hi folks, I'm experiencing a very weird problem with userstore_tokenperm clerk recently. We have an environment with some databases in contained mode executing in version SQL Server 2017. Anyway i'm facing this problem since the SQL Server 2016. At a certain moment this cache starts to grow at a rate of 6GB by day. When […] |
SQL Server 2017 - Development |
Problem writing a query to handle dynamic field usage - I have been presented with some source data and mapping tables where the source data is stored as : MyData Type Id Field1 Field2 Field3 1 1 MR John Smith 1 2 MRS Jane Doe 2 3 Bloggs Betty Miss what I would like to ideally be able to do is produce a view for […] |
SQL Server 2016 - Administration |
SQL logins with AD - I have a separate script for SQL Logins with the permissions db data reader etc and a separate script that reads AD to see if the user is terminated. I am looking to see if this can all be in one script. Thanks |
compatibily Level 130 and traceflag 4199 - Hello everyone I migrated my server SQL SERVER 2008R2 to 2016 I changed the compatibility level of my database to 130 USE [master] GO ALTER DATABASE [MyDatabase] SET COMPATIBILITY_LEVEL = 130 GO Is it necessary after this activation? Activated traceflag 4199 is It automatically included when you change the COMPATIBILY LEVEL to 130 ? thanks […] |
Solid State Drives and Fragmentation - Are there benefits to be had from defragging clustered indexes that reside on SSDs? Or is it true that since SSD's data is addressed via electronic switching on the SSD address bus there is no performance penalty due to fragmentation? |
SQL Server 2016 - Development and T-SQL |
StoredProc insert and update multiuser issue - Happy to day to all, I am looking into an issue with a stored procedure where are where there are multiple users the code does the select but the update may fail: (as well i want to be educated on the solution so please push into a direction of learning as well) SET ANSI_NULLS ON […] |
Administration - SQL Server 2014 |
Failover in FCI SQL with command SQL - Hello everyone on an FCI Failover cluster instance how can I failover to the second node without restarting the main node is there an SQL command or Powershell that allows me to do the failover thank you |
Development - SQL Server 2014 |
Compare Dates - Hello All, create table #app1 ( custID INT, Seqs INT, eff_dt datetime, term_dt datetime ) insert into #app1 select 123, 100, '07/01/2017', '12/31/2017' union all select 123, 200, '01/01/2018', NULL union all select 456, 021, '08/01/2017', '11/30/2017' union all select 456, 021, '12/01/2018', '02/28/2019' union all select 456, 031, '03/01/2019', NULL union all select 789, […] |
XACT_ABORT with ROLLBACK - I have come across some stored procedures in our company database that follow this format: SET XACT_ABORT ON BEGIN TRY BEGIN TRAN -- Do some stuff here -- Do some more stuff here COMMIT END TRY BEGIN CATCH ROLLBACK; THROW; END CATCH Am I correct in thinking that the CATCH code block will never run […] |
Best way to find if string is whitespace - I appreciate it is a trifling question and yet. One of our sites organises its customers in small groups. Those groups are used for various purposes, including customer's address. When I generate invoice (many thousands a day) I check if the customer belongs to a certain group and then query if that group has an […] |
SQL Server 2012 - T-SQL |
Get list Stored procedure dependency on legacy database without FK - Good Day, I need advice and solution how to get Get list Stored procedure dependency from root stored procedure because this is legacy database without FK so i can not identify relation for each table without FK. any advice or solution are welcome. thanks for advance. |
Building a table based on another one(s) - Hi, We have 3 people that answer the phones to help our customer with questions. As a result, we get a call report that shows who was on a phone and when, and for how long; which I put in a table; and this report, it also shows missed calls. I made the table below, showing […] |
SQL Server Newbies |
New to SQL - difficulties in SUMing only certain rows of a column, other misc. - This is for SQL Server 8.0 and I'm using MySQL Workbench on this. I have a table called 'business_ledger' and the following fields: employee_name (various string values to denote employees - not used in this query but it's part of the database), title (with values: Novice, Journeyman, Master), Earnings (various int values), certification (with […] |
SSRS 2016 |
How to set up user permission at report content level - We're planning to deploy a report to SSRS 2017 with data for multiple projects. We'd like to know if there is a way to set up permission at report content level, i.e. one user can only view data for Project-A, and the another user can only view Project-B data. I'm new to SSRS, but used […] |
Certification |
uk training providers for dba or dev certs. - Hi guys, I was considering firebrand for an accelerated MCSA cert. I have years of experience, just haven't got around to getting certified yet. They are expensive but accelerated. I'm not sure I have the patience to self study for this. I feel like I would like the confidence from certification because, even though I've […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |