Questions tagged [testing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
28 views

Writing .spec files for PostgreSQL isolation tests

I am developing a PostgreSQL extension for which I would like to run some tests with concurrent connections. If I understand the documentation correctly, I should be able to do so using the PGXS ...
BigSmoke's user avatar
  • 684
2 votes
1 answer
256 views

How to cause a SQL Server database integrity error

I have created a stored procedure that uses dbcc checkdb on all userdatabases, if there are any errors detected it then collates the errors and formulates a html table and sends an html email to ...
BLoB's user avatar
  • 153
1 vote
1 answer
653 views

Create database from template database, concurrently, in Postgres

In order to run integration tests concurrently, I wish to create a sample database at the beginning of every test. Theses test databases are "clones" of an immutable reference database (the ...
laurent's user avatar
  • 123
0 votes
1 answer
94 views

How to handle an expected exception in base postgres

I want to be able to write a .sql script that will carry out an action which fails, and the script should only report failure if the action doesn't fail. For example, given initial table: create table ...
baxx's user avatar
  • 296
0 votes
0 answers
203 views

How to compare data between MYSQL and PostgreSQL table?

A database of MYSQL is migrated to Postgres. I need to check whether all the data records have been transferred correctly. Is there a way I can compare the contents of the two tables residing in two ...
user avatar
1 vote
2 answers
415 views

Is database development stages the same as software development?

In software development, there are a series of stages that it will goes through - Dev, Test, UAT, Staging, Demo and Production. This is what I feel is correct, after reading/researching through the ...
SunnyBoiz's user avatar
  • 143
0 votes
0 answers
110 views

SQL Server - cloning a subset of a database for a test environment

I'm trying to set up an automated script which I can run on a schedule in SQL Server 2016 (probably nightly) to copy the structure of our production database and then transfer a subset of data into ...
wizzardmr42's user avatar
0 votes
1 answer
185 views

Stop Dataguard configuration to test standby database

I would like to know how it would be the correct way in which I should proceed to stop the Dataguard configuration in order to perform a series of tests on the standby database. It turns out that I ...
miguel ramires's user avatar
0 votes
0 answers
63 views

How to speed up restore database from snapshot in SQL Server? [duplicate]

To revert a test database to an initial state (after running a test), I would like to restore the database from snapshot. I'm using the following script to achieve that. However, the script execution ...
Jakub Janiš's user avatar
2 votes
2 answers
803 views

Speed up restore database from snapshot

To revert a test database to an initial state (after running a test), I would like to restore the database from snapshot. I'm using the following script to achieve that. However, the script execution ...
Jakub Janiš's user avatar
2 votes
1 answer
4k views

dbeaver check sql for syntax without running

Using the dbeaver tool, I want to check a script for syntax errors without actually running it. Purpose: For a long insert query (postgresql syntax, PostgreSQL 10.15) in the form of: INSERT INTO ...
JosephDoggie's user avatar
1 vote
0 answers
103 views

Testing SQL connections with UDL file

I am testing SQL connectivity between a SQL server (windows server 2000) and client PC that has no SQL tools installed (windows 2000 SP4). The client PC runs a java application that needs to connect ...
mcv110's user avatar
  • 75
0 votes
1 answer
123 views

How to setup Mysql master-slave replication with the slave meant for testing where divergence is OK

Problem: I have a staging DB server on which functionality is tested before pushing it to the production environment. Now, we want to start doing VA/PT (Vulnerability Analysis and Penetration Testing) ...
site80443's user avatar
  • 119
2 votes
1 answer
257 views

How to create development/test environment of TB reporting database in SQL Server

I am working on a couple large reporting databases with lots of reporting and analytical queries and many ETL jobs. When I make changes I usually do in in production, be that changes in indexing or ...
xhr489's user avatar
  • 805
0 votes
1 answer
25 views

How to test a function that selects from real tables?

I've got a mega function that everybody is afraid to modify. So each fix adds a dozen of new IF lines. To me it feels that this function screams for proper testing. Instead of the real function I'm ...
Džuris's user avatar
  • 121
1 vote
0 answers
320 views

Unit Testing ORDS - Oracle Rest Data Services

I've been wanting to develop some unit tests for my ORDS functions as part of my push for better CI/CD - I am running ORDS functions on an Oracle Autonomous Database 19c, and while I'm developing a ...
Ash Oldershaw's user avatar
1 vote
2 answers
111 views

MySQL replication master-slave

I'm learning master-slave replication with MySQL and I could get it to work and also use the Percona backup tool to restore a slave. I learnt from this project https://github.com/vbabak/docker-mysql-...
Niklas Rosencrantz's user avatar
-1 votes
1 answer
380 views

Automated testing of SQL scripts

I'd like to run some simple tests on SQL scripts in CI to just ensure the scripts are valid SQL (PostgreSQL). While I could run Postgres in Docker or even use an in-memory DB such as Sqlite (it's ...
lfk's user avatar
  • 129
1 vote
1 answer
102 views

Test-Automation: Diff Data in Oracle Database - what are best practices? [closed]

We're re-writing a COBOL application in Java. We want to make sure, the applications behave the same, by validating our unit tests produce the same DB changes. How can we easily diff the data in the ...
user189597's user avatar
0 votes
0 answers
295 views

How to copy/export part of my SQL database

So I have this huge live SQL database. I want to do some testing so I thought to export it, however, it is around 200 GB which is impossible to export. I thought maybe I export the schema of it and ...
Nano's user avatar
  • 139
3 votes
1 answer
77 views

Randomly sort all non-ordered rows

Is there a way to get PostgreSQL to randomly order query results that haven't been ordered by an ORDER BY? I think this would be a useful way to seek out bugs caused by an implicit reliance on the ...
ldrg's user avatar
  • 689
2 votes
2 answers
7k views

How to copy database schema in the same database for testing purposes?

I need to copy... by any means, a schema of my database in that same database, let's say, I have SC1 and I have to duplicate it as SC2 without the data contained in SC1 (in the same database). How ...
miguel ramires's user avatar
1 vote
1 answer
1k views

How to Set Up a Shadow Production Database for PostgreSQL?

I'm working on a Django project and I'd like to avoid the common pitfall of using SQLite for development and PostgreSQL for production referenced in Two Scoops of Django. I'd like to take this a ...
Scott Skiles's user avatar
0 votes
1 answer
39 views

Moving for the first time to sql [closed]

I have been doing the backends of my android apps with Firebase for a long time but it is not a good database so I decided to move to mySQL for my next project. Is that possible to build a free ...
Gloria's user avatar
  • 11
1 vote
1 answer
686 views

MariaDB/MySQL IO limit in test environment [closed]

I have a test environment (all Linux) where we start our server application with MariaDB (which runs in docker in the case if it matters), run some tests, save the test results and drop the DB. I ...
redseven's user avatar
  • 111
2 votes
2 answers
1k views

MariaDB sample data for test queries? [duplicate]

In PostgreSQL we use generate_series a lot to do quick test cases. For example here I generate a quick test for that question using CREATE TABLE foo AS SELECT x::int AS a, (x%2*x)::int AS b ...
Evan Carroll's user avatar
  • 63.1k
4 votes
2 answers
715 views

A way to reference other DB without hardcoding its name

My customer uses pair of databases (SQL Server) where one references the other. Let's say DataDb and ConfigDb. ConfigDb contains hundreds of SPs that references DataDb like [DataDb].[dbo].[the_object]....
eXavier's user avatar
  • 141
3 votes
1 answer
1k views

Tool to test RDBMS SQL dialect for ANSI SQL standard compliance

We are developing an interface to our internal data storage and manipulation tool that would allow people to use SQL dialect. We decided that it would be perfect to make our SQL dialect as close to ...
kovalad's user avatar
  • 51
0 votes
1 answer
41 views

Efficient configuration for a purely temporary, small Oracle installation

I have a personal Oracle installation on my development machine (Oracle 12.1 EE, Windows 7, 16 GB RAM (about 7 of which is unused at all times), SSD) which is used exclusively for running automated ...
AnoE's user avatar
  • 341
1 vote
2 answers
45 views

MySql Freely avaliable dataset

I need MySQL dataset for testing purposes to check and improve performance and optimization. Is there any freely available dataset (MySQL) of 200k rows ??
UmAr KhAn's user avatar
10 votes
3 answers
413 views

Database staging environment for non-IT personnel

I'm in the process of proposing a database staging environment to my IT department. The idea is that a non-IT person like me (public works data analyst) would have a place to test solutions, and then ...
User1974's user avatar
  • 1,457
1 vote
0 answers
42 views

How to test if the query is taking a longer period of time as our production database is growing?

I would like to have a test (read: whatever can send a mail) in which whenever our query is taking more than 2 seconds to execute, it will send to me an email. If it matters we are using cakePhp with ...
Speedy's user avatar
  • 11
5 votes
2 answers
6k views

DROP DATABASE statement cannot be used inside a user transaction

Not really sure if this question belongs here, but I hope someone could help me out. I've made integration tests going all the way down to the database (using mssql localDB). I want each test to run ...
S. Peter's user avatar
  • 185
7 votes
4 answers
6k views

Can I restore all tables but not the stored procedures?

I have a testing database that I restore regularly from a production backup file in SQL Server 2008 R2 to get new data. We often edit\change or update the stored procedures in the testing DB to test ...
Shayma Ahmad's user avatar
2 votes
1 answer
75 views

How to create test environment for lost transactions

I have a problem that I hope you can help me to solve. I'm using SQL Server 2008 R2. I need to create a test environment in which I'll be able to artificially 'create' lost transactions. Due to ...
antydsr's user avatar
  • 23
1 vote
0 answers
161 views

Replicate existing database live

New to db admin here and I have a question. My setup is Windows Server 2012 R2, MySQL, using MySQL Workbench. I have Database A on Server A, how can I make an exact clone of this database (Database B)...
jonboy's user avatar
  • 231
2 votes
3 answers
3k views

Intentionally corrupting an index in PostgreSQL

I need to know if there is any method for intentionally corrupting an index in PostgreSQL. I have been searching for it for a long time but never seen anyone mentioning such an act.
Vipul Shukla's user avatar
1 vote
1 answer
2k views

How to do jUnit testing by PostgreSQL?

I found some packages like pgTAP but I would like to get community supported tools. I am using PostgreSQL 9.4.3 in Debian 8.1. I have many kinds of tests which I would like to do: INSERT by ...
Léo Léopold Hertz 준영's user avatar
2 votes
0 answers
848 views

SSDT sqlpackage.exe CreateNewDatabase Parameter Not Respected

Originally asked this on SO but that question seems to be populated only by tumbleweed so wondered if this might be a better forum for it. I have a VS2103 solution which includes a database project ...
Steve Pettifer's user avatar
12 votes
2 answers
345 views

Is it ever ok to not test a feature?

Is there any point at which you become so familiar with your language/database/system that there is no need to test a new feature/configuration/query/etc. by contained/simulated testing before ...
ZX9's user avatar
  • 253
4 votes
2 answers
3k views

Creating a 'shadow' database in MySQL

A while back, a friend told me of a facility that would allow us to "shadow" a production database using a local database. The term shadow may be incorrect (so please correct me if so) What I ...
Jdahern's user avatar
  • 93
0 votes
2 answers
2k views

Oracle DB license for only non-production environments [closed]

My company is a software vendor. We develop software that is later deployed on the customer's environment, on their own machines. Our software uses various DBMS, depending on what the customer has. We ...
Cleankod's user avatar
  • 515
1 vote
2 answers
423 views

Application testing: using multiple users in Oracle instead of mem H2. How to make it as fast as possible?

I decided to stop using H2 for obvious reasons (I have Oracle on production, compatibility mode is a fake). So, I wrote simple test framework which for each test in my application does the following: ...
whysoserious's user avatar
1 vote
2 answers
87 views

Can I find errors without using testing data for all the branches of each function?

In PostgreSQL, syntax errors (except for trivial syntax errors) are reported while running the code in question; unlike Oracle, PostgreSQL can't find errors without running the part of the code. This ...
Pavel V.'s user avatar
  • 747
1 vote
0 answers
56 views

Help understanding SQL Server Developer License when users test via webserver [duplicate]

I'm trying to understand how many licenses I may need if we decide to pursue a SQL Server Developer license for our Testing environment. We would have 5 actual developer and DBA's physically ...
ProfessionalAmateur's user avatar
5 votes
3 answers
6k views

A little clarification on how 'LIMIT' works

Not being a full blooded member of the DBA clan, but more of a dev clan, I find myself trying to figure out some slow running queries. The subject of my question however is not 'Why my queries are ...
shawty's user avatar
  • 230
2 votes
1 answer
2k views

Mysql query stress testing program [closed]

We are writing queries for our website, and when we test the queries in a dev environment, the queries run pretty fast. The problem that we are having is the dev environment has less that 10 active ...
Get Off My Lawn's user avatar
5 votes
3 answers
2k views

Can PostgreSQL support integration test with some kind of throwaway overlay?

It's a common problem to write integration tests that include a database. If the test changes the database then it could effect other tests or the next run of itself. I know that I could wrap my test ...
Thomas Koch's user avatar
3 votes
2 answers
771 views

Licensing SQL Server 2012 Standard Edition for development and test severs [closed]

Is there an economic way to license SQL Server standard edition on a test server? Given the following environment: live: SQL Server 2012 Standard Edition test: SQL Server 2012 Developer edition dev: ...
Andy Joiner's user avatar
1 vote
1 answer
3k views

Can MySQL Workbench generate data?

Is there a way to generate mass rows of dummy data in a table for testing in workbench? If not, are there any free tools out there that is able to do that?
dany's user avatar
  • 11