2
votes
2answers
598 views

MySQL Views Authorization

Questions: Is there a way, using SQL, to identify how many views are in the database per user? How can you authorize/deny users access to delete views created by another user?
2
votes
1answer
807 views

Oracle 11g production database copy to USB drive

What is the correct commands for backing up a production Oracle 11g database (while still running) to an external USB drive or different directory. I am new to Oracle and but have experience with SQL ...
1
vote
1answer
324 views

Importing large file while keeping table available for other operations

We need to import millions of rows in a quite big table. Say like 5 million rows into a table with more than 1 billion rows. After preprocessing the import file we will have update operations and ...
3
votes
1answer
441 views

How can I restore SQL Server database to a custom location, if the backup file was renamed?

Suppose I have an SQL Server database called bubu and the respective backup file is bubu.bak. If I want to restore it with the backing store in a custom location, I use the following T-SQL statement: ...
2
votes
1answer
4k views

MySQL Workbench 5.2 edition - Unable to establish the connection

I have installed MySQL (mysql-workbench-gpl-5.2.37-win32.msi ) which is a Windows Installation Workbench. Couple of times, I have done re-installation on my computer. Now, I am not able to establish ...
2
votes
1answer
3k views

Repairing Myisam Table when there was no additional Disk space & Table corrupted

I had a table which MyIsam as storage Engine contains million rows. There is a purging task and need to remove 35 days old data. i measured up the rows in following manner : mysql> select ...
1
vote
4answers
2k views

MySQL SSL disabled on Windows

I want to enable an SSL connection to my database. I've created SSL certificates and so on, however SSL remains disabled: mysql> show variables like '%ssl%'; ...
3
votes
1answer
3k views

Storing XML in varchar(MAX) or use SQL-XML

I am defining a schema for a new set of resources using SQL Server 2008... In this case, each record (e.g. row) will need to store XML fragments. From time-to-time; although not frequently; I'll need ...
3
votes
1answer
990 views

create index - invalid memory alloc request size

i get this error "invalid memory alloc request size 18446744072635840654. SQL Status:XX000" when i want to create an index. The Table looks like this: CREATE TABLE schema.tblname ( id bigint NOT ...
1
vote
3answers
1k views

SQL Server 2008 Partitioning Evaluation

I'm trying to do a performance comparison of a table with partitioning and the same table without partitioning. So we have Subcriber and SubscriberPartitioned tables. Tables structure is: ...
3
votes
2answers
5k views

MySql: Delete all rows greater than n entries ordered by datetime

Can someone help me with a MySql query to delete all rows greater than n entries ordered by date? I.e. say I have 1200 rows of data with a timestamp column. I need to order it by date and preserve ...
2
votes
1answer
1k views

PL/SQL : query numeric data type by scale?

Wish to select rows with number fields having a certain amount of data after the decimal eg select number from table where number.scale > 4; Is this possible to do directly, or must I cast to ...
4
votes
2answers
1k views

Monitoring Progress of Index Construction in PostgreSQL

Is there a way to monitor the progress of the creation of an index in PostgreSQL. I am creating an index on a large table and I would like to see how fast this is occurring. Is there a way to monitor ...
4
votes
1answer
950 views

Alter failed for schema 'dbo' when trying to change schema owner

I have some MS Access code that uses ODBCDirect to execute some sql statements in a SQL 2008 R2 DB. The sql statements do not specify the schema name so subsequently are executed using the windows ...
12
votes
2answers
540 views

Decision criteria on when to use a non-dbo schema vs a new Database

I'm mostly an application developer but find myself having to do all the up-front database work for my current project (btw... its MS SQL Server 2008). As a first decision, I'm trying to figure out ...
0
votes
2answers
83 views

Advice on choosing a primary key

I will have to do this process in EXCEL first before it is made into a database. I will have many files, but there is about 7 - 9 files that work all together as one e.g. X192AD1-test.docx ...
1
vote
1answer
799 views

create table script with constraints in sql server 2008

I have create table scripts and alter table scripts with some constraints for that database. It take time as twice to create the table and alter the table .. Is this possible to combine create ...
4
votes
1answer
2k views

PostgreSQL streaming replication broken: invalid magic number, out-of-sequence timeline ID

For some reason, my PostgreSQL slave no longer streaming-replicates changes on the master. It was working before, for a while, but I recently noticed that the slave's database contents is old, and ...
4
votes
2answers
8k views

Is InnoDB Engine up to speed against Memory Engine?

I am exploring the efficiency of different database engines in MySQL version 5.5.18 to see which is best suited for use with a range query on a dataset of 5 million rows: SELECT P.col1, P.col2, ...
11
votes
1answer
2k views

How do databases store index key values (on-disk) for variable length fields?

Context This question pertains to the low-level implementation details of indexes in both SQL and NoSQL database systems. Actual structure of the index (B+ tree, hash, SSTable, etc.) is irrelevant as ...
0
votes
1answer
1k views

attach database - verify - detach from a script or a batch file

for a hundred good reasons .... and I promise that at least a few are good ... I find myself with almost 200 SQL server databases (mdf,ldf files) generated by different versions of sql server, most ...
6
votes
4answers
19k views

SQL performance issues with remote query across linked server

This sproc create proc dbo.Get_Accounts as begin declare @current_date datetime set @current_date = dbo.fn_currdate() select [fields] into dbo.current_accounts from ...
3
votes
2answers
853 views

sql server management studio 2008 sucks up with memory yielding .net runtime failure

PROBLEM sql server management studio 2008 sucks up with memory yielding a .net runtime error. It crashes with an empty message in an error-dialog but there can be found a little eventlog entry, ...
7
votes
1answer
9k views

MySQL column defined with NOT NULL is allowing nulls

I had created a table a while back and started adding data to it. Recently I added a new column (address) to it with NOT NULL as part of the new column. The old rows (pre-addition) are still null, ...
8
votes
6answers
7k views

SQL Query Formatter [closed]

Are there any (Linux based) SQL Query Formatting programs/plugins/extensions? I use PostgreSQL and MySQL but other DB's are welcome as well. I can use a VM to test with but would prefer a Linux ...
4
votes
1answer
355 views

sp_sqlagent_get_perf_counters SQL Server 2005 running every 20 seconds

A little background info: We are running SQL Server 2005 SP2 on a server with Microsoft Windows Server 2003 SP2. When I run profiler I notice that EXECUTE msdb.dbo.sp_sqlagent_get_perf_counters is ...
8
votes
1answer
763 views

How to get accurate query performance?

I'm attempting to improve performance of a stored procedure. When I run the SP, it finishes almost instantly, as if something were cached. I was told to use the following two lines of SQL before ...
3
votes
1answer
924 views

Can you have a WHERE clause with a greater than operator on a composite key?

I'm a web developer (not DB admin!) having performance problems processing a 1.7m record table on MySQL. Here is that table : CREATE TABLE `bbcmapimp_pc_raw` ( `postcode` char(8) NOT NULL, ...
8
votes
5answers
3k views

How can I profile SQL Azure?

I am writing a web site that uses SQL Azure heavily. However, it is painfully slow. Is there an easy way to profile the live SQL Azure instance?
3
votes
4answers
2k views

SQL Server 2008 R2 with huge amount of transactions

I am currently developing a project with a huge amount of database transactions. My estimate is around 70,000 inserts/updates/deletes/selects every 2 minutes, since I am not there yet, I can only ...
8
votes
2answers
4k views

How to retrieve foreign key constraints data

I'm looking for a query allowing to retrieve foreign key infos (each line: referrencing table & field, referrenced table & field) of an entire schema. I've found this, but does not gives all ...
4
votes
3answers
5k views

Disable trigger for just one table

Is it possible to disable a trigger momentarily but for just one table. For example I have table, TableA with an on insert, update and delete trigger. I also have a table B with the same triggers but ...
5
votes
2answers
28k views

Grant table privileges to a user connecting from any host

I have a user account - let's call it 'wordpress' - that I need to allow to access a few catalog tables in another e-commerce database on the same server. I've configured the user with three host ...
3
votes
2answers
8k views

MySql - changing innodb_file_per_table for a live db

I have a large MySql DB (150GB) and only now i've noticed that the innodb_file_per_table is set to off which cause the entire DB to be hosted on one single file (ibdata1). i want to active ...
1
vote
1answer
766 views

SQL Server 2008R2 Logon failed

The SS error log indicates the following at a frequency of 2 to 3 times per hour: Logon failed for login 'NT AUTHORITY\NETWORK SERVICE' due to trigger execution. [CLIENT: ] There is no logon ...
1
vote
2answers
738 views

All columns of table should be indexed or not mysql database?

I am having one table with 4 columns. I that one is primary key and other three columns are references to columns of other tables. I am using join of these four tables for search filter. These joins ...
3
votes
3answers
2k views

sqlagent job - using system folder path with CmdExec

I'm trying to setup a sqlserver agent job of type CmdExec for running an executable inside %programdata%\my company folder. But if I use %programdata%\my company\myexec.exe, the job fails to start ...
3
votes
2answers
2k views

TdsInputBufferError not 0 in LoginTimers errors of RING_BUFFER_CONNECTIVITY of sys.dm_os_ring_buffers

I've got an issue with SQL Server. The value of TdsInputBufferError is not 0 in LoginTimers errors of RING_BUFFER_CONNECTIVITY of sys.dm_os_ring_buffers. This happens randomly, once or twice a week, ...
4
votes
2answers
4k views

List primary keys for all tables - Postgresql

Is there a query that will do that? I found some queries that can do this for one table, but I wasn't able to modify it so I can see: tablename | column | type
10
votes
1answer
8k views

Order by column should have index or not?

I have added indexes to table which are used for searching result. I am showing results by ASC or DESC order. So that column should have index or not? I have 2 more indexes on that table. How ...
0
votes
1answer
2k views

how to make a table unlocked within transaction block

I am using SQL Server 2008. I have several stored procedures that process different reports. Each stored procedure makes use of Begin Transaction' and 'Commit Transaction, using the default ...
3
votes
3answers
571 views

Restoring SQL Server database backup file for read-only access - is it possible to skip the ldf file creation?

I need to read some data from a database given by its backup file. So, I issue the RESTORE DATABASE command, which creates two files - the database MDF file and the log LDF file. Is it possible to ...
1
vote
2answers
1k views

Dropped table not showing up in recycle bin

I tried dropping a table and then when i viewed the recycle bin nothing was there in it . Earlier too i dropped tables many a times but I was surprised to find no objects whatsover in it . What's the ...
3
votes
1answer
1k views

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I tried restarting the Mysql server but its not working for me. I am sure the server is running and the permissions on the folder /var/lib/mysql/ are correct (777). When i tried to open the file ...
1
vote
3answers
2k views

SQL Server 2005 Restore from Full and Differential Backup

I'm not a DBA, however I have been a developer for 10yrs and am competent. I wish to move our corporate application to a hosted service and I need to copy the data. The data centre is too far from ...
0
votes
2answers
196 views

New PostgreSQL 9.1 configuration doesn’t work

I changed the length of table names in PostgreSQL in the file pg_config_manual.h (in C:\Program Files\PostgreSQL\9.1\include) to 128. Then I reloaded the new configuration by selecting menu "Reload ...
1
vote
2answers
705 views

Mysql master-master permission replication issue

I came to know it's safe to replicate mysql database to have the users and permissions replicated, from a post in ServerFault is-it-ok-to-replicate-mysql-db. I have setup master-master replication ...
7
votes
1answer
927 views

Mongo Map-Reduce or Sharding?

So I asked this question: Setting up Mongo with clustering But I didn't know enough until I read the answers and did more research. Is it better to use Map-reduce or sharding for fast-paced ...
3
votes
1answer
6k views

Oracle 11g hunting down the deadlock, maybe foreign key?

I am trying to understand why a deadlock occurs in my database. The trace tells me that two updates on the same table are locking. In table is the first table to be written to in an transaction, only ...
1
vote
1answer
122 views

Sybase internal tables for ORM generation

I am working on a Perl application that uses DBIx::Class::Schema::Loader in order to generate the ORM layer of the application, against a Sybase ASE 15.5 database. We recently migrated from Sybase ...

15 30 50 per page