Tag Info

New answers tagged

0

First, make sure this chunks/datafiles are from Windows OS too. Isn't compatible read a datafile froma different plataform (windows VS Unix VS Linux) You cannot just move the chunks/datafiles and expected the engine just re-adapt to new path. There internal pointers at theirs configurations where the path is saved and need some administration steps to ...


2

If you have locked yourself out then you need to do the following: Stop your MongoDB instance Remove the --auth and/or --keyfile options from your MongoDB config to disable authentication Start the instance without authentication Edit the users as needed Restart the instance with authentication enabled


0

You can read more about the Policy Based Management and centralized policy management using a central management server in the SQL Server Policy Based Management – evaluating policies on multiple SQL Server instances online article. It describes how to create the central management server too


1

You've left out so much that your chances of recovering useful data are negligible. pg_clog contains the commit/rollback logs. Without these, the system doesn't know which parts of the database files are valid and which are not. (gross oversimplification, but hey). pg_xlog, the write-ahead logs. Without these, the database can't handle incomplete writes, ...


0

You have to stop Mongo, remove the admin files, then start Mongo sudo service mongod stop mv /data/admin.* . sudo service mongod start


0

Check the answers to this question, they might help MongoDB "root" user Basically if you still have access to the server, you may be able to access the Admin database. There's more in this page http://docs.mongodb.org/v2.4/reference/user-privileges/ Note that 2.6 version changes how this works completely. For 2.6 you'll need to spend more time ...


0

They're all listed in Setting Database Options: bulkcopy: ALTER DATABASE .. SET RECOVERY BULK_LOGGED; trunc. log: ALTER DATABASE .. SET RECOVERY SIMPLE; dbo use: ALTER DATABASE ... SET RESTRICTED_USER; single: ALTER DATABASE ... SET SINGLE_USER; ansi null default: ALTER DATABASE ... SET ANSI_NULL_DEFAULT ON; db chaining: ALTER DATABASE ... SET DB_CHAINING ...


3

As you found, you have to use '' to represent a single quote ('). You do not need to use the SPACE() function: select replace(character_column, '''', '') from your_table Note: Using SPACE() could actually create an issue as it returns VARCHAR(4000).


0

First of all, Congradulations !! You've been given a greate oportunite. I'm going to a similar way you are, but with oracle database. I'm studying DB Administration following the certifications path. First you should focus on SQL to have a good base. The link below has some interesting topics you have to learn, as a DBA, such: Backups and Recovery, ...


0

Yes this is normal. When RAM is no longer needed it is not freed at the same time. It is kept as cached in case the server would decide that it needs to access it again. This would save you extra time that you would otherwise need for data to appear in RAM. Cached memory is freed only when new applications request more RAM.


3

Redundancy does not mean: Columns that have the same data type Columns (or rows) that have the same data value (if this is coincidental) Columns that are foreign keys that link a child table to its parent (including the same data value as FK and PK in the respective tables) Redundancy is not about columns or rows for that matter. Redundancy is about ...


2

Check out Brent Ozar's sp_blitz. Also check out Glenn Berry's SQL Server 2012 Diagnostic Information Queries


0

There's no perfect layout tool. What you get is the best you can get automatically. After that fine tune your layout manually. Btw, make sure you have enough space for all objects by adding more pages if necessary (see menu -> Model -> Diagram Properties and Size...) before you run the auto layout.


2

If you've dropped all the tables, you could just drop the database and re-create it. It will be created with the default sizes and growth rates as defined by the model database. These may not be ideal (I don't find the defaults particularly useful in most scenarios), but you can change them. Unless you have a lot of things set up on this database (like ...


0

In SQL server the data and log files only grow automatically. If you deleted alot of data there will be empty space inside the file but SQL server will not shrink the file automatically because it expects more data to be added and growing the files is expensive. shrinking the file is also generally bad for indexes and stats but since you dropped all the ...


0

Percona has an extremely awesome wizard for initial server configuration files (I've used it on our own extremely busy production servers). It requires registration, but usage is free.


1

In your attempt: SELECT id FROM "players" where "players".born_on < "1950-01-01"; Then DELETE FROM "players" WHERE "players".id = 5; DELETE FROM "stats" WHERE "stats".player_id = 5; DELETE FROM "photos" WHERE "photos".player_id = 5; ... repeat First, I don't understand the "...= 5;" one each the subsequent deletes. What is the 5? But....what if ...


0

You could use after logon to database trigger for this purpose also. For example, create table with columns of your interest ( username, machine, program...), then create after logon trigger and populate your table with data from v$session. Or from some other system table, whatever best suits your needs. ...


0

It should be OK. after all, that's what the entire goal of recovery is, to survive any abrupt interrupt. Instance shutdown is actually quite a graceful shutdown, will properly close all DBs (should be no pending xact to rollback on recovery). But the gist of it is that you're using a sledgehammer to break an egg shell. Copying using BACKUP FULL WITH COPY ...


5

This is a terrible way to take a backup. Why aren't they using, uh, backups? Not just because they don't require that you take down the entire instance. If you just stop the instance, there isn't really a guarantee that the MDF/LDF files will be detached gracefully. So just because you are able to copy them, does not mean they are good. Having the service ...


0

I would advice explaining the purpose of these files. As in: .mdf (and also .ndf) are the data files of the database, where all of the tables, indexes (other than full-text catalogs), procedures, etc. are stored. The .mdf is the primary data file and the .ndf only exists if a new file group is created. .ldf is the transaction log. The transaction log is ...


2

If audit is enabled, you can check DBA_AUDIT_SESSION/USER_AUDIT_SESSION (More info about auditing - Audit doc). Another option is to check dba_hist_active_sess_history - you will need to write a query that counts distinct serials/sessions to get rough number of user logins assuming user did anything during the session. Also, you won't be able to go too far ...


0

Microsoft SQL Servers do not allow the use of User Principle Name (UPN) addresses for service accounts. There is a post from a few years ago in Microsoft Connect and a more recent post: https://connect.microsoft.com/SQLServer/feedback/details/519008/upn-user-principal-name-as-services-account-name#details ...


0

OK - PL-SQL Developer from Allround Automations? Anyway, the tool doesn't matter. Take a look here for a good discussion. Your user (Prodcollops) may or may not have their own schema, or may just have read rights to others' schemas. It sounds like your user doesn't have a schema of their own, but it's impossible to tell - log in as prodcollops and select * ...


0

Your question is unclear, however I think the answer may be the glogin.sql file. The location will vary depending on version etc., but on my current box it's under /usr/lib/oracle/11.2/client64/lib/glogin.sql (said box having sqlplus installed via the oracle-instantclient11.2-sqlplus rpm). cat /usr/lib/oracle/11.2/client64/lib/glogin.sql -- -- Copyright (c) ...


3

Congratulations, someone has reinvented EAV (Entity Attribute Value). Please study up on the subject with them. The short form is: one or more EAV tables can be useful in certain specific cases, usually when accompanied by other tables, but you lose most of the benefit of a relational database when you move to them. I would also ask: If someone wants to ...


1

to deiced if schema design is good or bad what you should ask yourself is "what different types of query i will use against schema to access this data". good or bad is very subjective and based on our own experience we can do educated suggestions but most accurate thing will be what is your business requirement. start from looking at most frequent ...


0

Do not use a single pass of any hashing function to store passwords. Do not fail to use a random salt in the 8-16 byte range. Instead, your application has a user is select a keyword/passphrase: Generate a cryptographically random 8-16 byte salt Use PBKDF2, BCrypt, or SCrypt with said salt and as large an iteration count/work factor as your processors ...


0

Use an MD5 hash of the password - never store the original password. You could also add in the user name to confound dictionary attacks. Then associate the data with a user by means of a user_id field in any data. Paul...


0

The Central Management Servers feature, introduced in the Standard and Enterprise Editions of SQL Server 2008, helps DBAs to maintain multiple SQL Server instances across an enterprise environment. The feature provides two major benefits when multiple SQL Server instances need to be affected by a specific action: • An execution of a specific T-SQL query ...


1

Relational databases are designed to ensure data structure complexity and flexibility. Having all records in a single table can IMHO mean two things - a bad design, or you don't need a database at all. Why not just use an Excel table then? The example you provided shows that you want to store people and their houses, colors, etc in the same table. Having ...


2

This is bad design practice and should be avoided. Switch to NoSQL DB if this is really needed.


1

This is so funny. Yesterday, someone asked how to do the opposite and I answered that question : Migrate from innodb_file_per_table to off in MySQL Here the steps for what you want STEP #1 Set innodb_file_per_table to 0 in my.ini [mysqld] innodb_file_per_table = 1 STEP #2 Login in Command Prompt in Administrator mode and run C:\> net stop mysql ...



Top 50 recent answers are included