Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Calculate log space required on principle for maintenance activity - Hi all, We have a database configured for asynchronous mirroring. We have some planned maintenance activity on mirror server. Expecting for 6-8hrs. How to calculate the log space requirements on Principle server after you run the command on principle alter database set partner suspend |
Need an alert for a sudden increase in data - Hi All, Today, all of a sudden the size of the data file (.mdf) is increased by 30 GB and drive got filled up. Is there a way, to get an alert on such sudden increase of data and can we capture the query(s) and spids which caused the data grow that huge? Regards, Sam |
SQL Server 2017 - Development |
Tsql query to show currently running sql agent jobs - Hi All, Using Tsql query I want to know currently running sql agent jobs and how long they have been running in [dd hh:mi:ss]? Expected output: job name , start time, duration [dd hh:mi:ss] I can see it in Job activity monitor for currently running jobs but it is not telling me when it started […] |
SQL Agent Job schedule - Hi All, Want to know what are the SQL Agent Jobs scheduled for today at what time they are going to run ? Env : SQL Server 2017 CU23 Regards, Sam |
how to identify table(s) changing quite often - Hi All, Is there any query using which we can tell what is the table which is changing the most or more frequently? The idea, is to identify those tables and run update statistics with full scan on daily basis instead of weekly basis. Regards, Sam |
SQL Server 2016 - Development and T-SQL |
SQL blocking caused by running ALTER VIEW script - Hello experts, One of our developers tried to alter a view and reported to me that it was taking a long time. When I checked, it turns out that, for some reason, running the ALTER script is consistently causing database blocking. I ran a trace to capture the blocked process report. Below is an excerpt […] |
SQL Server 2019 - Administration |
SQL Agent jobs - script to get what jobs failed - I have been trying to find SQL that shows what SQL Agent jobs failed as our manager wants a report generated showing what jobs fail. The below SQL I have found but it shows which steps fail but that is not what I want. Reason being is that we have an AG environment and the […] |
Need help desperately - I accidentally ran this on a dev server which has locked my acct and I am unable to drop the trigger. Can someone help please? --Create the dbo.ServerLogonHistory Table CREATE TABLE dbo.ServerLogonHistory ( EventType VARCHAR(512), PostTime DATETIME, SPID INT, ServerName VARCHAR(512), LoginName VARCHAR(512), LoginType VARCHAR(512), SID VARCHAR(512), ClientHost VARCHAR(512), IsPooled BIT ) GO --Grant insert […] |
SQL Server 2019 - Development |
Seperator after value - Hi, I need to insert a separator after each value but I don't want to mess the db with irrelevant characters. The best separator would be a semicolon. I got 5 columns in my db and export them via SQL Server Agent further to my FTP Server. The easiest way would be through the Server […] |
Get a Date Time Stamp of table when another columns value changes. - I have created a table as per below query CREATE TABLE [dbo].[mydbtemp]( [Datetime] [datetime] NULL, [Tagvalue] [int] NULL ) ON [PRIMARY] GO Inserted Values Like insert into MYDBtemp values ('2023-02-03 03:00:00.000', '1') insert into MYDBtemp values ('2023-02-03 04:00:00.000', '1') insert into MYDBtemp values ('2023-02-03 05:00:00.000', '2') insert into MYDBtemp values ('2023-02-03 06:00:00.000', '2') insert into […] |
SSIS C# Script Question - Hi everyone I am working on a SSIS package where I am automating data collection and table updates. My script is not performing as expected. I am not sure how I can revise it in a way that doesn't make the script too complicated. I am hoping there is an efficient way to fix it. […] |
Slow performance when processing a JSON file in Azure - We have a stored procedure that can load up a JSON file and process this in 12 seconds However on Azure ...this is taking up to 90 seconds. this is running on an Azure pay as you go database. Now the code isnt too complex as is doing the following. Code is shown... Json File […] |
SQL Server 2008 - General |
how to write a query by using some filter patterns in SQL Server? - what I want is to apply some filter patterns to search the data. For example. There is a large physical table in the database regarding medicines, I want to allow search even if user write lasix, lasixx, lasixxx, lasax, lasi, lisax. Data should be retrieved for the medicine lasix. How can I write these filter […] |
SQL Server 2022 - Administration |
script to find the frequent used login information in the sql - Hi, Kindly some one share the script or query to get the login information used for the sql database in the instance. InstanceName,DatabaseName,HostName,LoginName,Program,date used etc Thanks, Jo |
SQL Server Agent is not expanding and Jobs are not visible - Hi, We are not able to expand the SQL SERVER Agent. It is taking very long time. It is throwing below error. Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc) For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476 ADDITIONAL INFORMATION: Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222) For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-1222-database-engine-error -- If the Agent opens No […] |