Skip to main content

Questions tagged [scripting]

For questions about generating or using language scripts, for example scripting a database object definition.

2 votes
1 answer
92 views

DBeaver @include using a variable for filename not working

I am trying to write a script to run in DBeaver (Version 24.0.0) it determines what schema update scripts to run based on a table in the database that records the schema updates already run. It then ...
Sarah Holley's user avatar
2 votes
0 answers
26 views

Programmatically create a Role with Permissions within pgAdmin’s internal user management

I am asking about pgAdmin internal user management, not Postgres users-and-roles. For teaching a beginning database class, I am trying to procedurally configure pgAdmin in Server Mode, using shell ...
Basil Bourque's user avatar
0 votes
0 answers
30 views

Periodic copying, synchronizing, forwarding and merging of SQL database tables with MSSQL Express?

There is a modification project in our Process Plant related to SCADA application (Process Automation System) and I am looking for reliable advice/ suggestions from experienced members related to SQL ...
Hmbl3Lrnr's user avatar
0 votes
1 answer
121 views

How to automate the dropping of databases?

Working on a script to drop databases. In some of the environments our databases are regularly restored from live, replication (merge or transactional) established, processes run and tested, then, the ...
Marcello Miorelli's user avatar
0 votes
1 answer
191 views

Help with creating postgres databases with - in the name

I'm currently trying to script some migration of databases on a server. As part of this process I will need to create a new database with a similar name to the existing database. Whilst I have this ...
Mr-F's user avatar
  • 101
0 votes
1 answer
165 views

How to execute complete database script without checks on objects existence

I'm working on a customer data archiving. I created a complete database script to prepare the new database for archiving data with the same DB schema of the production one. At the moment I'm preparing ...
El See's user avatar
  • 1
0 votes
1 answer
67 views

Display in asc order from multiple databases under multiple linked server and add two date parameters so that I can integrate it to my app

I have a script below where it display a result from different databases under different linked Server. The query is just connected or linked thru union all and it seems there's no issue on its result....
Caspersky12's user avatar
0 votes
1 answer
83 views

Extra `CASE WHEN` Removes Text from Dynamically Created String

I am trying to generate a CREATE TABLE statement based on a given table in my SQL-SERVER database using the INFORMATION_SCHEMA tables, but when I try and concatenate the DEFAULT portion of a field ...
javery's user avatar
  • 3
0 votes
2 answers
147 views

Do I need the MDF and LDF files when I run a script to generate my schema? [closed]

I'm migrating a database from SQL Server 2019 to SQL Server 2017. To do so, I am using the "Generate scripts" feature in the source database to generate the schema and data separately. (I ...
arnoldbird's user avatar
2 votes
0 answers
346 views

sp_OACreate script returns Null value from API fetch? The API works well in a html file

I am trying to create a script in Microsoft SQL Server Management Studio to fetch the current exchange rate from an API and update a database. I am told it is not posisble and common to do this. -- ...
Luis Avalos's user avatar
0 votes
1 answer
67 views

Do SQL Server have the utility same as Oracle Wrap Utility?

i have made a useful scripts in my environment and i want to wrap the script same as Oracle Wrap utility can do. is there any other way to the same in sql server?
zul nasir's user avatar
1 vote
1 answer
1k views

Error with dbatools

Trying to export SQL Objects via DBAtools in Powershell. Get-DbaAgentJob -SqlInstance 'TestServer01' -Job 'mydatabase-daily-backup' | Export-DbaScript -FilePath C:\temp\mydatabase-daily-backup.sql ...
Prakash's user avatar
  • 11
0 votes
1 answer
124 views

How to rapidly compare definitions of many tables of two PostgreSQL databases?

I have two PostgreSQL databases, the one for producing, and the other for testing. Both of them have a lot of tables with same table names. Now I need to upgrade the producing system to the new ...
Leon's user avatar
  • 413
0 votes
2 answers
800 views

Loading multiple CSV files into mariadb table using LOAD DATA INFILE and shell script

I'm attempting to load CSV data into a mariadb table. MariaDB is running in a docker container and the CSV files have already been copied in the container as well. I'm already able to successfully ...
Roshan Upreti's user avatar
0 votes
1 answer
54 views

How to migrate a database from 2016 to 2014 if there are encrypted/locked objects(SPs) associated with it?

I am trying to migrate a database from 2016 to 2014 through Task-->Generate Scripts. There are some stored procedures that are locked and seems like they are encrypted as well. They are causing ...
user2664231's user avatar

15 30 50 per page
1
2 3 4 5
24