Most Popular
1500 questions
18
votes
4 answers
Mysqldump tables excluding some fields
Is there a way to mysqldump a table without some fields?
Let me explain:
I have a MySQL database called tests. In tests I have 3 tables: USER, TOTO and TATA. I just want to mysqldump some fields of table USER, so excluding some fields like mail,…
user160293
18
votes
5 answers
Primary filegroup is full SQL Server 2008
I have a large table (~50 million rows) I'm trying to bulk insert into SQL Server and I get the error:
Could not allocate space for object 'myDB' in database 'I 3 Stroke' because the 'PRIMARY' filegroup is full. Create disk space by deleting…
wootscootinboogie
- 439
- 2
- 6
- 13
18
votes
2 answers
What can we do in MySQL 5.0 Replication to address bandwidth concerns?
I am developing an application to run on the client PC (Win) which is configured with a MySQL server 5.1 instance that will act as read-only slave to the remote master. The remote master has dozens of schemas, but I only need one per client so I…
Abram
- 283
- 2
- 6
18
votes
2 answers
Deadlocks From Locks on Same Temporary Tables In Different Processes
I have found a deadlock that appears to show something I thought was impossible. There are two processes involved in the deadlock:
1. process8cf948 SPID 63
Performing an ALTER TABLE on temporary table #PB_Cost_Excp_Process_Invoices_Work.
Owns IX…
Paul Williams
- 1,334
- 2
- 13
- 22
18
votes
5 answers
What is the fastest way to export a table to a text file
I will have a SQL Server 2012 database and a table with 3 million rows and maybe 50 columns. What will be the fastest way for an unattended background .net process (maybe issues some SQL or Powershell command) to export it to a text file, one line…
softveda
- 301
- 1
- 2
- 5
18
votes
1 answer
Database archive solutions
In continuation to a question posted by me on Is it a good idea to move high-volume and highly-accessed tables to a separate database?, am looking out for different techniques/solutions available for database archiving in PostgreSQL.
Few solutions I…
Gnanam
- 927
- 2
- 8
- 16
18
votes
1 answer
Is it safe to rely on a shadow volume backup of the mdf and ldf files?
We are looking at replacing traditional SQL server backups with a VSS based backup of mdf and ldf files. As a db person I'm somewhat twitchy about this, and yet I can find no evidence that this won't work?
Can anyone suggest a trial I can setup…
paul
- 181
- 1
- 3
18
votes
5 answers
Finding empty columns of a table in PostgreSQL
What query would return the name of the columns of a table where all rows are NULL?
Seb
- 181
- 1
- 1
- 3
18
votes
1 answer
What exactly are iblog files in mysql
I would like to understand these ibdata files as these play vital role in the crash recovery procedure. I could not find proper resources over the web for this.
Uday
- 726
- 2
- 9
- 27
18
votes
2 answers
kill all queries - MySQL
Sometimes during a SNAFU I have to run kill query xxxxxxx twenty or thirty times. Any sort of kill all command I am missing?
On account of how I don't like typing.
JIStone
- 859
- 2
- 8
- 16
18
votes
3 answers
Strange JOIN ON clause in T-SQL
I am untangling some legacy code and never in all my years have I seen this:
Select *
FROM GLAccounts
INNER JOIN GLCharts
ON glaGLChartID = glcGLChartID
LEFT JOIN GLCategories
ON glcGLCategoryID = gltGLCategoryID
INNER JOIN GLDepartments
…
Joseph Shirk
- 191
- 5
18
votes
1 answer
Choice of authentication approach for financial app on PostgreSQL
First some background.
The LedgerSMB project is an open source financial accounting software project that runs on PostgreSQL. We implement a very large amount of business logic in user defined functions, which act as the main mapping tool between…
Chris Travers
- 12,536
- 45
- 95
18
votes
2 answers
Disabling Checking of Schema On Function/Stored Procedure Creation
I'm trying to automate the process that executes changes to the SQL Server 2008 R2 database. The process I put in place drops and recreates my stored procedures and functions, as well as run scripts to change the tables/columns/data. …
Brian Mains
- 577
- 2
- 8
- 17
18
votes
1 answer
Try catch equivalent in Postgres
Do we have a try catch equivalent in Postgres? I have written some user defined functions that are called by trigger. I (don't) want to ignore errors so that flow does not get interrupted.
FastTurtle
- 283
- 1
- 2
- 7
18
votes
2 answers
CROSS APPLY produces outer join
In answer to SQL counting distinct over partition Erik Darling posted this code to work around for the lack of COUNT(DISTINCT) OVER ():
SELECT *
FROM #MyTable AS mt
CROSS APPLY ( SELECT COUNT(DISTINCT mt2.Col_B) AS dc
…
Paul White
- 67,511
- 25
- 368
- 572