Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [automation]

The tag has no usage guidance.

0
votes
2answers
23 views

Delete old records based on its identifier

For example, I have a table similar to this: deviceid | servertime 1 2019-05-13 12:00:00 1 2019-05-14 12:00:00 2 2019-05-13 13:00:00 2 2019-05-12 13:00:00 2 ...
3
votes
2answers
58 views

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 ...
1
vote
1answer
48 views

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 ...
0
votes
2answers
45 views

Looking for recommendation [closed]

I am a non IT background, my recent projects uses PowerShell for a lot of SQL Server administration. I would like to start from absolute zero, and learn to use and code the Windows PowerShell as it ...
0
votes
0answers
14 views

Syncing DDL accross Postgres shards

Our database writing needs exceed the capacity of a single Postgres cluster (since each cluster can only support 1 writer server). To combat this, we've sharded our data across 8 separate Postgres ...
1
vote
1answer
1k views

How to automate CSV-exports of queries in PL/SQL Developer (Oracle)?

I'm no pro in Oracle or PL/SQL Developer (I mostly use and admin mySQL and MS SQL Server). I'm not an admin of any sort, but have read access to many tables in Oracle via PL/SQL Developer. I need ...
1
vote
1answer
52 views

Get a list of Databases which were not modified with in a date range - SQL server [closed]

can we get an output for list of databases which were not modified for last two months in a server and based on that we have to delete all of them. I have tried below is the query: --identify when a ...
1
vote
0answers
38 views

MySQL Shell Python Client library

Is there a python client library available to interact with MySQL Admin API and to do similar stuff that MySQL Shell does. From the documentation of MySQL Shell, I could see that there is a --py mode ...
0
votes
1answer
55 views

How to upgrade a MySQL database using numbered scripts based on a version field

I have a database that contains a version table with one value stored in it which is the database version number. I would like to be able to update the database version automatically using numbered ...
1
vote
1answer
59 views

PostgreSQL - automating database grants [closed]

We're managing about 200 instances of postgres on Amazon RDS. The problem that we're constantly experiencing is that our "DBA" accounts can't access stuff. Basic stuff. Tables, views, etc. Is there ...
1
vote
3answers
1k views

How can I use Invoke-SqlCmd with variables to output the SQL command only or some similar method?

I have a big *.sql file that I run with Invoke-Sqlcmd and variables to do some tasks, and when I have an issue, it's a pain to debug because of the variables and I want to do logging of the SQL script ...
0
votes
0answers
85 views

Data warehousing (ETL): Scheduled data migration from MySQL to PostgreSQL

I've been assigned task of data warehousing for Reporting and data analysis. Let me first explain what we are going to do. Step 1. Replicate production server MySQL database. Step 2. Scheduled ETL: ...
0
votes
2answers
3k views

T-SQL: How create job that run monthly

I already know how to schedule monthly jobs using SQL Server Agent > Jobs, I now would like to learn how to schedule such job using T-SQL. I know how to schedule a job daily at a specific time: ...
0
votes
1answer
147 views

Alternate of trigger in SQL server

is there any other way beside creating a trigger in MSDB system tables to invoke a particular job when any job failed? Basically, I want a particular job ran automatically only if any of the other ...
1
vote
1answer
102 views

Zapier & MS SQL - Use azure DB to increase security?

I'm interested in using Zapier to automate some processes that should be fired upon certain records appearing as the result of a custom query. Zapier seems to be a good tool as it can do things based ...
1
vote
1answer
74 views

how to automate when altering jobs in Always on availability groups?

I often have to alter jobs i.e. adding steps, changing the stored procedures the job calls, etc. and I always need to do the same thing on all servers in my availability group. when dealing with jobs,...
0
votes
1answer
101 views

is there any reason to explicitly grant the server permission CONNECT SQL?

I have been using this script from Kenneth Fisher to get the server permissions. -- Server Permissions SELECT Grantee.principal_id AS GranteePrincipalId, Grantee.name AS GranteeName, Grantor.name ...
1
vote
1answer
1k views

How to configure AutoMySQLBackup?

How I can configure AutoMySQLBackup to backup some selected tables ones per week while the other tables will be backed up every day? Thanks. P.S. My google search ninja skills is not working. :)
4
votes
2answers
399 views

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 ...
0
votes
1answer
228 views

Autopostgresqlbackup - DBEXCLUDE doesn't works

I'm trying to exclude some databases using the DBEXCLUDE option,but there's daily backups anyways. # =============================== # === Debian specific options === #================================...
1
vote
1answer
58 views

Naming convention for automated table outputs (processed with Python)

I have several tables that I process nightly with Python. For example, I have read-only access to an incidents table. I process the table with a specialized Python library called ArcPy. The script ...
1
vote
0answers
187 views

Can you script the MDS database upgrade after SQL Patch applied

I have recently automated the SQL patching of ~200 development servers. Currently we have 6 servers that run the Microsoft Master Data Services feature. After a SQL patch is applied there is a ...
1
vote
0answers
754 views

Start/stop postgresql with pg_ctl or service without root access on RHEL6

We plan to use postgresql on RHEL 6. DBAs won't have root access but they will need to start/stop the databases. They'll be able to do so with pg_ctl as postgres. However databases should also start ...
3
votes
0answers
925 views

How do I create an automated SQL Server restore script for multiple backups? [duplicate]

I basically have 6 daily SQL Server backups (.bak) that need a restore everyday. I want to automate this process by having the SQL Agent run the script daily. I have the following restore script ...
1
vote
3answers
413 views

Any script to auto test tune and benchmark mysql config?

I'm looking or willing to do a script to benchmark mysql config variations for a specific system. A script that would change certain mysql config values and do a sysbench, save results, change ...
3
votes
2answers
4k views

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 ...
-5
votes
1answer
131 views

can anyone help me in generating a automated script to create a database

I need help in generating a automated script for database where I can give parameters for database name, size etc. I need automated script to create a database where in I can give parameters for ...
2
votes
3answers
526 views

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 ...
2
votes
3answers
5k views

Script to backup all databases

I'm working on automating backups of SQL Server databases on SQL 2008 R2 Express. These backups are initiated daily by the Windows Task Scheduler, which execute a batch file, which in turns executes a ...
-1
votes
1answer
304 views

How to write the bash scripts with automatic function in postgresql?

To save the bash as create_mysql.sh, we can create a database magento and a user magento_user with full privileges by password. mysqlword="xyzzy" mysql -u root -p$mysqlword -e"CREATE DATABASE magento;...
2
votes
1answer
135 views

Trace flag is running, but not message when deadlock happens

Trace flags are used to temporarily set specific server characteristics or to switch off a particular behavior More information on the trace flags are here DBCC TRACESTATUS this above, is the ...
0
votes
1answer
40 views

How can I inform myself that an automatic SQL Server process has worked?

I have a Windows batch file which extracts some data from a remote system and then imports it into an instance of MS SQL Server 2014. The batch file runs SQLCMD and uses SQL files to bulk insert from ...
3
votes
1answer
766 views

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 ...
19
votes
2answers
7k views

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 ...
7
votes
3answers
8k views

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 ...