Query to Excel Stored Procedure
Transform your query result into an Excel file using this technique.
Transform your query result into an Excel file using this technique.
While software is among the most widely used products in human history, it also has one of the highest failure rates due to poor quality. In this article, Cynthia Dzikiti explains how quality should be part of all aspects of the software lifecycle.
Demo and script on how to script out SSIS Environments and their associated variables
Visualization is often the first step in analyzing data. Python makes visualization easy. In this article, Robert Sheldon demonstrates how to generate multiple charts from one dataset using Python with SQL Server Machine Learning Services.
The elevation of privileges is a large security problem and Steve Jones discusses his fears. Would you know if someone successfully attacked your instance?
Power BI Dashboards can be kept current using simple DAX formulas in your data models. Save yourself time and energy by understanding how dashboard tiles work on PowerBI.com and what can be done to set your dashboards to a current period.
Koen Verbeeck looks at how to hide tables or columns in Analysis Services Tabular 2017 for certain users so they are not able to use them in reports or query them.
Many DBAs monitor for those events they expect to happen, either successfully or failed. However many DBAs wouldn't be aware of an event never occurring.
By default, SQL Server does not encrypt data in a SQL Server database in an encrypted format. When SQL Server 2008 was introduced, Microsoft implemented Transparent Data Encryption (TDE). When TDE is enabled on a database SQL Server will encrypt the database as data is written to the disk.
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,...
By Tim Radney
As a SQL Server DBA with years of experience tuning production environments, I’ve seen...
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
Comments posted to this topic are about the item Index Fragmentation Explained: Page Splits,...
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