Loading...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Tonie Huizer): | |
Summing a BIT column with a numeric as the outcome | |
I created a table like this: CREATE TABLE NewTable (record BIT) GO I have this query to run: SELECT record FROM dbo.NewTable AS nt GO The software using the outcome of the code would always expect a numeric value. What SELECT will meet this requirement? | |
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) |
Percentile Memory Grant Feedback Percentile Memory Grant feedback was introduced in SQL Server 2022 as a way to adjust the memory grant feedback not to the last execution, but as a percentile of history. What compatibility levels does this work under? Answer: 140 and above (SQL Server 2017 level) Explanation: While this was introduced in SQL Server 2022, it works under databases with compatibility levels 140 and above on SQL Server 2022 instances. Ref: Memory Grant Feedback - https://learn.microsoft.com/en-us/sql/relational-databases/performance/intelligent-query-processing-feedback?view=sql-server-ver16#percentile-and-persistence-mode-memory-grant-feedback |
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 2016 - Administration |
System versioned tables permissions - I have an issue with these permissions which I don't understand. When I add a user to a database containing some system versioned tables and look at their effective permissions, using SSMS, on tables I get the following: Ordinary tables - No permissions which is what I would expect System versioned history tables - An […] |
Index - I have Index Maintenance Job I have stand alone secondary server when I run on secondary server it takes only 10 minutes to complete When I run in Production it takes 2 hours to finish I copied the same DB to secondary stand alone server and still it takes 2 hours to complete but server […] |
SQL Server 2016 - Development and T-SQL |
Extracting just the text in parenthesis - Stand down. Found the solution |
Administration - SQL Server 2014 |
Database Mail Using TLS 1.2 - Hi, Has anyone had any experience in changing Database mail to use TLS 1.2....that would be enabling the Checkbox to use SSL in the mail configuration. I have added the registry settings as per a number of sources. To clarify do I need to restart Server, services or just agent. One source said agent would […] |
SQL Server 2019 - Administration |
sql_variant to varchar is not allowed - Getting the following error: Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query. ==== Table LogonInfo has the following columns: Spid int UserName nvarchar LogonDate datetime ClientNetAddress varchar Hostname nvarchar I have the following trigger to capture/insert into the table above: CREATE OR ALTER TRIGGER […] |
SQL Server 2019 - Development |
partitioning a table - Hi Team , I want to partition a vey huge table . It has approximately 2109955648 rows . I am planning to partition the tables based on day_id as this column is used to filter the data by all the queries . Day_id is nothing but the month in which we had performed the calculation […] |
Error during Restore: Msg 15247, Level 16, State 1, Procedure sys.sp_MSrepl_chec - My Backup/Restore job is failing - only when the DB is involved in REPL. Looking to see if anyone has a resolution: So this works fine: Create transactional PUB1 (all tables, views, procs) on Server1 DB1 Create SUB1 on Server 2 (populate DB1 on Server2) pulling from PUB1 on Server1 We now have req'mnt to […] |
SQL Server 2008 - General |
Code Correction - The underneath code works on higher sql versions(2016 etc) but throws an error on 2008R2. Error:Msg 102, Level 15, State 1, Line 19 Incorrect syntax near '('. Thanks SET NOCOUNT ON declare @tmp table(name nvarchar(500),Status int) insert into @tmp SELECT name,0 as completed FROM sys.databases WHERE (state_desc = 'ONLINE') DECLARE @dbname nvarchar(500) DECLARE @cmd […] |
Working with Oracle |
Log shipping or Sychornization for Oracle vs SQL server - I would like to ask someone working on both Oracle and SQL server. For oracle, we have a script on a standby server that restores the archive log every 5 hrs from a production server ServerA to a report readonly server ServerB I see in the script that runs from synchronizing job which is scheduled […] |
Log shipping or Sychornization for Oracle vs SQL server - I may click twice, delete this duplicated one |
Reporting Services |
Open Report for editing using Report Builder 15 or below - Want to open SSRS report for edit using Report Builder 15 or below using JQuery function. Using this JQuery Function : tree.on('click', '.edit-report', function (event) { var dataPath = $(this).attr('data-Path'); window.location = dataPath; // Open the URL in a new window //window.open(url); event.preventDefault(); }); data-Path="@(string.Format("{0}/ReportBuilder/ReportBuilder_15_0_0_0.application?{1}", Settings.ReportServerUrl, item.Path.Replace(" ", "+")))" It is redirecting to report Manager. […] |
Error configuring SSRS. The database engine instance is not valid. - Hi, This is a strange one. The error indicates that the database engine instance is not valid, but according to the documentation it should be valid. Does anyone have any ideas why this is occurring? Thanks in advance. Error: The database engine instance you selected is not valid for this edition of report server. Current […] |
General |
SPN Help Needed - We have a .NET web application on a web server [MyWebSvr] and the database for the application is on another server [MySQLSvr]. The application is running fine and has been for years but the domain admin who setup the SPN's and delegation left the company years ago and did not document how the SPN's and […] |
i need to automate some functions - hi all, i have to compare 9 times same scheme of table but each table keeps data for different device. my purpose is to list all the tables and then with cursor to build my queries.the need is to check if the table contains null values in all fields. i run one query to count […] |
SQL Server 2022 - Administration |
Just joined but can't change sa or my new sql login - Trying to connect from sql express 2022 to the azure data studio and to a template in microsoft InfoPath. I'm pretty sure i have had it working once with azure but what i can't get to happen is i can't get the default sa administrator password to update with a new one. It accepts new […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading...
Loading...