2004-09-22
1,770 reads
2004-09-22
1,770 reads
2004-09-15
1,983 reads
2004-11-05 (first published: 2004-08-08)
1,703 reads
This procedure will execute, taking two parameters, (the 2 db names, and will then list out the major object and schema changes for you. It is pretty sraight forward and suggestions are appreciated. It's a good utility for a DBA to track changes after upgrades, etc.. Each portion is easily convertable to a stand alone […]
2004-08-02 (first published: 2004-07-16)
1,110 reads
SQL Server high availability. Log shipping or replication, clustering or some other solution. It's a challenge and as companies grow more dependent on their databases, it's one that more and more DBAs face everyday. Paul Ibison has taken a look at how log shipping and replication can be compared in the quest for high availability.
2008-06-27 (first published: 2004-06-17)
66,430 reads
Given a backupfile with a lot of sequential log-backups, this script automatically restores just those backups out of the file, which are necessary to bring the database up to a given timelag relating to the original database.Params are path to backupfile, name of the db to restore to, timelag in minutes.
2004-09-08 (first published: 2004-05-28)
1,650 reads
Modification of DR_Script_Logins.sql by Bruce Canady.Puts out a script to add new logins or change the password of existing logins.I insert the output into a table in my production-db. insert database.dbo.login_table exec master.dbo.dr_script_loginsThat way its backed up with the data, and the logins can be restored anywhere by the script i added at the […]
2004-09-03 (first published: 2004-05-26)
2,537 reads
Some days the simplest things go wrong. On this particular day Andy tried to remove a column that was part of an article in a transactional publication, wound up in an inconsistent state that required a snapshot to fix. Deeper investigation reveals the cause and a work around.
2004-05-25
7,555 reads
Script to look at all articles in all publications in a DB to find replicated columns of certain data types. I used this to find BLOB columns that we wanted to remove from the articles.
2004-08-09 (first published: 2004-02-19)
465 reads
This article covers how to build the snapshot subscription without getting bogged down in too many low level details. You'll learn enough here to get started experimenting and get results. Depending on comments from you, we may ask Andy to move on to transactional replication or to dig deeper into snapshot options. Tell us what you think!
2004-02-04
7,745 reads
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