Questions tagged [automation]

77 questions
20
votes
2 answers

Is there a cool way of performing CU updates for SQL Server on hundreds of machines?

My company has grown from 50 SQL Servers to over 200 overnight in a merger acquisition. HELP! My questions are: How can I perform CU updates on this many servers and still have a life and keep my sanity? SCCM doesn't seem to be able to perform CU…
Russ Starksen
  • 201
  • 1
  • 2
  • 3
9
votes
3 answers

How can I install the SQL Server PowerShell module on an offline machine?

I have some SQL Server machines that cannot connect to any external sites. I have been using PowerShell more and more when managing databases, so I definitely need this module to be installed so that I can use my PowerShell routines. It has been…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
7
votes
3 answers

Restore All Databases Script

I am migrating SQL Server DBs to a new instance. I have been told that it is possible to dynamically build a RESTORE script from available backups in the system catalog. Does anyone know of a sample script to do this? Thanks!
K09
  • 1,344
  • 10
  • 33
  • 57
6
votes
3 answers

script to show all the permissions for a table

inside my database I have a procedure called spGen2_tblIE_SchedProcess_Update. when I run this script select * from sys.objects where name = 'spGen2_tblIE_SchedProcess_Update' Inside the same database I have a table called tblIE_Step when I run…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
5
votes
3 answers

Automated regular tests of your backups

I was doing some investigation on how other DBAs go about performing automated regular tests of their database backups to ensure recoverability in case of disaster and I'm quite disappointed at what sparse topics I found on the topic. I'll try to…
HansL
  • 51
  • 1
  • 1
  • 3
4
votes
2 answers

how to list all features installed in a sql server instance?

There are other Installation related questions with similar details here and here. I could not find anything related to listing the installed features in sql server 2016 though. I can do it manually looking at the logs - as per the info below, but I…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
4
votes
2 answers

how to script out the user defined table types?

I can Get name and definition of all table types using either of the following scripts: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED IF OBJECT_ID('TEMPDB..#RADHE') IS NOT NULL DROP TABLE #RADHE CREATE TABLE #RADHE ( RADHE SYSNAME, …
4
votes
2 answers

How to find Oracle's installed version and release from a program?

I need to determine from a program what version of Oracle is installed in each of the Oracle Homes on a server. As there may not be any databases created in the Home yet, I need to be able to do this outside of the database (i.e., without…
RBarryYoung
  • 3,011
  • 4
  • 20
  • 41
3
votes
2 answers

updating statistics using STATS_STREAM or WITH FULLSCAN?

the syntax for creating statistics is: -- Syntax for SQL Server and Azure SQL Database UPDATE STATISTICS table_or_indexed_view_name [ { { index_or_statistics__name } | ( { index_or_statistics_name } […
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
3
votes
2 answers

What are points to consider when replacing the SQL Server service account?

In What are the implications of changing the SQL Server Service Logon Account? it mentions that when replacing the SQL Server service account, the service will need to be restarted. But there is more to it than that. According to Configure Windows…
3
votes
1 answer

automatically change value on the table mysql

i have table invoice in my database that contain atributes 'due date', 'date' and 'status'. What i want is data on 'status' change automatically. Example, status (unpaid change to expired) when date past the due date. Does it make sense ?
Adi Satria
  • 31
  • 3
2
votes
1 answer

Trying to use SSRS rsconfig.exe in silent mode to create the ReportServer and ReportServerTemp databases on a local instance

I have installed a brand new SQL 2017 Enterprise instance on a Windows 2019 Datacentre VM. I have then installed SQL Server Reporting Services via the command line (/quiet, /norestart, etc) and all has installed fine. I am able to use…
zapcon
  • 73
  • 10
2
votes
1 answer

How to use grouping sets in this query that shows database sizes - adding the last time it was updated

I have the following query that shows me the database sizes, including log dna data files. SELECT [Database Name] = DB_NAME(s.database_id), [Type] = CASE WHEN s.Type_Desc = 'ROWS' THEN 'Data File(s)' WHEN s.Type_Desc =…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
2
votes
1 answer

How to automate the changes of parameters in ssis package run by a job?

I have a job that runs a package with specific parameters as you can see on the picture below: I want to set up those parameters (the 2 dates in yellow) to 1900-01-01 instead of 2019-02-27. I need to automate this as I have a few of those packages…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
2
votes
1 answer

Having the backup file, how to work out the total disk space required to do the restore?

I have a nice query that gives me the date of last full backup, size and location, even when I backup to multiple backup files. what I don't have is an estimate of the total backup size (for each of the DB files). Basically, how much disk space in…
Marcello Miorelli
  • 14,544
  • 46
  • 126
  • 249
1
2 3 4 5 6