Laden...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Minimal Stats Creation | |
If I want to create statistics in a SQL Server 2022 database, what do I need to include in the CREATE STATISTICS command? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Finding Server Roles I want to query for server roles. I see a DMV for server_principals and server_role_members, but where are the server role names stored? Answer: In master, in sys.server_principals Explanation: Server roles are stored in server_principals alongside the logins. There is a type and type_description that separates logins and roles. Ref: sys.server_principals - https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-server-principals-transact-sql?view=sql-server-ver16&tabs=sql |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Unable to shrink Data File in SQL Server (Taking too much time) - I am using : SQL Server 2017 Standard edition Windows Server 2016 (Standard) Database Size: 1.2TB Used space from the Primary Data File: 300GB Unused space in a Primary Data File : 874GB Recovery Model: Simple I am trying to shrink the Data file to 600GB by using a following Command: DBCC SHRINKFILE (N'TestDB' , 614400) […] |
Administration - SQL Server 2014 |
Replication subscription says inactive - Hi All, I am new to replication, one of my replication subscription says inactive. I just got handover of existing server and it has 4 publications. One of it says inactive, not sure it is really use or not used. Any suggestion to check it is in use. How to fix etc. |
SQL 2012 - General |
SQL Scripts automatically invoked - When detecting the processes in the SQL Server 2012, I found there was a SQL scrit executed automatically automatically many times, the following as attachment, do you know when the script will be executed and when it will be executed? thanks a lot! |
SQL Server 2012 - T-SQL |
Invalid column name Error - hi all, I'm trying to run this query to select from table (as html) to be used for sending an email but actually it keeps giving that only two columns doesn't exist while they are already there, what may be the cause of this error? Msg 207, Level 16, State 1, Line 16 Invalid column […] |
SQL Server 2019 - Administration |
Replication Question - Hi All, I am Replication, I have given one of existing server which has 4 publication and 2 are self replicating to the same server as different DB name and 2 are going to other server. I would like to know, what are all the initial checks I need to do. What are all the […] |
Log shipping restore - On log shipping secondary instance/database, is there an option when restoring database to exclude some most recent transaction log, I mean to restore to some point that is not use the newest a couple of transaction logs for example. Thanks |
does the manual backup break log shipping chain - I have set up log shipping on the server, but if I do a manual backup for other purpose outside of log shipping, will that break the log chain of the log shipping and cause failure of restore or loss of data on the secondary database? Thanks |
Log shipping time_since_last_backup - I am using SQL server 2019, I have a database setup transaction log shipping on Server A, and secondary on Server B. I have a need to setup another database to also use transaction log shipping, also primary db is on ServerA and secondary is on Server B. When I setup the Alert monitor instance […] |
SQL Server 2019 - Development |
how to reverse comma seprated values. - hi, i have coma separated vales in a table. what i want to reverse it like 'CLP,CAD,GBP' pls tell me how it can be done with out using xml in efficent way. Copy DECLARE @TBL AS TABLE (COLUMN1 NVARCHAR(100)) INSERT INTO @TBL SELECT 'AUD,BRL,GBP,CAD,CLP' SELECT COLUMN1 FROM @TBL |
Reporting Services |
Problems with Reporting Services - Execution account - Access db not working - Hi, Im trying to set upp a datasource against a Access db. I can access the database when selecting "As the user viewing the report" but not when selecting "Without any credentials". I have even tried setting up the execution account with my admin user but I get the same error message: "ERROR [HY000] [Microsoft][ODBC […] |
Analysis Services |
Product Hierarchy in a Matrix with 8+ measures on Values-- Perfomance - I'm not new to PowerBI, but I'm new to this problem. I'm working for a company that's creating a PowerBI solution on Azure for a retail company. They have a proper star schema (Sales fact in the middle, and then these dimensions: Product (hierarchy, 8 levels), Date, Store Hierarchy. And then they have like 8 […] |
SQL Server 2022 - Administration |
FAIL_PAGE_ALLOCATION - Hello everybody, today one of our aoag crashed. Suddenly we were not able to connect via SSMS to the aoag listener, or to the actice primary node. We got this entry in the ERRORLOG, but I was not able to found something in the internet: spid143,Unknown,Failed allocate pages: FAIL_PAGE_ALLOCATION 16 (ERRORLOG from the sql server, […] |
SQL Server 2022 - Development |
Advanced SQL Query Optimization Assistance Needed - Hey guys, I'm having a real tough time optimizing a SQL query for my project. I've been working with SQL Server for years, but I've never encountered this issue before. The query is supposed to search for specific date ranges within a large dataset, but the search results are inconsistent, which is really unexpected and […] |
Time allocation across blocks of time - I've been working on this problem for a few days now and cannot find a way to solve it. blockstart | blockend | next_blockstart | ADUserGuid | DispositionId | WorkflowId | StartDate | EndDate -------------------------|--------------------------|------------------------|--------------------------------------|---------------|------------|------------------------|------------------------ 2023-10-01 05:00:00.00 | 2023-10-01 05:14:59.000 | 2023-10-01 05:15:00.000| 123e4567-e89b-12d3-a456-426614174000 | 101 | 1001 | 2023-10-01 05:00:01.00 | 2023-10-01 05:14:58.000 2023-10-01 […] |
How to Efficiently Find and Remove Duplicates in a Large SQL Database? - I have a large SQL database with millions of records, and I've identified duplicate entries. What's the most efficient way to find and remove these duplicates without compromising database performance or data integrity? Are there any best practices or SQL queries that can help in this situation?" This question addresses a common database maintenance task […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024