Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Could database with compat level 100 support columnstore index? - Hi everyone. I asked this question previously on other forum, but didn't get satisfied answer. I hope I could find the answer here. So, I have an instance which runs on SQL Server 2017 Developer Edition instance. I restored database ContosoRetailDW which had compatibility level 100. After restore operation, I run the following query: CREATE […] |
Changing datatype in a column - Do I have to rebuild the Clustered columnstore index when we modify datatype in a column? Thanks! |
High buffer size for a table could mean either it has incorrect indexes or ? - or simply that the table is USED A LOT, right? -- Breaks down buffers used by current database by object (table, index) in the buffer cache (Query 51) SELECT OBJECT_NAME(p.[object_id]) AS [ObjectName], p.index_id, COUNT(*)/128 AS [Buffer size(MB)], COUNT(*) AS [BufferCount], p.data_compression_desc AS [CompressionType] FROM sys.allocation_units AS a WITH (NOLOCK) INNER JOIN sys.dm_os_buffer_descriptors AS b WITH […] |
Distributed Availability Group Failover test without affecting Primary site - Hi I have created a test environment with Distributed Availability Group (SQL 2016) for DR Testing and I can fail over to DR. Now I need to test the DR site databases with application. To avoid the test data sync back to Production site, i have to drop the Distributed AG. Is there any way […] |
SQL Server 2016 - Administration |
Page Verify = Checksum - Hi I'm belated changing the page verification option for a database from NONE to CHECKSUM. I'm aware this only affects future writes to the database, and existing pages won't have that checksum calculated until they are updated or the relevant tables or indexes are rebuilt. My question is: would an ALTER INDEX ... REORGANIZE also […] |
Audit connection which are connecting to a server using AG listener. - I am in a middle of removing a server which is part of AG and someone has asked me to see if there are users, connecting to that specific server using a listener name so I used a DMV to capture all that information. The script is below SELECT es.login_name ,es.program_name ,login_time ,ec.client_net_address ,ec.client_tcp_port ,agl.dns_name […] |
SQL Server 2016 - Development and T-SQL |
Ugly code fix - CASE WHEN Phone IS NOT NULL OR MobilPhone IS NOT NULL THEN CONCAT(CONCAT(LEFT(COALESCE(Phone,MobilPhone),3),'-'), CONCAT(CONCT(RIGHT(LEFT(COALESCE(Phone,MobilPhone),7),3),'-'), RIGHT(LEFT(COALESCE(Phone,MobilPhone),12),4))) ELSE '' END As PhoneNumber I inherited this god awful code. I comment this variable out and the query executes in < 30 seconds against a sizable number of records. (~ 1MM). I add this little tidbit of insanity back […] |
Administration - SQL Server 2014 |
How to check database deadlock and blocked process occurred before? - 1. if there is no database monitoring software, and if there is any approach to check the database deadlock and blocked process occurred before? and how to know which statement caused the dead lock and which statment was blocked? 2. if use the third part monitoring software, which one is the best to do that […] |
Development - SQL Server 2014 |
How would I get the last record of a self-referential table? - This summer I authored a report that referenced nine tables in a query. This is against an older database. This is for a pharmacy application that someone back when wrote originally in a Microsoft Access application. Along the way somebody upgraded the database from the original .MDB to a SQL 2012 database, where it currently […] |
SQL Server 2019 - Development |
SQL Full text query too slow - I have some Full Text Catalogs and since some time ago, the query time really slow down, and the only solution I found until now is to rebuild the catalogs, sometimes more than once a day with command: ALTER FULLTEXT CATALOG TABLE1 REBUILD Why is necessary to rebuild the catalogs? There are other solutions for […] |
SQL Azure - Administration |
Databricks Job Listing - Not really sure if this is the correct place to post this, but here goes I'm fairly new to databricks, but I have a list of about 40 jobs that run at different times during the day. Is it possible to get a listing of those jobs that are currently executing, using a sql or […] |
Powershell |
Scanning to find sql instances/servers - We use MAPS tool to scan through our domain and then list out our sql servers/instances. How can this be achieved using powershell ? Thanks |
SSDT |
CDC Source tool in SSIS - varchar data mapping issue - I'm trying to introduce myself to the change data capture items in the SSIS Toolbox and have hit a problem with the CDC Source tool. I've been using this tutorial as a guide: https://www.mssqltips.com/sqlservertip/5815/sql-server-integration-services-ssis-cdc-tasks-for-incremental-data-loading/ So I have a source table with varchar data types in SQL Server, but in the CDC Source Advanced Editor it […] |
SSIS performance issue: Data load from sqlserver2016 (EC2) - Mysql8.0 (RDS) - Hi, I am trying to Full Load from Table on sqlserver(2016) to a table on Aurora My Sql database (RDS).The table has 1M records and taking 3 hrs to load it when I run it as a job on server. I am using ODBC 32 bit driver and ADO.net Provider on the ETL side. The […] |
Integration Services |
Find MAX value from multiple datetime columns - This may have an easy resolution but I'm having difficulty finding it. I'm creating a package that needs to take records that are new or updated since the last time the job run. I have 2 DateTime columns Insert_date and Last_Updated. I need records for newly inserted records and modified/last_updated records. How do I accomplish […] |