Laden...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
A New Audit | |
I have a brand new D: drive on my system that is formatted, but contains no files or folders. What happens when I execute this code? CREATE SERVER AUDIT audit2 TO FILE ( FILEPATH ='D:\audit' ); GO | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Alessandro Mortola) |
Daylight Saving Time I have a Sql Server 2022 instance setup with '(UTC-05:00) Eastern Time (US & Canada)' as timezone and a PostgreSQL 16 cluster setup with 'America/New_York' as timezone; both of them have -05:00 as UTC offset. Given that in New York, in 2024 Daylight Saving Time will begin on Sunday, March 10, at 2 AM, what happens if I execute the following statements in their own environment? Sql Server: select dateadd(HOUR, 1, cast('20240310 01:00:00-05:00' as datetimeoffset(0)));PostgreSQL: select date_add('20240310 01:00:00-05:00'::timestamptz, '1 hour'::interval);Answer: Sql Server returns "2024-03-10 02:00:00 -05:00" while PostgreSQL returns "2024-03-10 03:00:00-04" Explanation: The Sql Server data type datetimeoffset is NOT aware of the daylight saving time while timestamp with time zone is.
|
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 2012 - T-SQL |
Row_Number issue.... - Hi I know I'm doing something wrong in my row_number logic, just not sure what.. My data looks like this coid , caseoid , date , RN 969284, 24066903, 2024-02-06 00:00:00.000, […] |
Row_Number issue.... - Hi I know I'm doing something wrong in my row_number logic, just not sure what.. My data looks like this coid , caseoid , date , RN 969284, 24066903, 2024-02-06 00:00:00.000, […] |
Row_Number issue.... - Hi I know I'm doing something wrong in my row_number logic, just not sure what.. My data looks like this coid , caseoid , date , RN 969284, 24066903, 2024-02-06 00:00:00.000, […] |
SQL Server 2019 - Administration |
Additional Monitoring on RDS Sql Server - Hi, Can someone let me know if we need to setup any additional monitoring on RDS Sql Server Instance. Enhanced monitoring is already enabled on this instance. Thanks, |
The audit file has not been deleted. - Hello I recently set up an audit on my server to track some connections. ,The audit works correctly without any problems. The only problem is that I get an error message like SQL Server can no longer delete This is how my audit configuration looks.he old audit file. Would anyone of you have an idea […] |
SQL Server 2019 - Development |
How to import csv file - I'm trying to import this csv file but i am unsure how. The demo row has a bsu id and the rows below it are related to that id until another bsu id is shown. Any ideas on what I should do? I've been told it is similar to an 837 file. I've attached […] |
Can SSIS run C/C++ Script? - hi everyone I need a particular calculation done that is really hard to do in SS so I am using another program for it. The other program allows the code to be exported to C/C++ format. I know that SSIS can run C# code. Can it also run C/C++ code? thank you |
SQL Azure - Development |
Working with views - Dears, Hope this message finds you well I would like to ask if there is any difference from a performance perspective between joining to make a View from two base tables, or if its better to create from each base table a like to like view and after, create the view which is a join […] |
Powershell |
iterate through servers with drive names - $Drives = Get-PSDrive -PSProvider 'FileSystem' foreach($Drive in $drives) { #select largest file in given directory Get-ChildItem -Path $Drive.Root -Recurse -File -ErrorAction SilentlyContinue -Force | Sort-Object Length -Descending | #Select-Object -First 10 select -first 10 name, Length,fullname } ConvertTo-Html -Property Name,Length,FullName -Head $Header |Out-File E:\ServersL_$((Get-Date).ToString('MM-dd-yyyy_hh-mm-ss')).'html' Not creating a html file with data.Only empty html file. How […] |
Code issue - A job step received an error at line 33 in a PowerShell script. The corresponding line is 'Get-WmiObject -ComputerName $serverName -query " '. Correct the script and reschedule the job. The error information returned by PowerShell is: 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) '. Process Exit Code -1. The step failed. The code […] |
Analysis Services |
AAS models refresh through ADF Dynamically - Hi All, I am working on a solution to automate the Azure Analysis Service models (AAS models) through ADF. I will have json available either in a column of a tables or in a file. Currently i am testing with taking dynamic values from a table in ADF using Lookup activity and using those values […] |
Passing dynamically changing Column values from one Power BI page to another - I have a report Page 1 in Power BI, where I have a table that has Load ID column. I have another page (Page 2), where I have a route map related to the Load ID selected on the slicer. The 2 Load IDs in these two pages come from 2 different SQL views, but […] |
SQL Server 2022 - Administration |
CX WAITS - DOP SETTINGS - Hi I have a job that calls a stored proc. Every since we updated to SQL2022 (running in 140 compatibility mode) I've noticed that this and other similar procs produce a CX_PORT wait. They do this every time they run and if I check who is active there are no deltas records being moved at […] |
SQL Server 2022 - Development |
Comparison of varchar data from two different tables - I need to find Generic_Code from the table. Data in Length_Min, Length_Max, and Length columns are varchar data. The query is not return any data. Length contains '00:15:18' so my query has to pick up Generic_Code = '3000623WVD'. I am wondering what am I doing wrong here. The first subquery returns all five rows instead […] |
Query Performance Tuning - Dear all, Thank you for looking into my question. I have a table with 7.2 million records (table size 3 GB, Index size 1.6 GB). It has about 7 non-clustered indexes and a clustered index and the statistics are up-to-date. I wrote a query to have a foreign key lookup from the table above. The […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024