Viewing 15 posts - 16 through 30 (of 1,363 total)
It depends!
Your other options are Hierarchyid or nested sets.
Security can also be done in SQL Server with RLS.
March 12, 2024 at 10:05 am
I am not a SSIS expert but with regards to authentication methods:
March 8, 2024 at 4:48 pm
2. Sign a SP for permissions in another Database.
/* Only works with DML */
USE <main_db, sysname,>;
GO
SET ANSI_NULLS, QUOTED_IDENTIFIER ON;
GO
CREATE OR ALTER PROCEDURE <schema_name, sysname, dbo>.<proc_name, sysname,>
AS
SET NOCOUNT,...
March 8, 2024 at 2:47 pm
1. Sign a SP for permissions within the same database.
USE <Main DB, sysname,>;
GO
SET ANSI_NULLS, QUOTED_IDENTIFIER ON;
GO
CREATE OR ALTER PROCEDURE <schema_name, sysname, dbo>.<proc_name, sysname,>
AS
SET NOCOUNT, XACT_ABORT ON;
RETURN;
GO
GRANT [rights]...
March 8, 2024 at 2:46 pm
Further reading:
https://straightforwardsql.com/posts/cross-db-access-with-module-signing/
https://sqlquantumleap.com/2017/12/30/please-please-please-stop-using-impersonation-execute-as/
This is detailed and probably requires you to place a bag of frozen peas on top of your head.
https://www.sommarskog.se/grantperm.html
Also, here are some outline SSMS templates (Ctrl...
March 8, 2024 at 2:45 pm
As alter will work with a certificate in a single database, the way around this is to create a signed SP in db2 to truncate the table and then call...
March 8, 2024 at 2:09 pm
I have just managed to quickly look at this again. The problem is with the ALTER permission and TRUNCATE TABLE as it seems to work fine if the SP just...
March 8, 2024 at 10:51 am
While not clear, it seems as though you have a database in FULL recovery which has not had a log back in 3 or 4 years. The log file must...
March 6, 2024 at 3:59 pm
I would look at dynamic sql as well.
DECLARE @FilterId int = 4;
WITH CityTypes
AS
(
SELECT City, [State], CityType
FROM dbo.SampleData S
...
March 6, 2024 at 1:01 pm
-- Create a login with a strong password
CREATE LOGIN [NewUser] WITH PASSWORD = 'StR0nG_p@ssW0rd!';
I am not sure SQL Server authentication represents best practice but I suspect it...
March 1, 2024 at 1:39 pm
We had a cyber incident (sic) late last year and it was actually our ISP who picked up the problem. I doubt AI was involved as I think they found...
February 28, 2024 at 7:40 pm
we have Veeam which takes server backups.
If your databases are only being backed up to Veeam, I presume you are automating test restores from Veeam and running DBCC CHECKDB...
February 24, 2024 at 9:49 pm
SELECT n_type
,COUNT(1) AS Total
,SUM(IIF(d_type = 'a_type', 1, 0)) AS a_type
,SUM(IIF(d_type = 'b_type', 1, 0)) AS b_type
,SUM(IIF(d_type = 'x_type', 1, 0)) AS x_type
FROM @temp
GROUP BY n_type
ORDER BY n_type;
January 30, 2024 at 8:22 am
Ken's code is nice, but theoretically I believe it could yield a false positive if the previous month happened to be 13 months prior to the current month. For...
January 11, 2024 at 8:01 pm
Viewing 15 posts - 16 through 30 (of 1,363 total)