1
vote
1answer
42 views

Beginner questions about SQL and relational algebra

I'm doing some exercices waiting for the exam. I have some doubt. RELATIONAL ALGEBRA These are the table: Newspaper (Cod_n, Name_n, Publisher) Article (Cod_a, Title, Topic, ...
1
vote
2answers
124 views

Optimizing large MySQL SELECT WHERE IN clauses

How can the following SELECT WHERE IN case be optimized? I have a table with over 100 million rows with only 3 columns. The primary key (col1) is a 127 varchar. I am performing a SELECT col1 WHERE ...
0
votes
0answers
75 views

Error Code: 1133. Can't find any matching row in the user table

Im reading O'Relly "Learning MySQL" and it says that you can create a user in MySQL by doing just this: mysql> GRANT ALL ON *.* TO 'jill'@'%.invyhome.com' IDENTIFIED BY 'the_password'; Query OK, 0 ...
0
votes
1answer
33 views

Oracle: Replace corrupted first datafile

A datafile associated with a tablespace has been corrupted (got truncated to size 0). I don't mind losing the data, because I have a full DB dump which I can import. Now I want to replace this ...
2
votes
1answer
67 views

TSQL- Column DataType Length

Can anyone please explain me the below one. I used the below query in getting the table columns info, but the max length seems to be x*2 of the actual col length. I mean if I have a col with datatype ...
1
vote
1answer
36 views

Turning of Autogrowth for particular file

We have a primary file group with several files each on different disks. One of the disks is nearing capacity and as such we have had to switch off the auto growth for that file. Is there anything I ...
1
vote
1answer
64 views

Way to run SQLCMD without storing password in text format

Is there a way to run sqlcmd from a batch file where I don't want to store the password in plain text format. I have done some research and found the system variables method(store password in system ...
1
vote
2answers
57 views

Limiting read access in postgres to few rows

We have a requirement where we want to limit the maximum no. of rows that a select query can return when its done using a particular login. So basically we would like to append a limit clause to any ...
1
vote
1answer
82 views

Maintenance plan using external tool to execute query and stored procedures giving off no results

My situation is as follows: I am using a third party tool (VisualCron) to run stored procedures and sql queries on several database servers. The stored procedures are from http://ola.hallengren.com/ ...
1
vote
1answer
111 views

SQL Server agent job scripts

Being a newbie to database migration, can I script all the database jobs one by one and run them against a new server to create these jobs? If not, why do we use these SQL job scripts? Thanks in ...
2
votes
3answers
586 views

Oracle 12c in-memory option

I've been told that there's an oracle in-memory option for 12c and that it uses columnar compression to get some great query speeds. I'd like to leverage it for some business intelligence stuff. I've ...
3
votes
2answers
92 views

SQL Server 2012 Compatibility

I'm converting some stuff over to be compatible with SQL Server 2012 and had a couple of questions. I'm taking out all of the sp_dboption commands and making them ALTER commands instead, but there ...
4
votes
2answers
206 views

Update Statement takes forever to complete [closed]

I have table around 1250000 records, and 80 columns Table Structure CREATE TABLE [dbo].[Table] ( [Column1] [int] IDENTITY(1, 1) NOT FOR REPLICATION NOT NULL, [Column2] [int] NULL, [Column3] [int] ...
1
vote
2answers
81 views

Triggers After Insert and After Update - Good Practice

It is a good practice to have a separate trigger for After Insert and another one for After Update or there is no problem in having both in the same logic? Also from a perspective of performance it ...
0
votes
0answers
241 views

Firebird-Time Interval- between 2 Dates

I try to select the period of employment for the members in a Company. Example: Date of join: 01.01.2001 Today: 27.02.2014 Now, I want this: 13 years, 1 month and 27 days I have a Statement which ...
-2
votes
6answers
588 views

Missing import function in SQL Developer like MS Access has

At my work we used to use MS Access now we are forced to use SQL developer to create queries and export the data. Details: We can only query to the database We cannot create a new database We use ...
0
votes
2answers
68 views

How to store a database table in multiple disks with assigned ratio?

I am going to deploy database tables to multiple disks. My database layout would be like following example: There are 3 tables (Customer, Order, Product) and 4 disks (disk_A, B, C, D). Customer: 5% ...
1
vote
1answer
157 views

Autoclose property resets to true after attaching db even if model is set to false

I am using SQL Server Express 2008 R2. The auto close property of a newly created database will be set to value same as model db. In my case I have set autoclose to false for model so that when I ...
0
votes
0answers
21 views

ALTER TABLE Switch Statement Failed due to ANSI_PADDING [duplicate]

I trying to switch table partitions from LEFT to RIGHT. After the required tables have been created, I run the actual switch, but get the following error : ALTER TABLE SWITCH statement failed ...
7
votes
2answers
307 views

Where to start with Oracle?

This question only needs one answer: a list of great resources for getting started with Oracle, including Database Administration, PL/SQL and SQL. You may find your question has been closed as a ...
6
votes
1answer
189 views

Better to use a RANGE RIGHT or RANGE LEFT Partition Scheme

I'd like to know if it is better to use a RANGE RIGHT partition scheme or a RANGE LEFT partition scheme? Is one of these options by default a better choice, or is it heavily dependent on the actual ...
0
votes
2answers
163 views

Getting table definitions on the command line in MySQL [closed]

I am new to MySQL. I am trying to get table definitions from the database server (4.0.26). I tried below steps to get information, running cmd as an administrator: c:\> cd mysql\bin\ ...
0
votes
3answers
99 views

Applying data changes from one database to another

I have an application running on Oracle 9i database and I was looking for something more practical to deploy data changes (not schema changes) from the development database to production. Currently I ...
0
votes
0answers
47 views

Which queries are running and what tables are they accessing? [duplicate]

I am learning Oracle. I am trying to write a query to find out the list of SQL queries and the tables that they access. I tried looking into v$sql, v$sqlarea etc, but was not able to find a column ...
1
vote
1answer
79 views

addition in datetime column during insertion in mysql

i have a table with below 5 columns..timestamp is data type for timedate related column : Region event_time start_time mid_time end_time India 2013-11-03 13:00:00 America ...
0
votes
0answers
35 views

How to install SQL Server 2008 R2 [closed]

My installation is completed, but no instance in not loading (I am on my service account). Show only .in for more browser. Not loading my instance in the database engine. Everything is completely ...
0
votes
1answer
217 views

What is blocking 'SELECT… WITH(NOLOCK)'?

While following BrentOzar's "How Much is Offline During an Index Rebuild?" I was curious to run: SELECT Quantity FROM [Production].[TransactionHistory] WITH(NOLOCK) while executing a rebuild ...
0
votes
2answers
184 views

SQL Server 2012. Update second table based on input from first table

I have two tables in two databases: Table01 in Database01 and Table02 in Database02. Both tables have a column called UserID. The UserID column is created when the user creates a new account on the ...
1
vote
3answers
126 views

Best practice to query administrative views for instance level elements

I want to query a monitor element at instance level (for example the memory used for the instance) via a query like this: SELECT MEMBER, MAX_MEMBER_MEM, CURRENT_MEMBER_MEM, PEAK_MEMBER_MEM FROM ...
1
vote
0answers
100 views

SQL Error 3183 On SQL Server 2012

I have a backup of database version sql server 2008 R2 . while restoring it to SQL Server 2012 I am getting error msg 3183 RESTORE detected an error on page (6100:1886858449) in database ... . ...
1
vote
1answer
180 views

Why DBCC CHECKDB is multiple times in error log

I have an issue with dbcc checkdb command . In the errorlog file I find the dbcc checkdb command multiple time within the interval of 30-45 minutes. I have scheduled a job which grep keyword error ...
1
vote
1answer
1k views

What is the purpose of setting serveroutput in oracle? [closed]

Could someone let me know what is the purpose of using set serveroutput on/off in oracle? I ran the below query to see what it is doing. However I need to know much about serveroutput. Kindly help me ...
1
vote
1answer
611 views

Override/kill when Code 3/SQLSTATE=57016 Occurs

I have encountered issues a few times when a process of mine performs a bulk load to a temp table we use for pre-processing purposes. The Bulk load fails for one reason or another (this we are looking ...
2
votes
0answers
394 views

SQL Server 2008 R2 cluster installation error

I was trying to install SQL Server Cluster (Launch wiard to install single node SQL Server 2008 R2 faliover cluster) .. The setup checks displayed no error and the installation started after all the ...
2
votes
1answer
336 views

Create a sub query for sum data as a new column in SQL Server

Suppose that I have a table named tblTemp which has this data: | ID | AMOUNT | ---------------- | 1 | 10 | | 1-1 | 20 | | 1-2 | 30 | | 1-3 | 40 | | 2 | 50 | | 3 | 60 | ...
-1
votes
1answer
179 views

How to merge data from 2 databases [duplicate]

I have a SQL-Server database that crashed while I was away on vacation. All info from 5/2/13 is missing from our current database because my replacement implemented a back-up of the database from ...
0
votes
0answers
67 views

Linked server performace issue?

I have created a linked server in sql server 2008 R2 Enterprise Edition for mysql i.e. MySQL database is accessible under sql server environment. I have a created a trigger in sql server such that ...
3
votes
4answers
913 views

What is the best permissions to set for only creating and managing own databases?

I want to create a login for a new user who could only create and manage their own databases. Other databases on the server should be read-only to that user. What would be a good set of ...
1
vote
0answers
209 views

Database Timeout Error from VB Application

Recently we are receiving so many database timeout error from different servers we are using vb application -- which will use ODBC connection to connect database - here no problem when we run the ...
1
vote
2answers
595 views

SQL Server 2012, restore database

I am using MS SQL Management Studio 2012 to restore the database from a .bak file. (That file is from the backup of the database on server) In my new database, the triggers are missing. Why did I ...
2
votes
3answers
580 views

Database Design Relationship for Patient Visit in MS Access

I am designing a database to store records for research purposes, and I am having trouble picturing how I can create a relational database based on the information I have. There are a total of 6 ...
2
votes
2answers
1k views

Database design for an E-commerce website

I am new to database design. I am designing a database for an E-commerce website, there are a lot of products to be updated, but while designing for product specification table I do not understand ...
0
votes
1answer
144 views

What is the maximum number of rows in a clustered index on datetime column?

I would like know what the max no of rows is in a clustered index (non-unique) on a datetime column table in SQL Server 2008R2.
3
votes
1answer
9k views

What queries is Oracle executing, how frequently, and time-taken?

I have a (Java) web-application, that of course executes many queries (selects, inserts, updates, deletes) to the Oracle Database. I want to find out the following for last 7 days: SQLQuery ...
2
votes
3answers
3k views

Detecting SQL Server Utilization with a query

My current project will send queries to an sql server constantly and It may use 100% of the memory or CPU. How can I check if the server is nearing full utilization in a stored procedure so that I ...
0
votes
2answers
85 views

what is the best choice from those two tables?

what is the best choice from those tables?? table A : keep DB simple with lower number of tables ... but i will find difficulties if i wanted to extract certain data from column of doses coz it's ...
1
vote
1answer
133 views

a question in tables relations

Table A is linked to Table B , and Table B is linked to Table C using primary and foreign keys My questions: Should i link Table A to Table C too?? Or Table B can act as intermediate link between ...
1
vote
1answer
80 views

Tables of a huge database

When I work on a huge database, and after following normalization rules, I found that I have many tables for each part of my huge database. That makes me worry about the final number of tables, it ...
0
votes
2answers
678 views

Difference between chained and migrated rows

What is the difference between chained and migrated rows? Also what query should be used to display these rows? (I'm using Oracle 11gR2 database)
-1
votes
1answer
73 views

Can I make that connection?

If I have a column with data type varchar(max) in a table that contains a big piece of text, can I make a connection between a word or a sentence in that text with another word or a sentence in ...