Questions tagged [datafile]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
2answers
195 views

SQL Server: Identifying object closest to the end of a datafile

TL\DR I'm looking for a way to efficiently identify the object located closest to the end of a SQL Server data file. This approach needs to remain performant against large data files. What I have ...
0
votes
1answer
21 views

ORA-19501 & ORA-27072 during rman backup [closed]

We got that problem during rman hot backup and also the same when we try with valide datafile command. We got enough free space in disk drive
9
votes
4answers
14k views

Do I really need to keep .LDF files?

Each month we make an end of month snapshot of our production database. These month end snapshots are strictly for reporting purposes, there are no inserts, updates or deletes ever done on them. Each ...
2
votes
1answer
520 views

Mysql cannot import from text file

I have a table called person setup like this (person_id SMALLINT UNSIGNED, fname varchar(20), lname varchar(20), gender enum('M','F'), birth_date date, race enum('B','W','A','J'), ethnicity varchar (...
4
votes
2answers
6k views

where is the index physically located in MySQL database

Just wondering where is the index info physically located in MySQL database if I have indexed a table with ALTER TABLE contacts ADD KEY (columnName); ? it will stay with that table and add a new ...
0
votes
1answer
78 views

Multiple mdf, empty one is missing

Hi guys i have a big problem. I know i did such stupid and unforgivable mistake. And know please help me if you can. I wanted to make copy of database. I should make it by backup and then restore as ...
0
votes
1answer
37 views

How to recreate Oracle db from .ora and .dbf?

I have a number of files left from a previous Oracle db and I would like to create a new one from the files. The files include: init_locdb.ora 16 .dbf files spfilelocdb.ora log files .ctl Could you ...
0
votes
1answer
35 views

Bulk Import appending the data to the data file

We have a bulk import task running in SQL Server 2016 which imports more than 5 million rows. The task itself is configured at cloud using third party services. The strange thing is that the new data ...
1
vote
0answers
18 views

Transactional Replication and distribution database size

I have a transactional replication set up with initialize from backup. In the secondary database server,i have a drive(d:) for data files alone. I have noticed that this drive is getting filled and i ...
0
votes
1answer
33 views

What is a good practice for storing unstructured tables as a field in mongodb

Context: I am developing an application that requires handling tables that do not necessarily have an uniform structure (eg. different/extra columns). Those unstructured files also need to be grouped ...
0
votes
2answers
22 views

Considerable size difference between mysql versions

We usually employ different MySQL versions for different scenarios. And I realized that similar databases, whith the same amount of tables and data, just because of different mysql versions differs in ...
1
vote
5answers
2k views

TABLESPACE creation error

I have an error "ORA-01537" when I create a tablespace. create tablespace "VOLUMT" datafile 'VOLUMT.dbf' size 250M autoextend on; Then, it shows like following. ERROR at line 1: ORA-01537: cannot ...
13
votes
6answers
53k views

How to export an image column to files in SQL Server?

I will migrate from a database. There is one column of type image that I would like to export to binary files on the file system. One file for each record. How can I do this with SQL Server?
1
vote
0answers
171 views

MySQL 8 more than doubles the size of MyISAM table after optimization

I recently upgraded from MySQL 5.7 to 8.0. I have noticed some changes from 5.7 to 8. But I have not been able to find any discussion on following situation that I have been puzzling for a while. I ...
1
vote
2answers
156 views

Creating/restoring mdf/ldf to non-default file location giving access denied

Default folder is typical C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA. But C: drive on server is almost full. So, in restoring an 11gb database from another server, I ...
0
votes
2answers
88 views

Max DATAFILE size in NDB engine

My database setup is using NDB cluster with 2-3 nodes, on CentOS. While trying to test out the performance, i tried to store ~7mil records (around 2GB size) into one of the table. at around ~200k, it ...
0
votes
1answer
240 views

Migrating Postgres server from Windows to Linux

Simple question: I want to migrate all of a Postgres server's data, schema, roles, everything from Windows to Linux. Can I just copy the contents of the %PGDATA% directory in Windows to which the ...
1
vote
1answer
389 views

How to refresh Oracle data dictionary to remove deleted tablespace and datafiles?

Long story short we have a server with two Oracle instances running on it: ora1 and ora2. Somebody defined an undo tablespace for ora2 and provided the same datafile of the undo tablespace datafile of ...
1
vote
1answer
740 views

Post data deploy in SSDT

I need to create post deployment script which will upload data from .csv file to my database. But I can't understand how can I do this. When I tried to deploy my project on my server I receive this ...
5
votes
1answer
150 views

Difficulty removing files from filegroup

I am trying to delete all files from my database from an unused filegroup. There are two files totaling aroun 1.5TB. I can see that there is now approx 400mb still in these files but I cant see what ...
0
votes
0answers
53 views

Does splitting 1 tempdb file into 4 require a SQL Server restart? [duplicate]

please can anyone help? I have a SQL 2008R2 instance with 4 cores, configured with 1 tempdb data file and 1 logfile. I want to change this setup as per best practices by adding 3 additional euqally ...
0
votes
1answer
82 views

Moving DataFile to Another Location ORACLE

I'm having some problems moving DATAFILE from one location to another due to the shortage of storage space. I've managed to change the path file of control file via command(linux). Now I would like to ...
1
vote
1answer
55 views

How Database Formats Files for Disk

This SO answer outlines how MySQL organizes its database into files, but doesn't describe the structure of the files themselves. I am wondering, at the physical level, how relational database ...
1
vote
1answer
1k views

How to delete tablespace and table after delete datafiles?

I deleted datafiles with asmcmd. I need to delete tablespace and tables on this tablespace. I tried: drop tablespace tablespace_name including contains cascade constraints getting error: ORA-14405: ...
4
votes
1answer
105 views

Howto query all files, their fill level and additional drive info with one query?

I need a query that puts together the following results: one row per database file across all databases additional columns with information about the locigal drive the file is on information about ...
7
votes
2answers
2k views

How to Move TempDB Files to a Different Drive or Folder? [duplicate]

How do I move my TempDB Data or Log File(s) from wherever they are now to a different Drive or Folder?
2
votes
1answer
86 views

Disk Architecture on SQL Server [closed]

I am building a new environment using the SQL Server 2017 Always-On system. This will be active 24/7 and there will be lots of DML processes. I have a 100GB SAS for the OS, a 1TB SAS for Data and a ...
37
votes
5answers
122k views

How to insert (file) data into a PostgreSQL bytea column?

This question is not about bytea v. oid v. blobs v. large objects, etc. I have a table containing a primary key integer field and a bytea field. I'd like to enter data into the bytea field. This ...
2
votes
1answer
137 views

SQL Server on Linux: Allocation unit on ext4

I'm testing SQL Server on Linux and now on the following point: Allocation Unit Size of the partition: I learned at SQL Server on Windows the Allocation Unit Size (sector size) must be 64K because of ...
2
votes
2answers
915 views

Backup and Restore SQL server files and filegroups

I have a database called Admin. It has only one default filegroup called primary. File group: primary files in the file group: Admin_data.mdf Now I have taken a full filegroup backup. Backup file ...
0
votes
2answers
42 views

mysqldump file restore while sql is still being dumped

Im using MaridaDB 10, but my question applies to all mysql variants. I have large dataset (70GB uncomressed when dumped to file). The mysqldump process takes 2-3hours. The restore process takes even ...
3
votes
1answer
980 views

DBCC SHRINKFILE for Log and Data when using Availability Groups

We had an issue where one of our database tables grew by 40GB by mistake. The database is part of an Availability Group with one primary and two replicas. While trying to delete the extra records we ...
0
votes
2answers
6k views

How to find out the maximum number of datafiles per tablespace in Oracle?

According to this Oracle document, the maximum number of database files per tablespace is "Operating system dependent; usually 1022". I know there are queries for some of the other limits mentioned ...
0
votes
1answer
1k views

Disable MongoDB journaling?

Are there any benefits in disabling mongodb journaling besides performance gain? I know journaling provides write durability and crash resiliency. But I can tune syncdelay parameter to make data files ...
4
votes
1answer
2k views

Two SQL Server databases share the same MDF and LDF files but have different data [closed]

I have a strange circumstance where I have a production database and a restored copy as another database on the same SQL Server instance, and both of them are using the same MDF and LDF files (i.e. ...
1
vote
2answers
692 views

Storing blobs outside the database

I had a PostgreSQL database with loads of scanned documents, as a document bytea column in the table scans, with hundreds of thousands of documents that was large and inconvenient to backup. Also, ...
1
vote
1answer
183 views

How to set a filesystem size limit for DB2 database? Is it possible?

I'm looking for a way to limit a DB2 database size (in disk) at creation time. But I couldn't find it. At SQL server we can do by this way: Create Database MyDatabase on (Name='MyDatabase_Data', ...
0
votes
1answer
2k views

In what situation the .NDF files are created?

I'm not a db administrator but from a quick search I found .NDF files are secondary data files. I'm curious to know under what conditions the .NDF files are generated ? If it is generated, how we can ...
4
votes
3answers
3k views

Releasing free space in mdf file to OS [duplicate]

We have a 120GB database. There was table with 60GB of data which is useless and we have truncated it. Now database size is 120GB with free space 60GB. The database will not grow up to 60GB in at ...
0
votes
1answer
139 views

Unable to write to ndf after shrink emptyfile

I am doing some file balancing practice/experiments on AdventureWorks and pages stopped writing to the ndf file (AdventureWorks2014_Data2.ndf). Early tests were working as expected. Proportional ...
0
votes
1answer
2k views

move AG database files between disks

Environment: SQL 2016 SP1, AG with 2 replicas, sync commit, no readable secondary. 1 file in the PRIMARY FG, 1 for the index FG. Problem: How to move the files for a database in this AG, from the ...
2
votes
0answers
44 views

What is using up space in database file?

I am attempting to empty a database file Data has been shifted from a database file by using the emptyfile shrink command and then rebuilding/reorganising all heaps and indexes so that the data is ...
3
votes
1answer
580 views

Database for store images

Actualy I'm using MongoDB with embedded images next to other data in same documents. Images count actualy are more than 14000 and each image size is less than 1MB. Images are readed frequently and ...
0
votes
1answer
344 views

Identify Full Text Catalog Files

I'm trying to write a query for a report to show how much free space is in our data files so we can plan storage for the future. I'm pulling data out of sys.database_files, and I can narrow it down to ...
0
votes
1answer
196 views

mysql_install_db equivalent for MongoDB? Error 'handle-open: open: Too many open files'

A developer created millions of collections and indexes, this means millions of collection-* and index-* files. I have no administrative login (DB user) on this replicaset (3 node) with mongod 3.2.6. ...
0
votes
2answers
132 views

How would I move SQL MSSQL.1 and MSSQL.2 location?

We have a SQL instance where the MSSQL.1 and MSSQL.2 were installed on a SAN drive. We are moving away from this SAN do to faults and we wish to move the files and folders to a new SAN. How would we ...
2
votes
1answer
3k views

PowerShell and SQL Server export XML

I have a stored procedure that ends with FOR XML EXPLICIT and I need to put the xml file in a folder. I've set up the following PowerShell, and run the script providing the two parameters. The ...
3
votes
1answer
544 views

cleaning up failed repair db: path: /var/lib/docker/wesfgr/repair/_tmp_repairDatabase_0

We run MongoDB 3.0.6 with MMAP in Docker container (single node). The filesystem was full and I did a repair with other path. 2016-10-03T08:58:51.186+0200 I INDEX [initandlisten] building ...
2
votes
1answer
543 views

Storing large image files in database vs system files

I need to store many large photos that will be uploaded daily in my application and retrieve those with id. There is no need to any special queries. What is the best approach for storing this files ...
2
votes
1answer
253 views

what's extsort.* (8 - 11 MB) in MongoDB dbpath? Directory _tmp

I never saw this in my dbpath and didn't found any explanation with a search engine. We run MongoDB 3.2.8 # ls -alh; pwd total 151M drwxr-xr-x. 2 mongod mongod 4.0K Sep 12 22:18 . drwxr-xr-x. 6 ...