Scripts

Technical Article

Get Number of Days in month

Have seen existing scripts to work out number of days in month. They tend to work out the month, and then whether it's a leap year.Another approach is to take the date passed in, find the first day of the next month, and then use Datadd to take off one day, ie: last day of […]

(1)

You rated this post out of 5. Change rating

2002-10-17

455 reads

Technical Article

sp_checksqlversion

How many times have you seen @@version return a number but failed to interpret what service pack it is? Although SQL 2000 gives a gift (SERVERPROPERTY) of querying a readable value, my script will remedy the puzzle and show more parameters such as CPU speed, memory, windows version, and installation date. The limitations are:1. MSDE […]

You rated this post out of 5. Change rating

2002-10-16

468 reads

Technical Article

Create And Execute Table Script (SQL Server 2000)

This SP will only work on SQL Server 2000 and can be placed in your master database. sp_CreateAndExecTableScript is designed to script one table and create an identical table. I designed it to use with DTS packages so that I can create an identical table with a different name, pump data into the table and […]

(3)

You rated this post out of 5. Change rating

2002-10-15

2,561 reads

Technical Article

Linked SQL Servers,  databases, and users Report

Fixed user protion of the script. Sorry had the test script mixed with prod. I was asked to create a report listing all of our SQL Servers, and the databases on them. I was also asked to list everyone that has access to each database and whether it was a standard, windows or windows group […]

You rated this post out of 5. Change rating

2002-10-15

1,067 reads

Technical Article

Proc to script a user role and object permissions

I wanted to be able to prepare a script of User Roles and permissions for objects in a database so I can be prepared for backup and disaster recovery scenarios. I also wanted to be able to audit the permissions for each role.I wrote this stored procedure to do this.  The usage is:Use NorthwindgoDECLARE @RC […]

You rated this post out of 5. Change rating

2002-10-09

962 reads

Blogs

Microsoft Fabric Data Agents: Bringing Structured and Unstructured Data Together

By

Most enterprise questions do not live neatly in one place. The numbers may be...

Keeping Redshift System Table History Past 7 Days with S3 Tables

By

Redshift keeps its SYS_* monitoring views for seven days in cluster, which is fine...

Updating the Data API Builder

By

I was updating my session for the Data API Builder (DAB) recently, mostly to...

Read the latest Blogs

Forums

BCA KCU BLOK A CIPETE Telp:0821-8200-233

By layanan_Bca88

Telp/Wa 62 8218200233 PQHX+93W, Jl. RS. Fatmawati Raya No.6 A, RT.1/RW.5, Cipete Sel., Kec....

Alamat Kantor BCA KCP Tebet Telp:0821-8200-203

By m4rt1n4

Telp/Wa 62 8218200203 Gedung Gajah Tebet, Jl. Dr. Saharjo No.Raya 111 Unit N &...

Alamat BCA KCP Tebet Barat Telp:0821-8200-174

By R4nt4u

Telp/Wa:62 8218200174 Jl. Tebet Barat IX No.40, RT.6/RW.4, Tebet Bar., Kec. Tebet, Kota Jakarta...

Visit the forum

Question of the Day

Tracking All the Queries

I have 3 instances of a brand new long running query that are executing on a SQL Server 2025 instance. Query store is enabled. One of the queries is killed by the administrator, one is cancelled by the user. The other runs to completion. How many rows are in Query Store for this query?

See possible answers