2
votes
2answers
5k views

Why is important to write down the DBID in Oracle DB?

I've always heard that one of the first things you should do in Oracle DB is to write down the DBID, so in case you lost the controlfile you'll need to set it in RMAN, and then you will be able to ...
2
votes
1answer
263 views

Getting Information on active Restore in TSQL / SQL Server Management Studio

On my server a database is currently restoring according to the SQL Server Management Studio In the history SELECT * FROM MSDB..RestoreHistory WITH (nolock) WHERE destination_database_name = 'myDB' ...
1
vote
1answer
85 views

Display a List of used Table and Column

Goal: Display detailed information if database A use database B:s table and its column. if yes, the list will display what is the name of the database B:s table and column that is being used in ...
0
votes
1answer
328 views

Does size of one particular column in a database affect query performance?

I have a table user_list CREATE TABLE IF NOT EXISTS `user_list` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `email` ...
0
votes
2answers
316 views

Improve performance on write-only table?

I am using MySQL 5.5 with innoDB. The basis of my server is Netty, JDBC and BoneCP. I have a log table that contains user inputs(HTTP header, request body etc). This table will only be read very ...
0
votes
1answer
462 views

SQL Server 2008 Timeout expired rebuild and reorganize index solve the issue

I have a large database with a file stream located on a different disk the server that hosts this database has a large number of another none related databases but the specifications of this server ...
0
votes
1answer
1k views

Consecutive Rows to fetch from SQL server table

We have following table structure +---------+------------+-------+---------+------------+---------+-----------+----------+--------+ | EmpCode | InDate | Shift | ArrTime | OutDate | DepTime | ...
0
votes
1answer
88 views

Use regex in postgres

I want to use regexp_replace() to replace the string name1-01.name2-02.1 to name1.01-name2.02.1 How to use the regex here?
0
votes
2answers
351 views

RMAN restore to lower disk space

I have 30.7GB backup file generated from RMAN. The original ./datafile is 950.28GB. According to previous DBA, there is a lot of free space in table space. Now, I have 300GB free disk space in hard ...
2
votes
4answers
3k views

How To Update Random ID to a table in mysql?

I have table like this: ID | City | Prize | ---------------------------- 1 |Surabaya | HP 2 |Surabaya | Watch 3 |Surabaya | Bag 4 |Semarang | 5 |Semarang |Watch 6 |Semarang | 7 ...
0
votes
1answer
205 views

Connect to SQL Server from internet [duplicate]

I want to connect to my SQL Server that placed at my office from my home through the internet. I'm newbie, I tried various things from Google like opening port 1433, add inbound rule 1433 & 1434 ...
0
votes
1answer
3k views

Insert blank row in the postgres query result

I have below table after run a postgres query select * from tbl 1 type_1 name-1 2 type_1 name_2 3 type_2 name_3 4 type_2 name_4 5 type_3 name_5 how can I add a blank line in between each type so I ...
9
votes
1answer
18k views

Postgres function assign query results to multiple variables

I need to assign values to 2 variable as below in Postgres function. a := select col1 from tbl where ... b := select col2 from tbl where ... How can I assign 2 values to 2 variables in one line ...
1
vote
1answer
2k views

Finding rows where a column contains [ and ] characters

I need to get results where the column contains a string that includes [ ]. When I use LIKE, it takes the [] as a wildcard sequence, and doesn't work as I need. For example, I want to search through ...
1
vote
1answer
10k views

Mysql backup from ibdata1, ib_logfile1, ib_logfile0

I accidentally deleted my word press mysql DB. Below is the list of log files that i see in my directory where i am hoping i can get back some of my data. I actually converted the first file ...
0
votes
1answer
736 views

Unique key in SQL Power Architect? Forward Engineering

I want to know if there is a way to create unique keys (not PKs) in SQL Power Architect using forward engineering. I've searched google, saw the tutorials by the software vendor, and checked out in ...
1
vote
1answer
64 views

Open a Oracle 7.3.x database in Oracle 11

Is there any way to open or convert an old Oracle 7.x database into Oracle 11g? Thanks in advance!
0
votes
1answer
243 views

Convert or open Oracle 7.3.x database in Oracle 11 [duplicate]

I have a very old Oracle 7.x database that I need to open or convert to a new Oracle 11g. Here's the content of the old database: control01.ctl control02.ctl control03.ctl findata01.ora finind01.ora ...
2
votes
2answers
4k views

Unable to access sql database with login and password [closed]

I'm writing Windows Service in C# and inside of it I'm unable to connect to the database. This is the question I've asked recently: SqlException: Cannot open database "path\db.mdf" requested by the ...
3
votes
2answers
336 views

Prevent SysAdmin from doing a Database Restore

I am a sysadmin on my SQL Server 2008, and I need to be, but I would like to setup my security on the Production server to prevent me from accidentally restoring to the production database. I ...
0
votes
0answers
45 views

Have a lot of customers -> which design in SQL Server 2008R2 should be chosen [closed]

I have a task and I don't know how solve it :) So, we have a lot of customers who should use SQL Server for their applications. Design is standard and simply: Customer -> Remote Desktop -> ...
2
votes
2answers
4k views

Update one instance of Sql Server 2008 R2 Standard to SP2?

We have one server with multiple Sq Server 2008 R2 instances installed. To support an application we need to upgrade to one instance to SP2. Can we only apply the service pack to the specific ...
0
votes
1answer
393 views

Would you use MongoDB in high-transaction environment? [closed]

using other words: does the one-write-lock-per-database policy (it's not a "bug" but a "feature" by design) affect contention making its usage in certain kind of workloads less then optimal? if not ...
0
votes
1answer
855 views

Select values from 2 tables with same properties

I am using SQL server 2012, running on windows data-center 2012, under windows azure cloud platform virtual machine. I have the following situation : I have a base settings table lets say as ...
1
vote
1answer
1k views

Postgresql streaming replication and wal archive?

We have postgresql 9.1 configured for streaming replication with a WAL archive, and this works great. We would like to use a shared WAL archive so we can restore from periodic base backups. The ...
1
vote
2answers
2k views

High Disk I/0 Issues

Our database has been giving this error occassionally... "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> ...
1
vote
0answers
1k views

DDL trigger AFTER ALTER ON SCHEMA behavior

Can anyone please tell me what's going on here: CREATE TRIGGER afr_alt_trig AFTER ALTER ON SCHEMA cols ora_name_list_t; BEGIN IF (ora_dict_obj_type = 'TABLE') THEN select column_name bulk ...
0
votes
1answer
637 views

Is that possible to group result on 3 months period basis?

I am trying to group results by 3 months period starting by the current month as shown below: row1 15 -- This should contain November, September and October row2 25 -- This should contain ...
2
votes
1answer
629 views

SQL Server Full-Text Search: combining proximity term and thesaurus

Scenario I am developing a full-text search over a products table. The full-text indexed field of th table contains a brief description of the product, the name of the category and the product code. ...
0
votes
1answer
92 views

Is it any good for performance to have master and slave on the same server

There are similar questions on this site, but they mostly cover server failure and data backup aspects. I'm concerned only as far as query performance. If master and slave share the same resources, ...
5
votes
2answers
601 views

Mongodb restrict access on collections level

I'm building a backend system using MongoDB. Now I want to restrict access on certain numbers of database collections to this system. For example I have users, admin_users, pageviews and I want this ...
1
vote
1answer
2k views

Store equations/formula in mysql db table

I want to know what is there a way for storing equations or formula in a DB column. Below is the table where I am storing the machines details(master table). But the last column is what I am worrying. ...
1
vote
4answers
243 views

mysql need help optimizing query

I have a table containing servers logs, and another table containing rules to match certain and drop them. The logs tables contains around 1 million rows, and there are about 20-30 rules. The ...
3
votes
2answers
239 views

Is it suitable innodb_buffer_pool_size for MySQL Master-Slave

I am wondering how to decide the value of innodb_buffer_pool_size for my Master-Slave style database. I have a set of MySQL, 1 x master + 1 x slave. As I know that the innodb_buffer_pool_size is ...
0
votes
1answer
142 views

How to restore SQL Server database to a specific day? [closed]

Suppose I have an SQL Server 2008 which is installed on windows 2008. There is a db MyDb under the instance. MyDb is have full backup every night. Because of storage space on hard driver, only 7 days ...
5
votes
2answers
22k views

SQL Server 2012 Express with Reporting Services

Everywhere I search for SQL Server 2012 Express with Advanced Services, I ended up with this link, http://www.microsoft.com/en-us/download/details.aspx?id=35579, and every time I install it, I do not ...
2
votes
2answers
26k views

How do I get the difference in minutes from 2 timestamp columns?

Can't seem to figure this out. Just need the difference in minutes between 2 oracle timestamp columns. END_TS START_TS ...
3
votes
1answer
2k views

Removing secondary replica from SQL Availability Group causes large log file

Due to an unforeseen hardware error, I had to take our secondary replicas down for maintenance. This was really due to a storage issue and, it was decided at a higher level, to purchase a new storage ...
1
vote
1answer
198 views

How to get names form 3 different tables

I have 4 tables to proceed. In table A I have the parameters of columns in tables B,C,D and the names are there. TB_A ...
0
votes
1answer
59 views

Unable to login to MySQL with new user

I currently have a MySQL database which I have added a new user (abbvs) to identified by a password. The users I have: mysql> select user,host from mysql.user; +-------+-----------+ | user | ...
2
votes
1answer
9k views

Permission denied for relation <table>

I have ran the following SQL in psql: CREATE USER bspu LOGIN; CREATE DATABASE bsp OWNER bspu; GRANT ALL PRIVILEGES ON DATABASE bsp TO bspu; \c bsp CREATE TABLE users ( id SERIAL PRIMARY KEY, ...
3
votes
3answers
412 views

Joining and filtering two sets of the same table

I guess this is an easy and stupid question. Consider this MySQL purchase table (where p_id is autoincremented): +---------+-------------+---------------+---------+ | p_id | item_id | user_id ...
4
votes
1answer
204 views

SQL Server's BACKUP DATABASE - how to access the original exception?

DECLARE @DbName SYSNAME; SET @DbName = 'MyDatabase'; BACKUP DATABASE @DbName TO DISK = 'C:\MyDatabase.bak' WITH INIT, NAME = 'MyDatabase-FullBackup', STATS = 5; This, sure enough, ...
0
votes
1answer
285 views

Complex Oracle SQL to sum data

I am building a SQL query in Oracle 10g that needs to sum overtime hours for the base table, but needs fields from the parent tables as well. I am looking for the fastest way to build the query. The ...
1
vote
1answer
1k views

SQL Server performance for tables having large number of columns [closed]

I have a requirement where I need to create a table with about 600 columns. Out of 600 columns about 200 columns will be XML columns. Other column will be of other datatypes such as int, varchar, ...
1
vote
0answers
208 views

Migrate from Interbase to MySQL

I need to migrate a big database from Interbase to MySQL, I'd like to have suggestions about free and non-free tools to perform this task. I've found this one: ...
4
votes
2answers
855 views

SQL Server 2012 autoupdate statistics default behaviour

I found, that since SQL Server 2008 R2 there is a trace flag 2317 available. It turns on dynamical autoupdate statistics threshold, instead of default threshold of 20%. So, it greatly improves ...
-1
votes
1answer
92 views

MySQL Replication

i try to search around the internet to find out what's a "Master -> Slave" Replication of MySQL want to do? Can sombardey maby explain it for me? what i can read is what happen are when i have a ...
2
votes
5answers
6k views

Autogrowth - Percentage Use?

Is it best not to use Percentage file growth for autogrowth settings? The below recommends using percent value growth for databases under 500GB but is this recommended? ...
4
votes
2answers
12k views

MySQL relay log corrupted, how do I fix it? Tried but failed

A MySQL v5.1.61 relay got corrupted when the machine suddenly shut down. I tried to fix it but it didn't work. — How do I fix it? Did I do something wrong? As far as I've read, corrupted MySQL relay ...

15 30 50 per page