Questions tagged [files]

46 questions
11
votes
1 answer

Database with multiple .mdf files

I have searched online but not found what I am looking for. The problem/query is to my knowledge a database in SQL Server should have One .mdf file and maybe some .ndf files and One .log file. I have seen many database with one mdf and multiple…
M.Ali
  • 1,970
  • 10
  • 27
  • 38
8
votes
3 answers

Access to the path 'c:\some\path' is denied for MSSQL CLR

I think this is a permissions problem, but I'm having trouble locating it. I have a group of CLRs on one server (SQL Server 2016) and they work as they should. All are marked UNSAFE and they do various types of file I/O (read, write, copy, move,…
WillG
  • 327
  • 1
  • 3
  • 9
5
votes
1 answer

MongoDB GridFS triples the file sizes

I really like using mongodb to store my data and recently I tried out GridFS and it really fits my use case. My problem with it is the space requirement, which seems quite odd. I have ~107GB of images in Amazon S3, which is around 1 million files…
szabkel
  • 264
  • 2
  • 11
5
votes
3 answers

How to check whether old MDF and LDF files are referenced

I inherited a setup, and I'm rather new with DB work. I've got a drive on my production server that was created during a big crisis a few years ago at my company. Crisis was navigated and everything restored. But this drive on my has 70 LDF and MDF…
jbz
  • 327
  • 4
  • 8
5
votes
1 answer

Why is Postgres not respecting my log file name convention dictated by "log_filename"?

I’m using Postgres 9.5 on Ubuntu 14.04. I have these settings set in my /etc/postgresql/9.5/main/postgresql.conf file log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, # can include…
Dave
  • 753
  • 10
  • 22
  • 39
5
votes
1 answer

Find what data is placed in a datafile

I have a database with 5 .ndf (secondary) datafiles on SQL Server 2008 R2. (Each of these datafiles is assigned to a separate filegroup.) I want to know what data is there in those files. Is it possible? I know there are full text indexes in these…
Stackoverflowuser
  • 1,550
  • 3
  • 27
  • 42
3
votes
1 answer

Deleting files from within SQL Server

I've been using xp_delete_file to delete old backup files but I now an a need to delete files that are part of an application (as part of GDPR). As xp_delete_file only will only let you delete log or backup files, I thought I'd write my own in…
Andrew Lackenby
  • 199
  • 1
  • 15
3
votes
1 answer

Storing large files (~1GB) in MySQL

We are considering a solution that will store large files in MySQL with InnoDB. The size of the files can range from 250MB - 1GB (might grow up to 50GB in future). Here is what the plan is. Create two tables similar to FILES(id, name) and…
Amit
  • 131
  • 1
  • 4
2
votes
0 answers

Export and split QUERY results in multiple files

I would like to know if it's possible to export and split query results in multiple files. Let's assume I have a query returning 100 results and I want to save the results in 5 different csv files (20 results per file). Is there any way to do…
user110366
  • 41
  • 6
2
votes
1 answer

How to find out the oldest full backup still existing on disk?

one of the things I like to find out is what is the oldest full backup file still living in my servers. it is the custom to delete or move those files to a different place after a number of days. How far can we go back in time, with what we have on…
Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320
2
votes
1 answer

xp_delete_file - error message when no files for deleting

I have a job that deletes transaction log backups older than 3 days. if for some reason there are no files to delete, it comes out with the following error message: Msg 22049, Sev 16, State 1: xp_delete_file() returned error 2, 'The system cannot…
Marcello Miorelli
  • 17,274
  • 53
  • 180
  • 320
2
votes
1 answer

Storing files with extension in database as BLOB

Recently during development process I've faced file storage issue. I'm not sure which solution is the best one that's why I decided to write this question. I don't have a lot experience of database administration that's why any tip can be really…
Marcin
  • 123
  • 4
2
votes
0 answers

Restoring a database with just .idb and .frm files

I've never attempted something like this before. We had a WAMP installation with WordPress running on my wife's PC, and the Aestan tray menu failed. I figured we need to uninstall and re-install WAMP, which left the data files in .ibd and .frm files…
David Borrink
  • 31
  • 1
  • 7
1
vote
0 answers

Moving Large Tables and All Indexes to a new File Group

I'm looking at implementing File Groups on an existing database that's roughly 600GB. The largest hurdle I have is actually setting this up in production. I need the database to still be available but moving some of the tables will take a…
nikolifish
  • 111
  • 1
1
vote
1 answer

Data Files Outgrowing Hardware - Split the File?

Where I'm currently working, the primary business database is located on a virtual server (SQL Server 2005 standard). The temp DB and logs are on one disk, the database itself on another. The SAN is configured in such a way that they can only…
Steve Pettifer
  • 441
  • 4
  • 10
1
2 3 4