Dealing with custom date formats in T-SQL
Should I be formatting dates on the database side? What tools can I use in SQL Server to format and parse dates? This article helps you decide which one best suits your needs.
Should I be formatting dates on the database side? What tools can I use in SQL Server to format and parse dates? This article helps you decide which one best suits your needs.
This Friday Steve Jones asks about maintenance. Do you have regular windows? Flex time? Or is maintenance just added on whenever it is needed and added onto your work week.
SQL Server 2008 R2 brought several new features into the SSRS (SQL Server Reporting Services) arena. In the data visualization category, we now have three additional ways to display and visualize/analyze data in the reports.
This demo will show you the how powerfull is powershell. We will use cicles and the get-content command.
Today we have a guest editorial from Andy Warren as Steve Jones is on vacation. Today Andy talks about personality tests and what they might tell you about yourself.
From the previous AlwaysOn Availability Group article, we provided a name for the availability group listener which is simply a unique DNS name as a Virtual Network Name (VNN) to direct read-write requests to the primary replica and read-only requests to the read-only secondary replica.
This SSIS package performs multiple XSL transformations on an XML document, then shreds the transformed document and inserts its data into a SQL Server table.
Today Steve Jones talks about the pace of data growth looking to outpace the IT budget changes. As data professionals, we need to learn to do more with less.
Introducing the replication monitor and how to use it to monitor replication health. It also introduces tracer tokens.
How can a company attract talent? First, be a good company to work for, and then be real.
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers