How to Connect SQL Server and Create C# Objects for Data Management
Learn about how you can work with your SQL Server data from C#. A good basic tutorial for beginning C# developers.
Learn about how you can work with your SQL Server data from C#. A good basic tutorial for beginning C# developers.
This article covers the concepts of roles, schemas, grants, privileges, and owners and the similarities and differences in SQL Server, Oracle, and PostgreSQL.
Find the latest insights on digital modernization and the role of the database in it in our new resource page. With articles and webinars from Redgate leaders and friends of Redgate.
This level will show how to create objects including a login, a database, a filegroup, a file a database user and then we’ll end with a table and an index.
Poor patterns and practices are code smells. Steve Jones notes we have plenty in T-SQL.
One of the most important aspects of data management is the ability to ensure that the data in your database is well defined and consistent. Some aspects of that are ensured through the relational data structures you design. Another piece of control is using the correct data type. Then, we get to constraints. A constraint is a way to validate data prior to adding it to your database. This is one more tool in the toolbox that helps you maintain good data.
The conversation around Artificial Intelligence (AI) is not a new subject to the database space, but the recent rise in machine learning tools like ChatGPT have sparked increased focus on new ways to simplify existing DBA challenges.
Join Redgate’s own DevOps Advocate, Steve Jones, along with webinar guests Kellyn Pot’Vin-Gorman (Principal Cloud Solution Architect, Microsoft) and Brian Randell (Product Marketing Director, Github) to discuss how AI could help manage complex database ecosystems.
See how well ChatGPT works with questions on generating PowerShell code.
We need to measure and monitor things to become better, but we need to keep an eye on what the actual goal is from this monitoring.
Learn about the new functions LEFT_SHIFT and RIGHT_SHIFT in SQL Server 2022 and how these functions could be used.
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