All Questions

2
votes
1answer
347 views

SQL Server Memory for Backup Buffer

In SQL Server 2012 memory for backup buffer comes from buffer pool or non buffer pool (VAS)? Is this behavior changed between SQL server 2008 R2 and SQL 2012? EDIT: Does MAX Server Memory ...
0
votes
1answer
391 views

UTF8 vs ASCII or custom binary format: high-performance optimization on very big tables

The summary of my question is whether there are advantages, even if minimal, to use ASCII, or even a smaller format designed yet created specifically for the situation, instead of UTF-8 for strings. ...
1
vote
2answers
117 views

Can I limit an index to only contain the newest relevant row?

I have a table in PostgreSQL 9.2 that records login sessions called user_login_session. This table contains a user_id, start_timestamp and end_timestamp columns, amongst others. This table has started ...
1
vote
1answer
349 views

Exadata exachk.sh

I would like to run exachk.sh on regular basis. Now I have to interact with the script and answer all kinds of password questions before the script starts to extract Exadata information. I want to ...
5
votes
1answer
669 views

Optimum configuration for 4 SSD drives

I would like to move a SQL Server database from a shared configuration with the web-server to it's own dedicated box. My current budget will allow me to put 4 disks together in an array with a single ...
2
votes
0answers
87 views

Why does GO affect my SELECT? [closed]

I am experiencing a very weird behaviour from the Management Studio GO. I am following the full-Text Search tutorial and I run the following query over adventure works SELECT ...
3
votes
3answers
303 views

Relation to original tables or to existing linking table

In my database I have a table with different settings for my app. Each setting is in relation to a guest (table guests) and an event (table events). So basically each guest has specific settings for ...
1
vote
2answers
5k views

How to restore SQL Server database with mirroring

I have SQL Server with mirroring. I am trying to restore the database using the command: USE [master] ALTER DATABASE [CentralStorage] SET SINGLE_USER WITH ROLLBACK IMMEDIATE RESTORE DATABASE ...
1
vote
1answer
57 views

Is there any way to Restore a Database from newer version to an Older Version of SQL Server? [duplicate]

I am having a database backup file from SQL SERVER 2012 and i wanted to restore it on SQL SERVER 2008R2 . If we can’t restore a SQL Server 2012 database to earlier version what is the next best ...
0
votes
0answers
151 views

Data deleted from replicated table

I have two servers (one publisher and other is subscriber). The replication is succesfully running for a long time. I am using transactional replication with updateable subscription. Couple of days ...
0
votes
1answer
700 views

MySQL cannot create foreign key, errors 1005, 150

I'm trying to add a foreign key to a MySQL InnoDB table, linking a BIGINT with a table within the same database. I'm using MySQL Workbench to do this. It generates a script: ALTER TABLE ...
3
votes
1answer
748 views

MySQL error 2006 MySQL server has gone away after upgrade to 5.6.10 using homebrew on Max OS X 10.8.3

I upgraded my installation of MySQL on my Mac OS X 10.8.3 using homebrew brew install mysql Everything seemed to go smoothly, but...not really, as it turns out. I cannot add a new user (neither ...
0
votes
1answer
183 views

Multiple junction tables?

I am working on a system where you have users, and you have Fields of Study or 'fos' for short. Each user can have many fos and each fos can have many users. So we are dealing with a many to many ...
0
votes
1answer
321 views

MySql - set my.cnf location at server start

I want to have two MySql servers running on the same system (for master-slave replication tests purposes). To be able to do this I need both servers read different my.cnf files. As I see at startup ...
0
votes
2answers
216 views

How can I increase performance for select in select statement

The item table is like this id category_id name registered I have to show total number of items from the beginning. Suppose between 2013-05-01 to 20-05--05, I have to count all the items ...
1
vote
2answers
337 views

Database model: doubly linked list

I am not sure if I get this right. I'm designing a database model for use in an application, and I'm stuck at a doubly linked list (model first; there is no code yet). There's an order. An order has ...
4
votes
1answer
1k views

Stopping SQL Server Agent: Effect on runnings jobs

On a server with MS SQL Server 2008 installed, we use the SQL Server Agent to schedule a large amount of SSIS-packages, all with unique schedules throughout the day. Now and then, the server needs to ...
0
votes
0answers
77 views

Find the partition where data lives in MySQL

Is there a way to select the partition name where a specified record actually lives in? The idea is something like: SELECT <PARTITION_NAME> FROM mytable WHERE <where_condition> I found ...
0
votes
0answers
102 views

Why does mysql show Primary key constraint on a View?

As far as I know views cannot have a primary key. However the result of SELECT FROM KEY_COLUMN_USAGE says differ. PRIMARY | S_MOBILE_ITEM_VIEW | ID | ...
1
vote
0answers
635 views

Should xp_logevent and RAISERROR … WITH LOG work on LocalDB?

I need to run a script to configure a LocalDB (v11.0.3000) instance and database (from a .NET 4.5 program) and I want to record results at various stages. Someone suggested xp_logevent but it doesn't ...
0
votes
1answer
68 views

Recover PostgreSQL password with admin access to host

Good day. I have a PostgreSQL server. Once i had admin login and password, then i created a new login for web application (with low permissions like select form some tables etc). And i just lost my ...
-1
votes
1answer
105 views

I want to change ORACLE level#2 to log archiving mode instead of the current mode

I want to make that change to the archive log mode to use the redo log files to use it to make replication to database to another server. This is easy and possible when the server is single not ...
3
votes
2answers
329 views

Can stable (or immutable) functions call volatile functions?

The PostgreSQL documentation states: Any function with side-effects must be labeled VOLATILE... Consider the following function: CREATE OR REPLACE FUNCTION count_items() RETURNS integer AS ...
1
vote
1answer
190 views

How to repair Microsoft.SqlServer.Types assembly

When I run a checkdb('mydb') this is the only error message printed. Msg 8992, Level 16, State 1, Line 1 Check Catalog Msg 3857, State 1: The attribute (clr_name=NULL) is required but is missing for ...
1
vote
1answer
2k views

Unable to connect to Amazon RDS instance [closed]

I recently created an oracle instance on Amazon RDS. Unfortunately, I'm not able to connect to the instance using Oracle SQL Developer. The (relevant) information I have from Amazon; Endpoint - The ...
2
votes
3answers
971 views

how to change a user password while checking the current password in oracle?

In my application I have a change password form which users enter their current password and the new password. Then I change their password using the following command: alter user user_name ...
2
votes
1answer
336 views

Table optimize command crashed MySQL server

I have a large 5GB table on one of my MySQL databases that I wanted to optimize. I went into the console and ran the optimize command and since it's an InnoDB database it cloned the table to a ...
0
votes
0answers
181 views

exported .SQL file won't import completely in mySQL

I am running MySQL on an Apple server OS X 10.6 (and am a complete newbie to SQL). I am trying to import a .SQL export file that was generated by an application called MailSteward Pro. The .SQL file ...
0
votes
2answers
3k views

Linked Servers pointing to same server (localhost) causing “Transaction context in use by another session” error

We are using SQL Server 2008. Normally our app that is using different databases distributed over the network and some of the stored procedures we call therefore make use of linked servers. Now I ...
0
votes
1answer
199 views

Communication between two database servers

I have 2 databases running on different virtual servers. I have some database processes running on one node. These processes connect to Database Gateway (PG4MQ) and process the messages. I need to ...
0
votes
1answer
1k views

Is it possible to change the MySQL server-id during a SQL session?

I have a MySQL 5.5 server with a server-id of 20. I want to execute a few queries on that server, but have them write to the binlog as a different server-id than 20. Is this possible? I am aware set ...
1
vote
4answers
4k views

How do I deal with FK constraints when importing data using DTS Import/Export Wizard?

I am trying to use the SQL Server Import and Export Wizard to copy data from my production db to my dev db but when I do it fails with the error "The INSERT statment conflicted with the FOREIGN KEY ...
1
vote
1answer
1k views

Is it possible to force drop of mysql tables with FK?

For dropping a table in which a Foreign Key is used in other tables, it is necessary to drop all other tables having FK connection with the corresponding table. Is there a short way to drop a table, ...
8
votes
2answers
2k views

More CPU cores vs faster disks

I'm part of a small company so as usual covering a number of different roles. The latest of which is procuring a dedicated SQL Server box for our .NET web app. We've been quoted on a dual Xeon E5-2620 ...
2
votes
1answer
838 views

Setting mysql slow query to less than 1 second

I have a heavily loaded LAMP system serving about 40 requests per second and doing about 300 mysql queries per second. Here is the output of mysqladmin status Uptime: 5051 Threads: 1 Questions: ...
5
votes
2answers
210 views

When should tables NOT be compressed

We have two servers. One we just compressed, but I took over this little project and this guy says some tables are not good candidates. As with many others, performance is -critical-. Is it accurate ...
2
votes
2answers
2k views

Combining data from two databases with same structure into one database

I have five SQL Server databases with the same schema in five different geographical locations. These locations send periodic backups to the central server which I restore in the five respective ...
1
vote
2answers
122 views

Migrating a database from SQL Server 2012 to the cloud

I have a sample SQL Server database which is running on my computer. I have a cloud database account on AWS (free account). I want to migrate the database, with all tables, to the cloud. How can I do ...
1
vote
2answers
57 views

Label data according to percentile

I have a table name temp with column customer_id , sum and I need to add extra column customer_label (may be on view) which is 1 if customer lies in top 10% according to value of sum, 2 if lies within ...
1
vote
1answer
1k views

Mysql query grouping by two columns for max date takes too long

I have table that looks like this: l_p l_a l_timestamp l_n l_act l_name 123 321 2011-1-1T01:00:00Z B q das 21 23 2012-1-1T01:00:00Z C q sd 123 ...
2
votes
0answers
85 views

MySQL Partitioning Performance

I have a MyISAM table with billions of rows that is still causing me problems because the indexes, even after I shortened them as much as possible, do not fit in my 64GB of RAM. I am unable to index ...
-4
votes
0answers
78 views

Why is LRU is not suitable for joining 2 relations in DBMS [closed]

In DBMS, can someone please explain how the LRU (least recently used) buffer replacement policy acts when joining 2 relations in a database? I have read that LRU is not efficient when joining two ...
0
votes
0answers
309 views

MySQL CSV LOAD DATA INFILE … doesn't want to load more than 72 lines

I'm trying to load a .csv file into my database with many lines of input from a website I'm working on. For some reason I can load files multiple times (over and over) into the database but they have ...
-1
votes
0answers
278 views

All users missing after a detach/reattach [closed]

After detaching and reattaching a database to do a copy operation, all of the user objects are now missing from the database (I should add that the copy failed; according to the logs, there was an ...
0
votes
1answer
96 views

Will Partitions and Indexes on the same table help in performace of Inserts and Selects?

I have a table containing the list of visitors and this table has the following information. Visitor Browser Information Visitor Location Information Visitor Time Information No of Visits I have a ...
6
votes
2answers
4k views

How to design indexes for columns with NULL values in MySQL?

I have a database with 40 million entries and want to run queries with the following WHERE clause ... WHERE `POP1` IS NOT NULL && `VT`='ABC' && (`SOURCE`='HOME') && ...
1
vote
1answer
256 views

How often should MySQL (stock, Percona, etc.) be upgraded?

My organization runs several data-driven web applications backed by various flavors of MySQL on RHEL (i.e. we're just like everyone else!) Some of our web apps use the standard build of MySQL, and we ...
-1
votes
0answers
105 views

Unable to restore cpanel database backup [closed]

I recently created a complete backup of my cpanel to move it into another server. Now the insert queries generated by cpanel for wp-posts table (corresponding to WordPress posts) are too big since ...
2
votes
1answer
639 views

Can you grant an Active Directory Group rights on a linked server?

I am trying to grant rights to an Active Directory Group on a Linked Server. I am unable to do it; it only allows me to grant rights to individual active directory users. Does anyone know how to ...
2
votes
1answer
3k views

Is shrink a safe online operation?

We are planning to run the following space management command: alter table XXX shrink space cascade on a production database (Oracle 10g). The XXX table is a transactional table heavily used for ...

15 30 50 per page