Closes the current error log file and cycles the error log extension
numbers just like a server restart. The new error log contains version
and copyright information and a line indicating that the new log has
been created.
Every time SQL Server is started, the current error log is renamed to errorlog.1; errorlog.1 becomes errorlog.2, errorlog.2 becomes errorlog.3, and so on. sp_cycle_errorlog enables you to cycle the error log files without stopping and starting the server.
http://technet.microsoft.com/en-us/library/ms182512%28v=sql.100%29.aspx
Friday, September 27, 2013
sp_cycle_errorlog
Posted by
Admin
at
9/27/2013 09:35:00 AM
0
comments
Labels: SQL Server
Thursday, September 26, 2013
Understanding "login failed" (Error 18456) error messages in SQL Server 2005
Got login errors in the SQL Server 2005 databases. The following link solves the issue.
Understanding "login failed" (Error 18456) error messages in SQL Server 2005
If the server encounters an error that prevents a login from succeeding, the client will display the following error mesage.
Msg 18456, Level 14, State 1, Server
Login failed for user '
Note that the message is kept fairly nondescript to prevent information disclosure to unauthenticated clients. In particular, the 'State' will always be shown to be '1' regardless of the nature of the problem. To determine the true reason for the failure, the administrator can look in the server's error log where a corresponding entry will be written. An example of an entry is:
|
ERROR STATE
|
ERROR DESCRIPTION
|
|
2 and 5
|
Invalid userid
|
|
6
|
Attempt to use a Windows login name with SQL Authentication
|
|
7
|
Login disabled and password mismatch
|
|
8
|
Password mismatch
|
|
9
|
Invalid password
|
|
11 and 12
|
Valid login but server access failure
|
|
13
|
SQL Server service paused
|
|
18
|
Change password required
|
Posted by
Admin
at
9/26/2013 01:52:00 PM
0
comments
Labels: SQL Server
Tuesday, June 25, 2013
ArcSDE Operating system authentication
Operating system authentication | |
| Release 9.3 | |
Using Windows-authenticated users or groups in SQL Server | |
| Release 9.3 | |
Posted by
Admin
at
6/25/2013 11:29:00 AM
0
comments
Labels: ArcSDE, SQL Server
Wednesday, June 19, 2013
SQL Server Catalog Views
Posted by
Admin
at
6/19/2013 01:18:00 PM
0
comments
Labels: SQL Server
Monday, June 10, 2013
ORA-16038 ORA-19809 ORA-00312
SQL> startup
ORACLE instance started.
Total System Global Area 1010827264 bytes
Fixed Size 2045480 bytes
Variable Size 385878488 bytes
Database Buffers 603979776 bytes
Redo Buffers 18923520 bytes
Database mounted.
ORA-16038: log 3 sequence# 42 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 3 thread 1: '/u02/oradata/DB/redo03.log'
Posted by
Admin
at
6/10/2013 12:57:00 PM
0
comments
Labels: Oracle, Oracle database administration, Oracle parameter
Wednesday, December 5, 2012
Server Performance and Activity Monitoring How-to Topics
Posted by
Admin
at
12/05/2012 02:47:00 PM
0
comments
Labels: SQL Server
Wednesday, November 28, 2012
SQL Server SYNONYM
First introduced in SQL Server 2005.
SQL Server SYNONYM's can be very useful and can be created for
- Tables
- Views
- Assembly Stored Procedures, Table Valued Functions, Aggregations
- SQL Scalar Functions
- SQL Stored Procedures
- SQL Table Valued Functions
- SQL Inline-Table-Valued Functions
- Local and Global Temporary Tables
- Replication-filter-procedures
- Extended Stored Procedures
Benefits:
- SYNONYMs provide a layer of abstraction over the referenced object
- Allow changes to complicated (multi part) and lengthy names with a simplified alias as a same server resident object.
- Provides flexibility for changing the location of objects without changing existing code.
- SYNONYMs can be created in the same database to provide backward compatibility for older applications in case of drop or rename of objects.
- SYNONYMs can be useful if you give the front-end query tools like spreadsheets and Access linked tables direct links in to the tables.
Limitations:
- SYNONYMs are loosely bound to the referenced objects. So you can delete a SYNONYM without getting any warning that it is being referenced by any other database object.
- Chaining is not allowed. It means that you can not create SYNONYM of a SYNONYM.
- Obviously consumes possible object names, as you can not create a table with the same name of a synonym
- The object for which the SYNONYM is being created is checked at run time. It is not checked at creation time. So this means that if you make any related error e.g. spelling error, the synonym will created, but you will get an error while accessing the object.
- SYNONYM can not be referenced in a DDL statement
If we use this option frequently, then keping in mind the facts that:
- you can delete a SYNONYM without getting any warning that it is being referenced by any other database object
- the object for which the SYNONYM is being created is checked at run time. It is not checked at creation time.
- It makes it imperitive that we should plan and monitor synonyms bit more than other objects/references in SQL Server.
- An additional limitation is that you can't use TRUNCATE TABLE on a synonym.
- The SSIS Data Profiling task cannot see synonyms
SQL Server synonym links:
http://www.mssqltips.com/sqlservertip/1576/benefits-and-limitations-of-using-synonyms-in-sql-server-2005/
http://connect.microsoft.com/SQLServer/feedback/details/311079/expand-synonym-to-other-entities-database-linked-server
http://msdn.microsoft.com/en-us/library/ms187552.aspx
Posted by
Admin
at
11/28/2012 11:54:00 AM
0
comments
Labels: SQL Server
Tuesday, November 27, 2012
Remote Diagnostic Agent (RDA)
1. Remote Diagnostic Agent (RDA) is a command-line diagnostic tool that is executed by an engine written in the Perl programming language. RDA provides a unified package of support diagnostics tools and preventive solutions. The data captured provides Oracle Support with a comprehensive picture of the customer's environment which aids in problem diagnosis.
2. Oracle document: Remote Diagnostic Agent (RDA) 4 - Getting Started [ID 314422.1]
3. RDA supports different platforms: Windows, UNIX, Linux
4. RDA supports lots of Oracle products: Oracle RDBMS Server (Standard and Enterprise Editions), etc
5. RDA download: a zip file for specific platform
6. Installation on Solaris: unzip
7. run RDA
--check perl version: perl -V
--rda.sh - Use this command if Perl is not available.
--rda.pl - Use this command if Perl is available.
--./rda.pl -S: set up setup.cfg
--run RDA report: ./rda.pl -v
--ask for password for system to connect to the database
Posted by
Admin
at
11/27/2012 04:10:00 PM
0
comments
Oracle changePerm.sh script in versions 9.2.0.8, Oracle 10g
The script is located in the ORACLE_HOME/install directory on Unix and Linux systems (there is no equivalent for Windows). This script ships with Oracle Database versions 9.2.0.8, Oracle 10g.
The changePerm.sh file is no more available nor necessary for Oracle database server 11.1.0.x because in 11g, permissions under the Oracle Home (including "others") are set correctly/relaxed. (oracle note 834626.1)
===================================
Before change:
$ ls -ld $ORACLE_HOME/lib
drwxr-x--- 3 oracle dba 5632 Nov 27 09:30 /fs/oracle/product/10204ee/lib
$ ls -ld $ORACLE_HOME/lib
drwxr-xr-x 3 oracle dba 5632 Nov 27 09:40 /fs/oracle/product/10204ee/lib
===================================
Reference: http://www.orafaq.com/wiki/ChangePerm_sh
Posted by
Admin
at
11/27/2012 09:46:00 AM
0
comments
Labels: ArcSDE, Oracle database administration, Solaris
Tuesday, October 30, 2012
EXCEL tips
ALT+ENTER
2. How to fill an Excel column with consecutive numbers without typing each one separately?
Put 1 in the first row, first column.
Put 2 in the 2nd row, first column.
Highlight both. Then drag your cursor down. They will auto-number themselves.
or
Click and drag the first value that enter into the first cell.
Then go to Edit / Fill / series .. and click on "step value" and enter 1.
Posted by
Admin
at
10/30/2012 11:50:00 AM
0
comments
Friday, October 26, 2012
Oracle Database Automatic Startup and Shutdown on UNIX
Posted by
Admin
at
10/26/2012 01:42:00 PM
0
comments
Labels: Oracle database administration
Oracle 10gR2 and RMAN duplicate and errors: ORA-19870, ORA-19505, ORA-27037
RMAN> CATALOG DATAFILECOPY '/disk1/old_datafiles/01_01_2003/users01.dbf'; RMAN> CATALOG ARCHIVELOG '/disk1/arch_logs/archive1_731.dbf', '/disk1/arch_logs/archive1_732.dbf'; RMAN> CATALOG BACKUPPIECE '/disk1/backups/backup_820.bkp';
CATALOG START WITH command, as shown in this example:RMAN> CATALOG START WITH '/disk1/backups/';
Posted by
Admin
at
10/26/2012 11:53:00 AM
0
comments
Labels: RMAN
Thursday, October 18, 2012
Principals - SQL Server
Principals - SQL Server
- Windows Domain Login
- Windows Local Login
- SQL Server Login
- Database User
- Database Role
- Application Role
INFORMATION_SCHEMA and sys
- ##MS_SQLResourceSigningCertificate##
- ##MS_SQLReplicationSigningCertificate##
- ##MS_SQLAuthenticatorCertificate##
- ##MS_AgentSigningCertificate##
- ##MS_PolicyEventProcessingLogin##
- ##MS_PolicySigningCertificate##
- ##MS_PolicyTsqlExecutionLogin##
Posted by
Admin
at
10/18/2012 09:35:00 AM
0
comments
Labels: SQL Server
Wednesday, October 17, 2012
BUILTIN\Administrator and SQL Server 2008
BUILTIN\Administrator
By default, the local Windows Group BUILTIN\Administrator is no longer included in the SQL Server sysadmin fixed server role on new SQL Server 2008 installations.
If your processes or code depend on Windows BUILTIN\Administrator local group access, you must explicitly grant permission to log on to SQL Server. Accounts are no longer automatically granted access to SQL Server because of their membership in the Windows Administrator group.
Refer to: http://msdn.microsoft.com/en-us/library/cc280562(v=sql.105).aspx
Posted by
Admin
at
10/17/2012 01:48:00 PM
0
comments
Labels: SQL Server
Tuesday, October 16, 2012
Permissions of SQL Server Fixed Database Roles
Fixed database roles are provided for convenience and backward compatibility.
All fixed database roles are granted with Server-level permission VIEW ANY DATABASE.
|
Fixed database role
|
Database-level permission
|
|
db_accessadmin
|
Granted: ALTER ANY USER, CREATE
SCHEMA
Granted with GRANT option:
CONNECT
|
|
db_backupoperator
|
Granted: BACKUP DATABASE,
BACKUP LOG, CHECKPOINT
|
|
db_datareader
|
Granted: SELECT
|
|
db_datawriter
|
Granted: DELETE, INSERT, UPDATE
|
|
db_ddladmin
|
Granted: ALTER ANY ASSEMBLY,
ALTER ANY ASYMMETRIC KEY, ALTER ANY CERTIFICATE, ALTER ANY CONTRACT, ALTER
ANY DATABASE DDL TRIGGER, ALTER ANY DATABASE EVENT, NOTIFICATION, ALTER ANY
DATASPACE, ALTER ANY FULLTEXT CATALOG, ALTER ANY MESSAGE TYPE, ALTER ANY
REMOTE SERVICE BINDING, ALTER ANY ROUTE, ALTER ANY SCHEMA, ALTER ANY SERVICE,
ALTER ANY SYMMETRIC KEY, CHECKPOINT, CREATE AGGREGATE, CREATE DEFAULT, CREATE
FUNCTION, CREATE PROCEDURE, CREATE QUEUE, CREATE RULE, CREATE SYNONYM, CREATE
TABLE, CREATE TYPE, CREATE VIEW, CREATE XML SCHEMA COLLECTION, REFERENCES
|
|
db_denydatareader
|
Denied: SELECT
|
|
db_denydatawriter
|
Denied: DELETE, INSERT, UPDATE
|
|
db_owner
|
Granted with GRANT option:
CONTROL
|
|
db_securityadmin
|
Granted: ALTER ANY APPLICATION
ROLE, ALTER ANY ROLE, CREATE SCHEMA, VIEW DEFINITION
|
|
dbm_monitor
|
Granted: VIEW most recent
status in Database Mirroring Monitor
The dbm_monitor fixed
database role is created in the msdb database when the first
database is registered in Database Mirroring Monitor. The new dbm_monitor role
has no members until a system administrator assigns users to the role.
|
For more info: http://msdn.microsoft.com/en-us/library/ms189612(v=sql.105).aspx
Posted by
Admin
at
10/16/2012 09:09:00 AM
0
comments
Labels: SQL Server
Thursday, October 11, 2012
Changing SQL Server Database Owner
Changing the SQL Server Database Owner
In SQL Server, the owner of the current database can be changed. Any user, a SQL Server login or Microsoft Windows user, who has access to connect to SQL Server can become the owner of a database.
Ownership of the system databases cannot be changed.
ALTER AUTHORIZATION can be used to change the ownership of any entity that has an owner. Ownership of database-contained entities can be transferred to any database-level principal. Ownership of server-level entities can be transferred only to server-level principals.
ALTER AUTHORIZATION ON DATABASE::[my_db] TO [sa];
Reference:
Changing the Database Owner: http://msdn.microsoft.com/en-us/library/ms190909(v=sql.105).aspx
ALTER AUTHORIZATION (Transact-SQL): http://msdn.microsoft.com/en-us/library/ms187359(v=sql.105).aspx
Posted by
Admin
at
10/11/2012 11:45:00 AM
0
comments
Labels: SQL Server
Wednesday, October 10, 2012
guest user should not be disabled in the msdb database in SQL Server
guest user should not be disabled in the msdb database in SQL Server
SQL Server Books Online recommends that you disable the guest user in every database as a best practice for securing the database server. This recommendation does not apply to master, msdb, and tempb system databases.
In order for some Microsoft SQL Server features to work, the guest user must be enabled in the msdb database.
More info: http://support.microsoft.com/kb/2539091
Posted by
Admin
at
10/10/2012 03:50:00 PM
0
comments
Labels: SQL Server
Wednesday, September 26, 2012
Viewing Database Metadata in SQL Server 2008 R2
| Views | Functions | Stored procedures and other statements |
|---|---|---|
sys.dm_db_file_space_usage (Transact-SQL) (tempdb only)
| ||
sys.dm_db_session_space_usage (Transact-SQL)(tempdb only)
| ||
sys.dm_db_task_space_usage (Transact-SQL) (tempdb only)
|
Posted by
Admin
at
9/26/2012 11:17:00 AM
0
comments
Labels: SQL Server
Tuesday, September 25, 2012
SQL Server Version Components and Numbering
- MM - Major version
- nn - Minor version
- bbbb - Build number
- rr - Build revision number
Posted by
Admin
at
9/25/2012 11:01:00 AM
0
comments
Labels: SQL Server