Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
AG Issues (one node is down) and all but 2 databases is accessible - we have an AG of 4 nodes. Node1 being the primary, (has about 27 databases in the AG). Node2 went down for some reason (VM is toast?) But being a 4 node AG, i would expect that the environment or the databases will still be accessible from the primary. Unfortunately this is not the case. […] |
How to schedule database backup in SQL Server Express edition?.. - Hello, How to take/schedule database backup in SQL Server Express edition (latest version) Required log backup every day with 1 hour interval (except Sunday) and full backup on Sunday. Pls advise the script for take above backup in SQL Server Express edition. As per my understanding SQL Server Agent is not available in Express […] |
SQL Server 2017 - Development |
How do you convert a timestamp into a date - Hi all Can anyone help me turn a timestamp that looks like this: "1994-10-07 00:00:00.0000000" into "10-07-1994", then into 10-94? I tried cast(DOB as date) and it came back as 1994-10-07. Any assistance would be appreciated. |
SQL Server 2016 - Administration |
Shrink or not to shrink that is the question? - Hi. Upon a vendors request I have run maintenance against a single table and deleted 158 million rows. Their next suggestion is to shrink the database. If I do this it will cause index fragmentation (which they didn't seem to bothered about) and most of what i have rad advises against this. If I rebuild […] |
Administration - SQL Server 2014 |
All entities on sql server database - I am trying to find the dependent jobs, linkked server, users,ssis packages,source target mapping,db stats,sql files, impacted files, impacted codes, ssis package variable, ssis config tables, ssis packages, sql agent schedule on sql server database I have tried below mentioned query SELECT DISTINCT DB_NAME() AS [Database] ,SCHEMA_NAME(od.[schema_id]) AS [Schema] ,OBJECT_NAME(d1.referencing_id) AS dependent_object ,od.[type_desc] AS dependent_object_type […] |
Development - SQL Server 2014 |
Incrementing ID by one on change of value - Hi I have a table as below, with example data in it ID Name 2346 M Smith 2346 M Smith 2346 M Smith 2347 M Wilson 2347 M Wilson 3347 M Wilson I want to add another column called […] |
SQL 2012 - General |
can't get Numbers from Name to prevent conversion failed ? - I work on SQL server 2012 I Face issue as below : Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the nvarchar value '1.2kV' to data type int. this error done where converting Name to number but it is failed . as Example Name have value 1.2v then if i get […] |
SQL Server 2019 - Development |
PA 640 file - Has anyone imported the file they received? It comes as a .rpt but I've changed it to a txt. How would I import it? It seems to be on multiple lines. Thanks |
Execution plan flips from "good" to "bad" at a certain threshold - We've got a particular stored procedure that's been a perennial problem performance-wise since it was written (in 2009). It's in my crosshairs once again and I've at least found out what appears to be going on but I'm at a loss in terms of bending it to my will. Here's the query: select CTR.WorkingID, CTR.WorkingID2, […] |
Sequence not always returning number - Hello, Recently I came across an issue in production where a sequence is not always returning a number. Below is the create script from a year ago when it was implemented and code snippet from a stored procedure with all the other code removed. From the code snippet, the error will get thrown during high […] |
Daily Counts by Month based on Start/End date - Hello, wondering if somebody might have the most efficient way of creating a query of Daily Counts based on Start/Stop dates. Thanks for any help. create table #CustDetail (ID varchar(6) ,Startdate date ,EndDate date ) Insert into #CustDetail values ('154784', '2019-12-20', '2020-02-20') ,('541785', '2020-01-02', '2020-03-05') ,('658746', '2020-01-28', '2020-01-31') Looking for Dec 19 = 11 […] |
Using If exists trying to assign the value to a variable when it exists. - Hello Hope you can help it seems easy but not for me I have the following table id serial parentid 10 10020 Null 20 00234 10 30 00235 […] |
Different average duration for update with primary key - Hi , we running query bellow UPDATE MyOrders SET col1 = @P11, col2 = @P12, WHERE pk_col0 = @P3 -- cluster index AND (col3 IS NULL OR col4=0) execution plan show 100% cluster index seek using query bellow I getting query stat by hour SELECT [qsq].[query_id], [qsp].[plan_id], CONVERT(varchar(20),[rsi].[start_time],120) as StartHourUTC, [rs].[count_executions], [rs].[count_executions] * round([rs].[avg_cpu_time]/1000,2) as […] |
SSRS 2016 |
SSRS 2019 reports are painfully slow - Hi. I'm migrating reports from an SSRS implementation on SQL Server 2012 to SQL Server 2019, and the reports render painfully slow on 2019. We're talking minutes. I've scoured the internet and it seems like this is a common question, but the answers point toward making the DB queries more efficient, using Stored Procedures, etc […] |
Analysis Services |
SSAS Dimension Wizard - name column list missing - I tried to carry out out the instructions in the paragraph entitled "Defining the Internet Sales Orders Fact Dimension" in the Adventure Works Multidimensional Modeling Tutorial. In Solution Explorer, right-click Dimensions, and then click New Dimension. On the Welcome to the Dimension Wizard page, click Next. On the Select Creation Method page, verify that the Use an […] |