|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
How Many Sales for Each Year? | |
I have an R dataframe, called Sales. In this I have two columns, denoted Month and Year. I want to get a count for the number of records I have for each year. What expression should I use if I have the dplyr package loaded? | |
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) |
Bypassing Dynamic Data Masking I am using Dynamic Data Masking to limit access to the last four digits of an ID number for customer service personnel. I want a manager to be able to see the entire field for a table. What permission to do I assign and at what scope?
Answer: GRANT the UNMASK permission on the database to the user/role Explanation: The UNMASK permission is only set at the database level to view the information that is masked. Ref: Dynamic Data Masking - https://docs.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver15 |
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 2016 - Administration |
Replication gets dropped automatically - I am not sure who or what is doing it but as soon as I setup a snapshot replication and leave it for a day then the other day I find the replication gets dropped completely and I have no clue what process is doing it. I checked agent jobs as well and I couldn't […] |
Changing values in Partitioned Key - Hi All One interesting scenario here. We have a partitioned table which is partitioned based on a date column. The clustered Primary key is a composite key with ID+ that Date column. The table also has some 25 non clustered indexes. Now the value of partitioned key (i.e. the date column) might change. So that […] |
How to create a role and add data_reader and execute permission on 2 databases - Hi Can someone tell me the easiest way to create a new role (report_user_role) on 2 databases which gives it the data_reader permissions and execute permissions on 2 databases. I then want to create a new user report_user and assign that role to it so it can read all tables in the 2 databases and […] |
SQL Server 2016 - Development and T-SQL |
Sum of column from multiplied columns - I would like to get the sum of "Transaction Cost" as created from the multiplication of TxQty and AvgCostOld. Any help would be appreciated. SELECT Item, TxQty, AvgCostOld, TxQty*AvgCostOld AS TransactionCost, TxNumber, TxDate FROM tblimInvTxHistory WHERE TxDate > '2020-08-25' AND TxCode = 'ADJ' |
LEGACY_CARDINALITY_ESTIMATION = ON and COMPATIBILITY_LEVEL - Hi everyone, we migrated from sql 2012 to sql 2016 and since then we have been facing some performance issue. We decided to change the compatibility level to 110 (sql 2012) and set the LEGACY_CARDINALITY_ESTIMATION= ON. It helped but then we were still having performance issues and we switched back to the original configuration. Now, […] |
Administration - SQL Server 2014 |
What is XE_SERVICES_RWLOCK and why am I seeing it so much? - So I've got a new Windows 2016 / SQL 2014 SP3 server that's giving me trouble. When the issue occurs, the response from the server is extremely slow, up to and including login timeouts when trying to connect to it with SSMS from a workstation. When the problems occur, applications that use the various databases […] |
FCI - I have two standalone SQL Server instances. Planning to configure SQL Server FCI between those two instances. Is that possible or I need two nodes without SQL Server on it? Please advise? Thanks in Advance! |
SQL 2012 - General |
NT authority/system - In our environment someone is using nt authority/system account with sysadmin permission I have checked the logs, event viewer but not able to find how/who assigned this and when Is there a way to find this Thanks Atulyan |
SQL Server 2019 - Development |
How to CAST() the value column in a dynamic unpivot - I have a set of data that has multiple different data types including one field that is a nvarchar(max) field. I need to unpivot the data but of course I am getting the pesky error "The type of column "myColumn" conflicts with the type of other columns specified in the UNPIVOT list. I am wondering […] |
find group of time - hi all, i have the follwing table : 10 lines i want to show only row after 30 second (should be paramter :)) between them. ( as summery of previous records) on this record set: 2020-08-26 00:00:00.000 --first line bring 2020-08-26 00:00:20.000 -- 30 second not over avoid this record 2020-08-26 00:00:25.000 -- 30 second […] |
SQL Server Newbies |
SSMS connections to Availability Groups - Hello, I am new to Sql server and have a question on SSMS connecting to AGs. When I connect to the primary node the database has a white circle on it and on the secondary node it has a green arrow. I would think it should be the other way around. Primary should show a […] |
Reporting Services |
Two Tablix in a report - I have a report that renders two different outputs depending on a parameter(Summary or Detail). I have to add a new column to both reports. When I add a new column, its only adding to the detail report. I can't figure out how to change both. I'm using report manager to do this but could […] |
General |
GMSA for use on Windows Task Scheduler Job - Hi team, I created a new windows task scheduler job using GMSA. Command was success: $Action = New-ScheduledTaskAction "E:\TEST\DeleteFiles.bat" $Trigger = New-ScheduledTaskTrigger -At 06:00 -Daily $Principal = New-ScheduledTaskPrincipal -UserID DOMAIN\SVCSQL$ -LogonType Password Register-ScheduledTask TestTask –Action $Action –Trigger $Trigger –Principal $Principal The task is just clear any files in a folder, example D:\TEST\ - any files […] |
SSDT |
How to dynamically create a table in SQL from a Excel file using SSDT - Hi, I am fairly new to SSDT and am looking for some help with loading excel files that I have been provided for a project. The files will all have the consistent file names and consistent tab names but that is where the consistency ends. The tabs can have from 1 to 150 columns with […] |
Integration Services |
SSIS Package Slow As Agent Job vs Manual DTexec execution - Hello Folks, I have an SSIS package on a machine(SQL Server 2017, Windows Server 2016) that has user configured variables for table names and exports 3-4 tables from SQL Server database to a flat file and later zip it so essentially it is doing a select * from view (the view in question here is […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |