System Administration

System Administration information

--Restore from file or on attach

---------------------------------------------------------
DECLARE tabcurs CURSOR
FOR
    SELECT 'intranet.' + [name]
      FROM sysobjects
     WHERE xtype = 'u'

OPEN tabcurs
DECLARE @tname NVARCHAR(517)
FETCH NEXT FROM tabcurs INTO @tname

WHILE @@fetch_status = 0
BEGIN

    EXEC sp_changeobjectowner @tname, 'intranet2'

    FETCH NEXT FROM tabcurs INTO @tname
END
CLOSE tabcurs
DEALLOCATE tabcurs
---------------------------------------------------------
--?--EXEC sp_changeobjectowner 'intranet.AllocObjectId', 'intranet2';
---------------------------------------------------------

Edit server.xml and add the following to the Engine tag;

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${catalina.base}/logs" prefix="access." fileDateFormat="yyyy-MM-dd" suffix=".log" pattern="%{YYYY-MM-dd HH:mm:ss}t,%a,%v,%r,%s,%p,%{user}r,%X" />

Restart Noodle.

Further options here.

Moving Noodle from one environment to another can be done in a few ways:

  • Copy the files (linux only).
  • Install Noodle on the new box and reconfigure or copy the conf files over.

Migrating your RDBMS data from one environment to another can be done in a few ways:

List what is available in the enabled repositories on your CentOS Install:
yum info postgresql-server.x86_64 | grep Version
Select a newer version form http://yum.postgresql.org/
yum install http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
# if you are using priorities add some to /etc/yum.repos.d/pgdg-93-centos.repo
yum install postgresql93-contrib
service postgresql-9.3 initdb
service postgresql-9.3 start
Directories of interest are:
conf/var/lib/pgsql/9.3/data/
data/var/lib/pgsql/9.3/data/base/

List what is available in the enabled repositories on your Ubuntu install:
apt-cache search postgresql | grep -P "^postgresql-[0-9\.]+ "
Install the latest version:
R=$(lsb_release -c | perl -pe 's/.*\t//g')
echo "deb http://apt.postgresql.org/pub/repos/apt/ "$R"-pgdg main" > /etc/apt/sources.list.d/pgdg.list
apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update
apt-get upgrade
P=$(apt-cache search postgresql | grep -P "^postgresql-contrib-[0-9\.]+ " | sort | tail -n 2 | head -n 1 | perl -pe 's/ .*//g')
apt-get install $P
Directories of interest are:
conf/etc/postgresql/9.4/main/
data/var/lib/postgresql/9.4/main/base/

If there are any Active Directory issues there are 2 log locations;

  • System Tools > Analytics > Error Codes > Active Directory (clear and re-try to isolate the reported issue).
  • The log file on the server with DEBUG enabled (restart the Noodle service to get a clean log).
  • Saving password from intranet to AD requires SSL installed on Active Directory (AD required security policy)
  • Noodle uses LDAP access to connect to AD on port 389 (no SSL) or 636 (with SSL).
  • To fully use Active Directory users in Noodle you must provide login credentials that have administrative rights on the Active Directory, for read only searching and reading other users is required.
  • Unable to convert Distinguished to Principal Name message is often due to the users Primary domain not matching one specified in Noodle.

If you see something like this in the log file:

2012.12.12 12:12:12: .intranet,DEBUG: Can't authenticate to configured LDAP server
2012.12.12 12:12:12: .intranet,DEBUG: javax.naming.AuthenticationException:
[LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0 ]

The part in the square brackets is your Active Directory trying to tell you what went wrong.
error codes:

00 LDAP_SUCCESS
01 LDAP_OPERATIONS_ERROR
02 LDAP_PROTOCOL_ERROR
03 LDAP_TIMELIMIT_EXCEEDED
04 LDAP_SIZELIMIT_EXCEEDED
05 LDAP_COMPARE_FALSE
06 LDAP_COMPARE_TRUE
07 LDAP_STRONG_AUTH_NOT_SUPPORTED
08 LDAP_STRONG_AUTH_REQUIRED
09 LDAP_PARTIAL_RESULTS
16 LDAP_NO_SUCH_ATTRIBUTE
17 LDAP_UNDEFINED_TYPE
18 LDAP_INAPPROPRIATE_MATCHING
19 LDAP_CONSTRAINT_VIOLATION
20 LDAP_TYPE_OR_VALUE_EXISTS
21 LDAP_INVALID_SYNTAX
32 LDAP_NO_SUCH_OBJECT
33 LDAP_ALIAS_PROBLEM
34 LDAP_INVALID_DN_SYNTAX
35 LDAP_IS_LEAF
36 LDAP_ALIAS_DEREF_PROBLEM
48 LDAP_INAPPROPRIATE_AUTH
49 LDAP_INVALID_CREDENTIALS
50 LDAP_INSUFFICIENT_ACCESS
51 LDAP_BUSY
52 LDAP_UNAVAILABLE
53 LDAP_UNWILLING_TO_PERFORM
54 LDAP_LOOP_DETECT
64 LDAP_NAMING_VIOLATION
65 LDAP_OBJECT_CLASS_VIOLATION
66 LDAP_NOT_ALLOWED_ON_NONLEAF
67 LDAP_NOT_ALLOWED_ON_RDN
68 LDAP_ALREADY_EXISTS
69 LDAP_NO_OBJECT_CLASS_MODS
70 LDAP_RESULTS_TOO_LARGE
80 LDAP_OTHER
81 LDAP_SERVER_DOWN
82 LDAP_LOCAL_ERROR
83 LDAP_ENCODING_ERROR
84 LDAP_DECODING_ERROR
85 LDAP_TIMEOUT
86 LDAP_AUTH_UNKNOWN
87 LDAP_FILTER_ERROR
88 LDAP_USER_CANCELLED
89 LDAP_PARAM_ERROR
90 LDAP_NO_MEMORY

data:

525 user not found
52e invalid credentials
530 not permitted to logon at this time
531 not permitted to logon at this workstation
532 password expired
533 account disabled
701 account expired
773 user must reset password
775 user account locked

More Active Directory Troubleshooting information on MSDN

Noodle shows performance measurements in

System Tools > Analytics

The heaviest part of Noodle is the RDBMS and to make it fast you need to:

  1. Upgrade software:
    • OS
    • Java
    • DB
    • Noodle
  2. Configure your software properly:
    • set the DB to use your RAM, and otherwise optimize its settings (postgres.conf).
    • set the HTTP pool sizes appropriately (server.xml).
    • make sure the DB and temp folders are not virus scanned.
    • remove or fix Windows domain if rights are timing out.
    • make sure caching is enabled on client browsers.
    • do backups and other CPU/RAM/disk heavy operations on the server after hours.
    • maintenance:
      • PGSQL: REINDEX DATABASE noodledb; VACUUM ANALYZE;
      • MSSQL: ALTER INDEX ALL ON table REBUILD; -- per table (although correct config should do that for you).

Options that make your RDBMS faster:

  1. More disk space if you're using a NTFS volume over 90%.
  2. As much RAM as possible (up to the size of your database+ whatever your OS uses) but at least 1GB + your index size:
    • PGSQL: SELECT SUM(pg_indexes_size(oid)) FROM pg_class;
    • MSSQL: SELECT SUM(used_page_count) FROM dm_db_partition_stats;
  3. Multi-core CPU (more than 4 cores has less effect and more than 30 is pointless).
  4. Putting as many HDD as you can in RAID_0 (you should see a linear performance boost) and /or using SSD or hybrid drives or hybrid volumes.

More, right from the source:

Recommended requirements:

  • Minimal: 500MHz CPU, 500MB RAM, 1GB HDD
  • Small: 1GHz CPU, 1GB RAM, 1GB HDD
  • Optimal: 4 core CPU(s), 4GB RAM, 1TB hybrid volume
  • Large: 8 core CPU(s), 24GB RAM, 1TB SSD

An extensible full-text search is available for Postgres.

MSSQL full text search

1) Install the 3MB MSOffice IFilters not included in the 3GB MSSQL (instructions)

Other formats can be supported, like PDF, ODF, etc.

2) You can verify file type support with this:

select * from sys.fulltext_document_types order by document_type;

3) Optionally if you have already uploaded files to noodle you should right click 'rebuild' the 'Databases/noodledb/Storage/Full Text Catalogs/BINARY_DATA' table.

Keep in mind you have to use the advanced search in Noodle and select the Full Text option to use the MSSQL FTS.

Related: configure MSSQL and migrate