Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
SQL Server Reporting Services 2017 - Error 1503 - Getting this error when SSRS (Express) service restarts: System.InvalidOperationException: Cannot start service SQLServerReportingServices on computer '<MyWin10DesktopPC'> ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion --- End of inner exception stack trace --- at System.ServiceProcess.ServiceController.Start(String[] args) at System.ServiceProcess.ServiceController.Start() at ReportServicesConfigUI.Panels.ConfigurationPanelWithErrors.StartOrStopServiceTask(Boolean start, String serviceName) […] |
Weird network issue - Hi, I have an ssis package, that when I run it from the virtual server (the package is deployed on the catalog) and I use a job to run the package it takes 18 hours. I have set up another server (very small one called TEMP), is also a virtual server and deployed the same […] |
SQL Server 2017 - Development |
Importing JSON - I am attempting to import JSON into my db and I'm getting stuck on a few nested objects. In this particular JSON fields are omitted when there isn't a value for that particular record, and that includes the nested objects. However, in some cases there is more than one nested object and I only want […] |
Parse character string into multiple fields - I need to parse a VARCHAR(255) field into four fields, three VARCHAR(5) and one VARCHAR(255). The VARCHAR field to be parsed is a variable length for example: 122 667|6 71|77|120 71|77|219|427|122|670|120|10 The characters before the first | go into field 1 The characters after the first | but before the second | go into field […] |
SQL Server 2016 - Administration |
Database file size question - Hi all, I am working with a database from a third-party vendor that seems a bit odd to me. I just wanted to get your opinion so that I know I'm not going crazy. Just some facts about the database: SQL Server 2016 compatibility level Total size of the entire database is about 100 gigs […] |
SQL Server 2016 - Development and T-SQL |
Find rows older than 60 days with Epoch time format - Hi, I'm trying to purge this table for any rows older than 60 days but the LogTime column is in Epoch format. I've read articles on how to convert it to human readable format and i just can't get it to work. Here is the table data. LogLevel LogTime INFO 1574434804509 INFO 1574434804509 INFO 1574434804509 […] |
Administration - SQL Server 2014 |
Slow deletes - Hi All, I have table with 1574963 rows and grown up to 1.21 Tera Bytes. Table has a clustered idx and additional nonclustered idx is created. App team is trying delete/archive some data in small chunks. CREATE TABLE [dbo].[LogData]( [c1] [bigint] NOT NULL, [c2] [int] NOT NULL, [c3] [int] NOT NULL, [c4] [ntext] NOT NULL, […] |
Development - SQL Server 2014 |
Syntax error using openquery() - Not quite sure what SQL is complaining about here so need some fresh eyes please. I'm trying to put the result of an openquery() into a variable. My code is: declare @ram_id varchar(50), @tsql nvarchar(1000) set @tsql = 'select @id = service_ref from OPENQUERY([remoteserver],"select Service_Ref from [remoteDB].[dbo].[Service_Request] where service_request_number = ''2''")' exec sp_executesql @tsql, N'@id […] |
Using stored procedures/dynamic sql to add columns - I am trying to use stored procedures to join columns to one table. I am joining more than 1 table to the original table but they have a common identifier. For example, right now I have Table 1 Id_number month 82284 jan 82284 […] |
EXECUTE sp_executesql - Cordial Saludo. tengo el siguiente script DECLARE @SqlString NVARCHAR(500) DECLARE @ParmDefinition NVARCHAR(500) DECLARE @Valor_Tmp Numeric(12,2) SET @SqlString=LTRIM(RTRIM(@ValorFrm)) SET @ParmDefinition = N'@Valor_OUT Numeric(12,2) OUTPUT' EXECUTE sp_executesql @SqlString,@ParmDefinition,@Valor_OUT=@Valor_Tmp OUTPUT SET @Valor=@Valor_Tmp la variable @ValorFrm='SET @Valor_OUT=983,5-2(15.3)-1' Esta variable es una construccion similar a a+2(b)-1 construida por programa. El problema es que en el SSMS funciona y ejecuta bien […] |
A cursor with the name already exists - Hi, I have this code in a job that needs to run every 5 minutes. It works most of the time without issue. But 4-5 times a day I get the "a cursor with the name already exists" error. I added the LOCAL to the cursor declaration, but still get the error. I checked for […] |
SQL 2012 - General |
Place data on another drive - Hi all! I have had to change from my good old dependable server to a local laptop. That gives some big challenges... One of my databases is app. 2GB, and that just cannot be on a laptop harddisk - At least not mine. In comes my Synology drives, 2 X 8 TB But […] |
How to understand the SQL Server Statistics information and Query Cost of Execut - In figure 1, there are SQL statements , these 2 sql statments join 2 tables, one is on current database server, the other is on another database server. the first SQL statement runs by SQL Server linker server to join; the second SQL statement uses openquery and linked server to get same data. and in […] |
Find how many week day crossed in a given date - Team I have a scenario in SQL Query. If I Give a day, The output should say which day and how many days crossed in a given month For Ex If I give 04th Dec 2019 as input > It should say, It is Tuesday and this date is first tuesday If the Input is […] |
SQL Server 15 - Administration |
Bug in SQL 2019 - Error writing Log Shipping job history - Has anyone come across this bug, and if so have they found a fix for it? From what we can see the error is in a stored proc that seems to be in the Resource Database, and we don't have visibility on it. While Log Shipping still works, we have found without the Log History […] |