Forum Widgets
Latest Discussions
Stored Proc is running , is there anyway to see what database it is working on
Stored Proc is running , is there anyway to see what database it is working on? the script is Ola Helgren's IndexOptimization on all user databases. I tried using sql profiler but nothing usefull came of it.rmerrittNov 12, 2024Copper Contributor127Views0likes2CommentsCreate and Import Database
We are moving databases from one server using SQL Server 2019 to 2022. Using the script below and although it works, when coplete the new database is in recovery mode, what am I missing? CREATE DATABASE DatabaseName; RESTORE DATABASE DatabaseName FROM DISK = 'D:\Backups\DatabaseName' WITH Replace, MOVE 'DatabaseName' TO 'D:\data\DatabaseName.mdf', MOVE 'DatabaseName_log' TO 'E:\log\Logs\DatabaseName_log.ldf'';neilhiornsNov 12, 2024Copper Contributor126Views0likes2CommentsUsing a Sequence
Consider this table: CREATE TABLE [Events]( [EventID] [int] NULL, << Other columns >> and this Sequence: CREATE SEQUENCE [NewEventID] AS [int] START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 NO CACHE and this Stored Procedure; CREATE PROCEDURE [Insert_Event] << Parameters >> AS BEGIN INSERT INTO [Events] ( EventID, << Other fields >> ) VALUES ( NEXT VALUE FOR NewEventID, << Other fields >> ) END GO When I run this procedure, I get this error message: NEXT VALUE FOR function cannot be used if ROWCOUNT option has been set, or the query contains TOP or OFFSET. None of those conditions are true so why am I getting this error message?SezMeNov 12, 2024Copper Contributor604Views0likes11Commentswhat is the correct process to deploy SQL server developer script as DBA?
I am DBA currently deploying sql scripts from developers but is not clear to me what is the correct way or process to do it, my concern is about how can I reverse the changes or guarantee data integrity before or after deployment in case of something wrong happen. Should I make a backup every time I deploy? (Some times a day) is there any way to lock specific database to avoid deployment in production by mistake? any recomended tool to make it? Should the developers use always rollback in their scripts? as additional information we are implementing GIT, I am not sure if this tool can handle these thasks better and safely than SQL SSMS Can someone provide feedback please? any comment can help. Thank you all I hope to find the best and safest way to make this taskFer_MicNov 12, 2024Copper Contributor84Views0likes1CommentSQL Server failing to execute extremely complex queries
A query is failing with this error message on a customer environment: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information. Sorry I cannot post the actual SQL query, which must be massive, but basically it is a union of a lot of tables. Maybe around 600 tables, maybe several thousands, I don't know exactly how many. For technical reasons, we cannot really simplify this query. In the documentation: https://learn.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver16 It is specified that the maximum number of tables in a select is limited only by available resources. Is it possible to increase the size of available internal resources somehow?bboissardNov 12, 2024Copper Contributor225Views0likes7CommentsSingle pane of glass to look at all of my SQL Servers
I just got back from SQL Pass Summit 2024 and I was told that I could ARC enable all of my SQL Servers so I would have a single pane of glass to view and scan logs, configurations, view best practices etc. Unfortunately, when I got home, I realized that since we have SQL Servers on Azure VMs we can't use Azure ARC to manage them. Unsupported configurations Azure Arc-enabled SQL Server doesn't currently support the following configurations: ... Multiple instances of SQL Server installed on the same host operating system with the same instance name. SQL Server in Azure Virtual Machines. An Always On availability group where one or more replicas is on a failover cluster instance. Since all our Azure VMs have the SQL Agent installed how can we unify our management experience in Azure?Mike_LemayNov 12, 2024Occasional Reader13Views0likes0CommentsAG Server Listener Issue
When I connect to a newly set up AG-Server using the Listener in SSMS, I don't get the Always on High Availability Folder. I can logon as the Primary / Secondary / Cluster … All show the Always on High Availability Folder in SSMS Logon has the Listener no Folder. When I use the another AG-Server Listen which was set up ages ago all good. I asked co-pilot and check all these are ok; Verify Listener Configuration: Ensure that the listener is correctly configured and associated with the availability group. Check Permissions: Make sure that the account you’re using to connect via the listener has the necessary permissions. SSMS Version: Ensure that you are using a compatible version of SSMS that supports Always On Availability Groups. Cluster Dependencies: If the listener was created via the Windows Failover Cluster Manager, ensure that the AG resource is dependent on the listener. Network Configuration: Verify that the network configuration for the listener is correct, including DNS settings and IP addresses. SSMS Refresh: Sometimes, simply refreshing the SSMS view or reconnecting can resolve display issues.sharrock1985Nov 12, 2024Occasional Reader3Views0likes0CommentsHelp with SQL Code
Hi, I have a table called FACT_DELAYS which contains the following columns: ID, START_DATE, END_DATE, FILTERED_MINUTES If an event is still active then END_DATE IS NULL. Example Data: 1, 20/10/24, null, 25 2, 07/11/24, null, 67 3, 02/08/23, 10/11/24, 43 4, 01/01/22, null, 20 The problem I have got is that it gives me an as of now value when I run the sql. I want to be able to dynamically show the previous 7 days and if a delay covers multiple days then it shows up in each day. My desired output would be: DATE, COUNT(FILTERED_MINUTES) 11/11/24, 3 10/11/24, 4 09/11/24, 4 08/11/24, 4 07/11/24, 4 06/11/24, 3 05/11/24, 3 Any Help will be much appreciated! Thanksleerjones85Nov 12, 2024Occasional Reader32Views0likes3CommentsBrowser for SQL Server 2017 and 2019
Hello, my question is the following. Despite having the latest updates released for SQL Server 2019 and 2017, I notice that SQL Server Browser does not change versions, remaining in the versions mentioned below. I would like to know if they are in fact the latest versions of SQL Server Browser released in the 2017 and 2019 packages. If the versions below are correct, if they really have not been updated. Browser for SQL Server 2017 14.0.1000.169 Browser for SQL Server 2019 15.0.2000.5rafaelsalgado92Nov 11, 2024Copper Contributor18Views0likes1Comment
Resources
Tags
- Data Warehouse63 Topics
- Integration Services55 Topics
- SQL Server41 Topics
- Reporting Services41 Topics
- Business Intelligence35 Topics
- SQL34 Topics
- Analysis Services28 Topics
- Business Apps22 Topics
- Analytics19 Topics
- ssms10 Topics