Restore script genrator for moving dbs
usefull script for moving databases from one server to another
2014-04-23 (first published: 2014-03-29)
937 reads
usefull script for moving databases from one server to another
2014-04-23 (first published: 2014-03-29)
937 reads
2014-04-22 (first published: 2014-02-20)
2,187 reads
Backup all databases for an instance (complete, Differential or log of transactions)
2014-04-21 (first published: 2014-04-05)
1,082 reads
THis script will generate the Drop and create script for all user define table type
2014-04-18 (first published: 2014-03-25)
1,205 reads
2014-04-17 (first published: 2014-03-25)
1,299 reads
2014-04-14 (first published: 2014-03-18)
6,974 reads
The query will help to get the column level difference for 2 database(Like Prod and Dev database). This help us to verify what are the column changes has been done in dev environment after Prod deployment.
2014-04-10 (first published: 2014-03-11)
1,057 reads
This script shows the stored procedures and functions affected by field name change in a table.
2014-04-09 (first published: 2014-03-18)
1,062 reads
Use the following queries to list a result set of all column data types to any specified database. In the 2nd query, you will see a result set based on all text based data type columns in your database (XML data type not included). Modify accordingly.
2014-04-07 (first published: 2014-03-12)
1,683 reads
2014-04-03 (first published: 2014-03-12)
1,192 reads
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