Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2016 - Development and T-SQL |
Surprising results when analyzing Bltzcache results.... - Blitz Cache reveals that the 50 most expensive queries run against the production servers are raw statements, not wrapped in stored procedures, and earlier, Blitz revealed plan cache instability, with most plans being compiled in the last 24 hours despite the server having last been restarted a fortnight back. We have memory pressure which we […] |
Result set different after breaking up case expression in where - I'm back again with more dumb questions. This time I am dealing with refactoring a single select with nested case expressions in the where clause. I'm trying to optimize this, and in attempting to do so, I broke up the query into multiple selects w/ union alls. This does run quite a bit faster, but […] |
Sending Locking Alert - I have 2 tables the first one holds the dbwait information(locks), and the second table holds the db sessions related to the locks. I'm in build block stage where I have the files loading to SQL, and will make updates to the Table Defs(PK,Index) after some testing. Just trying to work thru the logic of […] |
Export empty JSON with headers & footers - Hello, I have inherited a process that utilises an SSIS package and related stored procs that creates a JSON file. The file we create looks like - A number of objects in an array in a nested hierarchy. If we have no data from our process at present we create an empty file. What I […] |
Administration - SQL Server 2014 |
SQL server becomes slow after running dbcc checkdb - We are having an issue of SQL server slowness and I’m unable to find out why. After the dbcc checkdb job completes the other processes like the ETL jobs, other maintenance jobs just run for a longer time. we are having performance issues that we are forced to restart the server whenever this happens. This […] |
how much memory that we need for SQL - Hi All, Our server has a Datawarehouse database is like 600 GB ( 500 GB for data file only ) and memory is ONLY 8 GB ( 5 GB for SQL ) . There are only 2 Databases and the other database is very small (58 MB) SQL edition is SQL 2014 I feel The […] |
SQL 2012 - General |
Adding a PRIMARY KEY CLUSTERED - Is there a T-SQL way to add the following to an existing table that already has data in it?: PRIMARY KEY CLUSTERED ( [CALL_ID] ASC, [DATE] ASC, [TIME] ASC, [CALL_TYPE] ASC, [DOMAIN] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON […] |
SQL Server 2019 - Administration |
How migrate on SQL database to AWS - Can any one tell step by step procedure to How migrate on-premises SQL server database to AWS. |
Back up and restore Synchronized database - Hello I have 2 database servers one as a primary and another as a secondary. I have synchronized them through availabity group settings. The vendor of the database wants to do some updates on the database locally which means i have to take a back up of the database and send them the back up. […] |
SQL Server 2019 - Development |
Index design on large and "wide" tables - We have a database of some statistical measures for some entities per day. I can't share the full schema, but trying to simplify so one still can follow the generic idea. The basic design is following: CREATE TABLE dbo.StatisticsTable ( statisticsType INT, timePeriod INT, entityID INT , statisticalMeasure1 NUMERIC(19,12) ... , statisticalMeasureN NUMERIC(19,12) primary key […] |
Issue with the change of the column precision to be 2 decimal places - Hello, I need to change the % sales vs forecast column precision to be 2 decimal places instead of whole numbers. The confusing part is that I already have a format function and 'Po' as a '%" at the end, so I am trying to understand how I can make a % with two decimal […] |
Results-To-Text , Programatically - I sometimes run queries against an IBM DB2 database, using an old Navigator tool that has limited functions. In some cases I want the results in 1 pane, so I can do various string searches with CTL-F. Typical # of result rows is less than 1000. It's probably equivalent to SQL 7 as far and […] |
How to return a range value based on the first day of year and the value of row - Hello, i have a table called Events, the value of that table like as bellow : create table Events ( id int, code_events varchar(10), Events varchar(10), Events_start datetime, Events_end datetime ) insert into Events values(1,'AC_83','Event 1','2020-07-15','2020-07-30') insert into Events values(2,'AC_84','Event 2','2019-06-01','2030-07-30') insert into Events values(3,'AC_86','Event 3','2020-07-15','2022-12-15') insert into Events values(4,'AC_83','Event 1','2020-09-15','2025-04-30') insert into Events values(5,'AC_87','Event […] |
Reporting Services |
Data Driven Subscription by Email? - Hi, Try to find an example of a data driven subscription Via Email. What I would like to do is run a report with each row has an employee associated with a client. I would like to send via email only the clients associated with the client . Thanks |
Analysis Services |
MDX Filter() for a calculated measure - Hi folks, I am still quite new to MDX and have severe problems with the following task (beg your pardon for German language): The measure [Leistung] is aggregated on the database as max(). Another, calculated measure [Leistung Zeitpunkt] is needed , wich delivers the date belonging to the maximum-value. I have tried to achive this […] |