-4
votes
0answers
81 views

Multi-row INSERT rejected? [closed]

What's wrong with my query? :( USE tempdb; IF OBJECT_ID('dbo.OrderTotals', 'V') IS NOT NULL DROP VIEW dbo.OrderTotals; IF OBJECT_ID('dbo.OrderDetails', 'U') IS NOT NULL DROP TABLE dbo.OrderDetails; ...
-1
votes
1answer
109 views

PostgreSQL select optimization

Can you please explain, how I can optimize select like this: SELECT * FROM calls WHERE id_temp % 5 = 0 LIMIT 300000 This select is working on table with 50 millions of records. Thanks a lot and ...
1
vote
1answer
610 views

What does a round relationship icon mean in MySQL Workbench Visual Data Model

I have created a model in the Visual Data Model of MySQL Workbench, and on one single relationship, this icon shows up: What does it mean? The Relation is 1:1, and this icon shows only on this ...
3
votes
1answer
395 views

How to drop all scheduler events in MySQL 5.6?

In MySQL 5.6 is there a way to drop all scheduler events with an administrative command or do I have to go through them one by one with DROP EVENT [IF EXISTS] event_name?
0
votes
1answer
1k views

Error 10053 connecting with Management Studio

While I try to connect to SQL Server, I am getting the following error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: ...
1
vote
3answers
201 views

Is MySQL replication okay after writing to slave then making identical write to master?

I'm running MySQL 5.5.31 and I have a master/slave setup. I accidentally ran a mysql UPDATE on the slave, a simple one-row update like: UPDATE thetable SET somefield = 'asdf' WHERE id = 1234 I ...
1
vote
1answer
188 views

How does one select the histogram / scatterplot / etc. Data Viewers in SSIS 2012

I have a data flow task in SSIS 2012 and have created a flat file source and an OLE DB connection destination. I can select the data flow path between them as in earlier versions of SSIS and I can ...
1
vote
1answer
94 views

Can a database restore fail after it has begun?

I've noticed that a lot of times if a database restore is going to fail, it will fail before it even starts restoring in SQL Server 2008 Management Studio (displaying an error about space or something ...
2
votes
2answers
125 views

MySQL Security permissions

Is it possible in MySQL to block users from executing these statements? DESC "table" SHOW TABLES SHOW CREATE TABLE "table" Or I need to write a MySQL transport port wrapper ? GRANT ON TABLE does ...
2
votes
0answers
2k views

Oracle Select Query Over Database Link Suddenly Hangs Endlessly

I have a query that's been in use for years and today it started hanging endlessly. I took the query apart and found the piece causing it to hang is a simple join on a primary key that should run like ...
1
vote
1answer
59 views

Restoring a backed up database fails

I have backed up a database (full backup) and was attempting to restore as a new database (different name). However when attempting to restore it I get the following error: The transaction log for ...
4
votes
1answer
585 views

Partitioning / indexing an extremely large table

I'm working on indexing and partitioning a single data warehouse table that weighs in around 500 GB. The table is a heap, has over a hundred TEXT columns, and the TEXT_IN_ROW option is enabled. I ...
4
votes
1answer
716 views

Default trace enabled but not active

When I query the configuration of the default trace, it shows enabled: exec sp_configure 'default trace enabled'; --> name minimum maximum config_value run_value default ...
2
votes
1answer
563 views

Is it possible to reduce a group to a row based on some criteria?

I'd like to perform a select on a table involving a GROUP BY such that all rows that share the same set of identifiers are grouped together, but I want to reduce the group to one of the grouped rows ...
-2
votes
1answer
706 views

How to run steps in one job sequentially [closed]

I have one job on SQL server Job Agent that has 3 steps. I want to the job to run starting with step one. After step one is complete and only when it completes I want step 2 to start running and so ...
0
votes
2answers
40 views

This sql select must be optimized…how?

Here is my query SELECT DISTINCT SM.sales_date, (SELECT SUM(gross_sale) FROM sales_main AS INTERNAL WHERE INTERNAL.sales_date = ...
1
vote
1answer
1k views

Returning a True or False from an IIF statement

I have a query with the following IIF statement OnlineEnrolment: IIf([qry_ebs_final_CAN-ENROL-ONLINE].[SP_CAN_ENROL]='Y',True,False) It gives the correct results, but the format that it gives them ...
8
votes
1answer
993 views

On which machine should TCP Chimney Offload be disabled?

I am advising someone on how to disable TCP Chimney Offload, which is enabled by default by Windows Server 2003 SP2. We are working in an environment with multiple server machines, namely the ...
2
votes
1answer
110 views

Zero conversion in sql

Char convertion in Oracle have a pattern: to_char(number,'pattern') and provide option "s" to take sign to result, for ex: select to_char(10,'S999') from dual; will return +10, but when i check select ...
1
vote
2answers
789 views

boolean purpose column char(0) or tinyint(1)

For Boolean purpose column which one is better: nullable char(0) or tinyint(1). I know bool is an alias for tinyint(1) , but in "High Performance MySQL" book that published by O'reilly said: "If ...
8
votes
3answers
1k views

Dealing with identity ranges for transactional replication

I've noticed that when you set up a transactional replication, SQL Server will set identity range management to manual. What this means is that in my subscription database, when I try to insert a new ...
5
votes
2answers
249 views

One table used in two databases

I have a common product table in db1 and db2. I want to make it one table because it has one inventory (stock of products). What is the best solution to share product table among two different ...
2
votes
1answer
533 views

Multiple Database Design or NOT?

I have a database design issue, one that has rattled my brain. What is the project? I am designing a platform where different people register a group, each group is allowed to register their own ...
0
votes
2answers
4k views

What is the difference between TCP port and TCP dynamic port?

Can anyone tell me the difference? I tried to set either 1 port and left another blank also can work. I wonder what is the difference, or anything I missed out?
0
votes
1answer
188 views

Get old database off external hard drive

My hard drive crashed yesterday, luckily I had a back up. I didn't restore from backup though cause I needed a fresh system anyways. However there was a development database I would like back. Is ...
1
vote
2answers
1k views

MySQL Workbench Alter Procedure

i have a problem with my workbench program. I use Mac Lion OS X and mysql workbench program. When i want to do any procedure to alter that doesn't work. Which is show to the procedure code i right ...
0
votes
4answers
3k views

Auto increment value needs to be changed inside trigger

I have a slight problem with a table that I have converted which used to be MyISAM, I have now made it a InnoDB table. Original structure: id varchar(15), seqno int(11) auto increment Joint PK ...
1
vote
1answer
47 views

map user in oracle 10g

here is the scenario: There are two schema created in oracle 10g, say db 1 and db 2. db1 can be accessed by username : sys with password and db2 can be accessed by username : test with password. ...
1
vote
0answers
129 views

Any solution to fix circular replication fail-over?

I've developed a point-of-sale system for our corporation, which has 25+ branches across the country. Each branch has its own MySQL POS database on a WAMP server. I want every event that occurs in ...
1
vote
3answers
952 views

What are the valid formats of a PostgreSQL schema name?

I can't seem to find documentation that describes the valid formats of a PostgreSQL schema name. I know that a schema name cannot: start with a number have spaces start with pg_ What else? Where ...
1
vote
0answers
318 views

Duplicate GROUP_CONCAT values

Writing a plugin for Wordpress using a custom post type and an additional alias table to hold repetition of the post events. The problem comes with duplicate post meta values. wp_post_meta table: ...
4
votes
2answers
476 views

Why monitor bytes sent and received on mysql

I want to know why we should monitor bytes sent and received on mysql ? I hope I have not asked a vague question. Thanks.
3
votes
3answers
1k views

SQL Server freezes (because of application), need logging

We have an application running ontop of our SQL Server 2005 instance and a couple of times a week this application (unannounced) will cause the SQL Server to freeze. I can't even restart the SQL ...
0
votes
2answers
69 views

Grouping results based on link table

I have three tables: users +----+-------+ | id | name | +----+-------+ | 1 | dave | | 2 | cher | | 3 | meg | | 4 | sarah | +----+-------+ groups +----+-------+ | id | name | ...
1
vote
2answers
10k views

How to optimize table_cache?

I searched google but couldnt find an exact answer, some have this value at 10000 or even 20000. Others say that even 1000 is too much for 1gb of RAM. Confusion. My number of opened_tables is ...
3
votes
1answer
552 views

Will table partitioning speed up my queries?

My database is set up with what we call our staging tables and our live tables. Currently for we have about 2 million rows for a table called products. Our customers we call manufacturers load their ...
1
vote
0answers
49 views

Where should a default setting field be?

I am creating a database to track occurrences of incidents on buses based on an existing system. Currently the drivers can set a default bus number, which is used to pre-populate the bus number on the ...
1
vote
2answers
2k views

Create multiple columns from a single column filtering criteria?

thanks in advance for your time, what I need to achieve is generate multiple columns result from a single query, the thing is this: I got a table were is storing the next: id | user_id | revision 1 ...
0
votes
1answer
135 views

How would you track DB storage use and then extrapolate it?

I need to track the size of various DBs we have, then see it's growth rate so that we can guess where it will be at certain times. I'm using Oracle 11g first, but will eventually be applying this to ...
4
votes
1answer
618 views

What does the wait type PREEMPTIVE_XE_CALLBACKEXECUTE mean?

I have two instances in the last week where a DROP command for an Extended Events session has taken over a day to complete, sitting with the wait: PREEMPTIVE_XE_CALLBACKEXECUTE. Can anyone explain ...
3
votes
1answer
180 views

Transactional Replication - Snapshot metrics

I have an application that is using Transactional Replication. We are using snapshots to initialize the subscriptions. All publishers and subscribers are using SQL Server 2008. Due to the way our ...
3
votes
1answer
757 views

How to determine Oracle LOB storage footprint?

With SECUREFILE storage I can specify whether I want compression (and the level of it) and deduplication, and it's all a trade-off between time and space. Timing is fairly easy to profile but what's ...
2
votes
2answers
326 views

Where to store versioned/historized records?

In our application we are using versioning records using triggers. The application is supposed to handle millions of records in the future and the history/versioning tables are there to ensure that ...
0
votes
1answer
1k views

What are the default settings for accessing MySQL remotely?

What is default settings in MYSQL for Remote access? In CentOS the file /etc/my.cnf does not have skip-networking or bind-address. MySQL Version is 5.5, does it mean the server is enabled for remote ...
4
votes
2answers
6k views

MySQL replication: 'Duplicated entry for PRIMARY key'

Could you please help me to understand why I'm receiving 'Duplicated entry for PRIMARY key' on a slave server after a full re-sync. Basically 'mysqldump' was running almost whole night and then the ...
1
vote
0answers
691 views

which role-permission database design?

I want to manage roles and permissions. Most of designs on web look like this tables: Users Roles UserRoles Permissions RolePermissions Here, what is permissions? I am thinking for such a design ...
0
votes
1answer
134 views

Update column value in entire database [closed]

In my database, I have around 30 tables, each with an emp_number (INT) column. How can I update the value of emp_number in all 30 tables?
1
vote
1answer
212 views

I have accidently deleted ibdata1 on an ubuntu server

I have accidently deleted the 'ibdata1' file on the server having innodb, Is there any way I can recover it? the mysql service has restarted since the deletion.
2
votes
1answer
5k views

How do I select items from a table where a single column must contain two (or more) values?

I have a MySQL database table that references different words and their locations in documents. I want to return the IDs of documents that contain all of the words. Here is an example table. docid ...
-1
votes
1answer
50 views

How do I create a trigger that cascades new rows into another table?

I am having a table name link with two columns link1 and link2 and another table name hide with four columns hide1, link1,link2 and hide2. If i insert data into link table the data should insert into ...

15 30 50 per page