Blog: How to Script a Profiler Trace as a SQL Trace Data Collection Set
MVP Brad McGehee shows how you can use Trace data as a source for your data collections for the new Management Data Warehouse
2008-10-01
2,900 reads
MVP Brad McGehee shows how you can use Trace data as a source for your data collections for the new Management Data Warehouse
2008-10-01
2,900 reads
I am trying to build an SSIS package where the entire package is encapsulated in a transaction. In addition there is a table that needs to remain locked for the duration of the SSIS package execution. Can you provide an example of how to do this?
2008-10-01
4,495 reads
Although current databases limit XML processing to linear XPath or XQuery queries, existing hierarchical database techniques enable far more complex queries using standard SQL.
2008-10-01
3,542 reads
This article describes how Database Administrators can manage SQL Server workload and critical system resource consumption using Resource Governor in SQL Server 2008
2008-09-30
2,126 reads
This is the final article of a three part series on Auditing in SQL Server 2008. This article shows how to setup a Database Audit Specification.
2008-09-30
2,246 reads
One of the ongoing challenges of a DBA is to backup and restore databases. Backups are done on an automated schedule, but restores can take on many different versions, you may need to restore a production database, restore a development or test database or just create another copy of the database somewhere else. There are several ways of automating the restore process and creating a script, but this approach shows a way this can be done by just reading the contents of a directory for the backup files that exist.
2008-09-29
4,985 reads
This article describes how the Object Catalog Views can be used to determine the number of rows in a table
2008-09-29
3,623 reads
This white paper presents an overview of cryptographic functionality and discusses how this applies to authentication, signed procedures, permissions, and encryption. Because the target audience is the database professional and not necessarily security experts, the focus is on practical ways to use cryptography in SQL Server.
2008-09-26
3,859 reads
Inspired by what he recently found in some SQL Server shops, database architect Brian Walker shares advice for improved database design – and SQL Server performance.
2008-09-26
5,999 reads
This fifth installment of the “Check your SQL Server using Windows PowerShell” series illustrates how to access SQL Server instance properties and SQL Server configuration details using Windows PowerShell.
2008-09-25
2,762 reads
If you’ve been watching AI roll through the data community and thinking, “this seems...
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...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Hi All I am trying to find 'bad' characters that users might type in....
Comments posted to this topic are about the item Extreme DAX: Take your Power...
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