All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

MySQL Syntax error when trying to create database trigger

When Trying to create the below trigger, I am receiving a syntax error. It looks good to me and I'm having a terrible time trying to figure it out. DELIMITER $$ CREATE TRIGGER trg_pic_hours ...
0
votes
0answers
2 views

I cannot open a local access database if I am not connected to our network

I can open it just fine if I am connected to network, but it will not open offline. I have turned off startup form and there are not autoexec macros. I am using Office 2010 on Windows 7 as a ...
0
votes
0answers
6 views

AWS aurora mysql is restarted unexpectedly

In our system one of aurora mysql instances was't available for short period. because this instance suddenly restarted at 08/14/2019 3:56JST. we already checked error log for aurora. but i found ...
-2
votes
0answers
3 views

How to convert UTC time to New York time zone in Microsoft SQl

How to convert UTC time to New York time zone in Microsoft SQL
0
votes
0answers
2 views

SQL TDE and Certificate Handling Recommendations

registered so that I could put this to you. I've seen the information on this post: Sharing keys and certificates between SQL Server 2014 server for encrypted backup and restoration But I don't think ...
0
votes
0answers
2 views

Collection data not seen in mongos sharding

I have configured sharding with 3 replica sets as shards and one config server in replication. One Mongos router is running. Have restored a collection into new database in one of the shards using ...
0
votes
0answers
17 views

How to access Azure database remotely?

Someone just had a SQL Server database configured on Azure. I'm able to RDP into the server and access the database. How do I figure out the connection string for accessing the database remotely? I'...
-1
votes
2answers
20 views

TSQL script returning wrong result

I'm trying to find out if a particular index name Test exist in all databases using below code. The result I'm getting is always NOT EXIST for all databases in an instance. However, the index does ...
0
votes
2answers
14 views

What impact on the index storage size does overprovisioning of varchar types have?

Does over-provisioning varchar columns (as in using varchar(100) to store values from 1 to 10 characters long vs using varchar(10)) have any impact on the index storage size and if yes than why? I ...
0
votes
0answers
5 views

Update Certificate in Oracle Wallet

We have been downloading data from our vendor for over ten years over the Internet through an encrypted connection enabled by an Oracle Wallet. The self-signed certificate expired, so the vendor sent ...
1
vote
0answers
5 views

Are `--events` and `--routines` really needed to get a `mysqldump --all-databases` of an entire mysql instance?

Several fine answers on here have already exquisitely argued that mysqldump --hex-blob -events --routines --triggers --all-databases should be all one needs to get a mysqldump of an entire mysql ...
0
votes
1answer
11 views

What is Query Containment?

Any one knows what is query containment and where do we use it please? As far as I can search on google, I only found one here. Although, I've got some idea on the subject but i'm finding it ...
1
vote
2answers
20 views

SMO, Powershell, & Failed Logins

Background At my current organization, we've got a SQL Agent Job running a Powershell script, originally based on Script All Server Level Objects to Recreate SQL Server. This job writes a bunch of ...
2
votes
1answer
15 views

Patching SQL Server 2014 Versus SQL Server 2014 Express

Need to apply a Service Pack to the following SQL Express install: Installed version : 12.0.2000.8 (2014) Express Edition Not sure if I can apply the latest SQL 2014 Service Pack SP4 or stick to the ...
2
votes
1answer
11 views

What is the order of execution of alter operations in an alter query in MySQL?

Consider the following queries CREATE TABLE MyTable (f2 INT); ALTER TABLE MyTable ADD COLUMN f1 INT, DROP COLUMN f1; In the above query drop column seems to happen before add column and query fails....
1
vote
1answer
20 views

How to increase the value of a column in a table by a constant by consulting another table?

I have prepared the database of the college given as create table depts( deptcode char(3) primary key, deptname char(70) not null); create table students( rollno number(2) primary key, name char(50),...
0
votes
3answers
30 views

Could not allocate space for object sql server

Can anyone give a solution for this error. Could not allocate space for object ‘’ in database ‘’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping ...
0
votes
1answer
7 views

updating associated records' tsvectors when the primary record is updated

I have the following trigger function that updates the object's tsvector column when its details change: CREATE OR REPLACE FUNCTION customer_search_trigger() RETURNS trigger AS $$ BEGIN ...
1
vote
0answers
5 views

Availability Group Read Only Routing Not Working for Azure App Service that connects over Hybrid Connection

We have following config of Availability Group On-Premise: server1.domain.com - primary server2.domain.com - sync secondary server3.domain.com - async secondary sql-listener.domain.com - ...
1
vote
2answers
26 views

MS SQL Server Error 18456 after database move

I have a windows service connecting to a SQL database. Recently, I was told to change the DB name in the connection string, all else was the same. When I attempted to connect, it threw Error 18456. ...
0
votes
0answers
6 views

Schedule a job - Mongodb - Run a view every day

how is the most used database in the world not able to schedule queries? I would like to know if it's possible to run a single insert every day: use Database var documents = db.Viewname.find({"...
4
votes
1answer
24 views

Truncate Table locking sys views

We have a proc that runs Truncate Table inside an Snapshot transaction. This seems to be causing a LOCK_M_S lock that blocks the sys view sys.partitions. Is there a convenient work around for this?...
0
votes
1answer
13 views

When did my table last vacuum

I am running Postgres 9.6 . I have recently been reading of the importance of VACUUMing in postgres. I am looking for a SQL statement that could return a list of my tables and when the last time ...
-1
votes
3answers
15 views

Pairing Row Values in Any Order

I'm trying to find % of unique pairs that exist in two columns. For example Where 1,6 and 6,1 / 2,3 and 3,2 are unique pairs. So the % of matched pairs is 33%
0
votes
0answers
13 views

PayPal-like database schema design

I am learning how to do accounting and auditing data effectively in SQL which makes wonder how to PayPal would store transactions data in MYSQL in simplest way as possible. So here are the tables of ...
0
votes
0answers
8 views

Mongodb Ops Manager url changed

Recently we successfully updated the hostnames of the mongodb servers from short hostname to FQDN. Now we are not getting automation logs on the server, however we are able to see the logs on the ops ...
0
votes
0answers
8 views

Joining table with non clustered columnstore index to OPENJSON

I have a table defined which looks like this: CREATE TABLE [STAGING].[place]( [place_id] [bigint] IDENTITY(0,1) NOT NULL, [modified_at] [datetime2](7) NOT NULL, PRIMARY KEY CLUSTERED ( [...
-1
votes
1answer
22 views

Matching records that fall into same date range

I've a sales table with multiple prices for the same product. Each with a range for when that price is active. From and a To. I need to find if they are any Prices that overlap for the same product ...
1
vote
1answer
7 views

Does CUBRID have Information Schema Views?

I am trying to access the Information Schema views as defined in SQL92, and cannot find any in the CUBRID RDBMS. Has CUBRID implemented this specification and how can I access them? CUBRID version: ...
0
votes
0answers
17 views

PostgreSQL 10 not allowing remote connection

I cant get a PostgreSQL 10 instance to allow remote connections. The database is hosted on Ubuntu 18.04 listen_addresses has been set to both '*' and 'myactualip' that needs to connect to the ...
0
votes
1answer
15 views

InnoDB vs MyISAM vs OThers for Huge Table [on hold]

I would like a db with a single table with billion of lines (50gb data). Primary key will be a md5hash . Which storage engine suits better InnoDB , MyISAM or alternative ? Only Select will be used.
0
votes
1answer
25 views

Improve speed of COPY COMMAND in postgres

I would like to understand if increasing work_mem does help improving the speed of the COPY command. Does COPY use work_mem or maint_work_mem extensively?
1
vote
1answer
20 views

How to get all records where a joined column contains some value (at least once)

Forgive my horrible description in the title. I have a table called timesheet which has one record per week per employee. There are many rows in timecard_entries for a timesheet. A timesheet can have ...
0
votes
2answers
30 views

How can I update the roles for all logins using T-SQL?

I need to update the roles for all database logins, but without using SQL Server Management Studio. I can update a single user with the following example SQL. EXECUTE sys.sp_addsrvrolemember @...
1
vote
1answer
23 views

Table design - parent with always exactly 1 or 2 children

Lets say I have the following existing tables (both with a primary key column named Id): TableA TableB Now, I need to create a new table that groups together 1 record from TableA with either 1 or 2 ...
0
votes
0answers
26 views

Dimension attribute with one-to-many relationship

I have a request for an attribute in a dimension that has a one-to-many relationship with the lower level of the dimension. Here is the case: Dimension: Employee Attribute: Immatriculation I have ...
0
votes
2answers
40 views

How to write an sql database to a file? [on hold]

I am writing a password manager in which one of the features that I would like to include is the ability to transfer the Password database from one computer to another or to export that database. So, ...
0
votes
1answer
14 views

Select all columns from table but apply function to 1 column

What I want to do: Select all columns but apply a function to one of the selected columns in a shorthand manner such that I don't have to type out all of the column names Current approach: I am ...
2
votes
1answer
30 views

Which are the downsides of not deleting the CDC records in change tables?

If I do something like this: USE AdventureWorks2012; GO EXECUTE sys.sp_cdc_change_job @job_type = N'cleanup', @retention = 52494800; -- (100 years) GO The records in the change ...
0
votes
1answer
19 views

Postgres PITR: Recovery does not seem to fetch from Archive Dir

Make and give permission to database dir cd /home/admin-12/Desktop/ mkdir test2 sudo chown postgres:postgres test2 mkdir test2_wal sudo chown postgres:postgres test2_wal touch test2.log sudo chown ...
0
votes
1answer
25 views

Does Data Migration Advisor migrate system databases?

I would like to know if Data Migration Assistant copies system databases (master, model, msdb) into the new server.
0
votes
0answers
15 views

PostgreSQL - Update not working inside function

I am creating a web app that handles coupons. When a user claims a coupon the coupon batch count "should" be updated, and a new coupon is created. For some reason the UPDATE query does not work ...
0
votes
0answers
10 views

logical replication in postgresql - “server closed the connection unexpectedly”

I'm running two postgresql servers and I'm trying to setup logical replication. These are extra bits of configuration I added on master in order to make replication work: wal_level=logical ...
5
votes
2answers
120 views

IndexOptimize - Configuration

We recently switched to Ola Hallengren's maintenance script and automated the deployment of MaintenanceSolution.sql to our customers's SQL Server instance. We need to set these parameters for the job ...
0
votes
0answers
13 views

How do I make the RPO (recovery point target) of the database is one minute when I perform the backup through RMAN?

Make a backup copy through RMAN that has the control file and is based on best practices. The RPO (recovery point target) of the database is one minute. You must attach all backup information output.
0
votes
0answers
9 views

What exactly happens when optimizer_prune_level = 1?

This documentation link states that optimizer_prune_level Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. Can ...
0
votes
0answers
10 views

Report Service stopped unexpectedly

The SSRS service stopped unexpectedly and the workaround was to recycle the app pool and then restart the service, but no clue of what happened. When looking at the error log below:   <Path>C:\...
0
votes
1answer
26 views

Which rights to grant for controlling an SQL Server Availability Group?

We are having the following setting: For an ERP Test / Accept SQL Cluster we want to follow the least privilige principle to give the external engineers rights on the SQL server. We are running SQL ...
0
votes
0answers
9 views

indexSize mismatch between primary and secondary members on wired tiger engine

we are using mongoDB 4.0 on wired tiger engine. For the last couple of days, we are observing that indexSize of primary server(marked in blue in attached file) went up drastically compared to its ...
1
vote
0answers
38 views

Tool to migrate data to another database with different object names [on hold]

We are working on a project to migrate our Oracle database to SQL Server. There are many off the shelf products that seem to do this such as Microsoft SQL Server Migration Assistant & Navicat ...

15 30 50 per page