#isql
Explore tagged Tumblr posts
Text
Firebird to Oracle Migration – Ask On Data
In this article, we explore the complexities and best practices involved in Firebird to Oracle Migration. As organizations grow and their data needs evolve, transitioning to a robust and scalable database system like Oracle becomes imperative. We will guide you through the entire migration process, highlighting potential challenges and offering practical solutions to ensure a seamless transition. From initial planning and data mapping to execution and post-migration optimization, this comprehensive guide aims to equip you with the knowledge and tools needed for a successful Firebird to Oracle migration.
What is Firebird
Firebird is an advanced open-source relational database management system renowned for its efficiency and reliability. It supports a wide range of platforms, including Windows, Linux, and macOS, offering seamless cross-platform capabilities. With features like multi-generational architecture, SQL compliance, and robust security, Firebird caters to both small applications and large enterprise solutions. Its lightweight footprint and minimal maintenance requirements make it an attractive option for developers and businesses seeking a cost-effective yet powerful database solution. Dive into the capabilities of Firebird and discover why it remains a popular choice in the database community.
What is Oracle
Oracle is a leading relational database management system known for its robust performance, scalability, and comprehensive feature set. It provides unparalleled reliability and security, making it a preferred choice for enterprises handling large volumes of data and complex transactions. With support for advanced SQL features, PL/SQL programming, and extensive data analytics, Oracle enables organizations to optimize their data management and gain actionable insights. Its high availability and disaster recovery solutions ensure business continuity, while its integration capabilities allow seamless connectivity with various applications and systems. Discover how Oracle can transform your data infrastructure and drive your business forward.
Advantages of Firebird to Oracle Migration
Enhanced Security: Oracle offers advanced data encryption, access controls, and auditing capabilities.
Superior Performance Optimization: Oracle's query optimization and performance tuning tools ensure efficient data processing.
High Availability and Disaster Recovery: Oracle provides robust solutions to ensure business continuity and minimize downtime.
Scalability: Oracle supports seamless scalability to handle growing data volumes and transaction loads.
Comprehensive Analytics: Oracle's analytics and reporting tools offer deep insights for informed decision-making.
Broad Ecosystem and Support: Oracle's extensive ecosystem and support services provide access to expert resources and third-party integrations.
Method 1: Migrating Data from Firebird to Oracle Using the Manual Method
Data Export: Export data from Firebird using tools like isql or custom scripts to extract data in a suitable format.
Data Transformation: Transform the exported data to match Oracle's schema and data types, ensuring compatibility.
Schema Creation: Manually create the corresponding tables, indexes, and constraints in Oracle to mirror the Firebird schema.
Data Import: Use Oracle tools like SQL*Loader or direct SQL inserts to import the transformed data into Oracle.
Validation: Validate the migrated data by comparing record counts and sample data between Firebird and Oracle.
Testing: Perform thorough testing to ensure that the data migration is successful and that applications function correctly with the new Oracle database.
Disadvantages of Migrating Data from Firebird to Oracle Using the Manual Method
High Error Risk with lot of manual efforts
Difficult in achieving Data Transformation
Dependency on tech resources
No Automation
Limited Scalability
For every table, this work has to be done.
No automated methods of handling errors, notifications
No automated methods of roll back in case
No automated direct methods of logs and knowing amount of data transferred
No automated direct methods in case if you would like to have methods like incremental load (Change Data Capture)
Method 2: Migrating Data from Firebird to Oracle Using ETL Tools
There are various advantages which ETL
Data Extraction: ETL tools can automatically extract data from Firebird using connectors or custom queries, simplifying the extraction process.
Data Transformation: The ETL process allows for automated transformation of data, including converting data types, cleaning, and restructuring data to match Oracle's schema.
Data Loading: The ETL tools efficiently load transformed data into Oracle, ensuring compatibility with the target database's structure.
Error Handling: Most ETL tools include error handling features, which automatically detect and log issues during migration, reducing the risk of data corruption.
Automation and Scheduling: ETL tools offer the ability to automate and schedule migration tasks, saving time and reducing manual intervention during the process.
Scalability and Efficiency: ETL tools are designed to handle large volumes of data, making them more scalable and efficient than manual methods, especially for ongoing migrations or large datasets.
Challenges of Using ETL Tools for Data Migration:
Complex Setup and Configuration in case of on-premise deployment
Steep learning curve to use these tools
Dependency on using highly technical resources/ Data Engineers to do this kind of work
Cost
Scalability Issues
Limited Customization
Maintenance Overhead
Why Ask On Data is the Best Tool for Migrating Data from Firebird to Oracle
User-Friendly Interface: Ask On Data offers an intuitive interface that simplifies the migration process, making it easy for users of all skill levels.
Seamless Integration: The tool connects smoothly with both Firebird and Oracle, ensuring a hassle-free data transfer without complicated setups.
Automated Data Transformation: It automatically transforms and cleans your data, reducing the risk of errors and saving you time during migration.
Real-Time Monitoring: Ask On Data provides real-time monitoring of the migration process, allowing you to track progress and quickly address any issues.
Cost-Effective Solution: With a flexible pricing model, Ask On Data helps you manage migration costs without sacrificing quality or performance.
Usage of Ask On Data : A chat based AI powered Data Engineering Tool
Ask On Data is world’s first chat based AI powered data engineering tool. It is present as a free open source version as well as paid version. In free open source version, you can download from Github and deploy on your own servers, whereas with enterprise version, you can use Ask On Data as a managed service.
Advantages of using Ask On Data
Built using advanced AI and LLM, hence there is no learning curve.
Simply type and you can do the required transformations like cleaning, wrangling, transformations and loading
No dependence on technical resources
Super fast to implement (at the speed of typing)
No technical knowledge required to use
Below are the steps to do the data migration activity
Step 1: Connect to Firebird(which acts as source)
Step 2 : Connect to Oracle (which acts as target)
Step 3: Create a new job. Select your source (Firebird) and select which all tables you would like to migrate.
Step 4 (OPTIONAL): If you would like to do any other tasks like data type conversion, data cleaning, transformations, calculations those also you can instruct to do in natural English. NO knowledge of SQL or python or spark etc required.
Step 5: Orchenstrate/schedule this. While scheduling you can run it as one time load, or change data capture or truncate and load etc.
For more advanced users, Ask On Data is also providing options to write SQL, edit YAML, write PySpark code etc.
There are other functionalities like error logging, notifications, monitoring, logs etc which can provide more information like the amount of data transferred, logs, any error information if the job did not run and other kind of monitoring information etc.
Trying Ask On Data
You can reach out to us on mailto:[email protected] for a demo, POC, discussion and further pricing information. You can make use of our managed services or you can also download and install on your own servers our community edition from Github.
0 notes
Text
NSIC Technical Services Centre offers career-focused software, hardware, networking, and computer application courses with placement aid and payment plans.
New Post has been published on https://www.jobsarkari.in/nsic-technical-services-centre-offers-career-focused-software-hardware-networking-and-computer-application-courses-with-placement-aid-and-payment-plans/
NSIC Technical Services Centre offers career-focused software, hardware, networking, and computer application courses with placement aid and payment plans.
NSIC Technical Services Centre, a division of the National Small Industries Corporation (NSIC), is inviting applications for various job-oriented courses. The courses offered include Advanced Diploma in Software Technology, Advanced Diploma in Computer Hardware and Networking, NIELIT ‘O’ Level, Computer Hardware and Networking, Advanced Diploma in Computer Application, Computerised Accounting and Tally, Laptop Repairing, Mobile Repairing, MCP & CCNA, ICCNA, Linux Administration, Core Java, C, C++ & Oops, Office & Internet, Python Programming, SQL Server, IMS, Advance Excel / VBA, and Project Training. The duration and fees vary for each course. The center also provides placement assistance and offers an installment facility. Interested individuals can contact NSIC Technical Services Centre located near Govind Puri Metro Station in Okhla Phase-III, New Delhi. Contact details are provided on the website www.nsic.co.in.
NSIC Technical Services Centre offers Job Oriented Courses in various fields.
The courses range from Diploma to Advance Diploma and cover subjects like Software Technology, Computer Hardware & Networking, Computer Application, etc.
The duration of the courses varies from 6 months to 2 years.
Eligibility for the courses is either 10th pass or 12th pass.
Placement assistance is available and installment facility is provided.
GST is charged extra and interested individuals can request a callback by sending an SMS.
NSIC Technical Services Centre offers Job Oriented Courses
Diploma and Advance Diploma courses available
Courses include Software Technology, Computer Hardware & Networking, Computer Application, etc.
Duration of courses ranges from 6 months to 2 years
IAdv. Diploma in Software Technology
Duration: 1 Year
Fee: Rs. 48,000/-
Eligibility: 12 Pass
IAdv. Diploma in Computer H/w and Networking
Duration: 1 Year
Fee: Rs. 32,000/-
Eligibility: 12 Pass
INIELIT ‘O’ Level
Duration: 15 Months
Fee: Rs. 32,000/-
Eligibility: 12 Pass
IComputer Hardware & Networking
Duration: 1 Year
Fee: Rs. 24,000/-
Eligibility: 10 Pass
IAdvance Diploma in Computer Application
Duration: 1 Year
Fee: Rs. 25,000/-
Eligibility: 12 Pass
IDiploma in Computer Application
Duration: 6 Months
Fee: Rs. 15,000/-
Eligibility: 10 Pass
IComputerised Accounting & Tally
Duration: 120 Hrs.
Fee: Rs. 10,000/-
Eligibility: 12 Pass
ILaptop Repairing
Duration: 120 Hrs.
Fee: Rs. 8,000/-
Eligibility: 10 Pass
IMobile Repairing
Duration: 80 Hrs.
Fee: Rs. 7,000/-
Eligibility: 10 Pass
IMCP & CCNA
Duration: 120 Hrs.
Fee: Rs. 8,000/-
Eligibility: 12 Pass
ICCNA
Duration: 80 Hrs.
Fee: Rs. 6,000/-
Eligibility: 12 Pass
ILinux Administration
Duration: 80 Hrs.
Fee: Rs. 6,000/-
Eligibility: 12 Pass
ICore Java
Duration: 60 Hrs.
Fee: Rs. 6,000/-
Eligibility: 12 Pass
/C, C++ & Oops
Duration: 60 Hrs.
Fee: Rs. 5,000/-
Eligibility: 10 Pass
Office & Internet
Duration: 60 Hrs.
Fee: Rs. 4,000/-
Eligibility: 10 Pass
IPython Programming
Duration: 80 Hrs.
Fee: Rs. 6,000/-
Eligibility: 10 Pass
ISQL Server
Duration: 40 Hrs.
Fee: Rs. 5,000/-
Eligibility: 10 Pass
IMS
Duration: 40 Hrs.
Fee: Rs. 6,000/-
Eligibility: Undergoing BCA/MCA/BE/B.Tech
I Advance Excel / VBA
Duration: 1 Month
Fee: Rs. 5,000/-
Eligibility: Undergoing BCA/MCA/BE/B.Tech
Explore Job Oriented Courses at NSIC Technical Services Centre
NSIC Technical Services Centre offers a wide range of job-oriented courses in various fields
Eligibility for courses is either 10th pass or 12th pass
Placement assistance and installment facility available
Request a callback by sending SMS ‘COMP’ to 9654578062
You see the following because WP_DEBUG and WP_DEBUG_DISPLAY are enabled on this site. Please disabled these to prevent the display of these developers' debug messages.
The `the_content` filter applied.
The `the_content` filter applied.
The `the_content` filter applied.
true
Not an instance if `WP_Post`.
Not an instance if `WP_Post`.
Not an instance if `WP_Post`.
NULL
Post eligible.
Post eligible.
Post eligible.
false
0 notes
Text
ODBC Devuan and Debian complete how to and docu
This documentation has two parts, and overall ODBC documentation and a specific Devuan ODBC documentation. The firs part are provided due most administrators and developers must understand the ODBC infrastructure to property debug problems. This documentation starts on the "friendofdevuan" wiki due ODBC information was very poor inclusivelly in oficial Debian wiki, and now this content under http://dlvr.it/PK9zry
0 notes
Text
Csak neked, Sivi
Krdoslamdbdueieiekelyowbebrbw92ixz shbwdkkdddjdkxklyamenebwhyiyoalwmrbdvqsuseuwhwiq9qqoshsbshwhwoqya0whveb1o9suxgygakqlo2cuz vql2v8gqvg cwnpa hqbz2o1xuvwwo1iqlxkfhb3f82j1oalyl u3 isql hsh oehe iwj kdkekqjxhapqlfj jsbelq juc gwbci j jxnsk
Egy részét az orrommal írtam, mert kedvellek. És megérdemled te is, hogy valaki az orrával írjon neked ilyeneket. 🤪
5 notes
·
View notes
Photo

للتواصل واتس اضغط الرابط👇👇 https://wa.me/966595659259 يمكنكم الان متابعه صفحاتنا ليصلكم كل جديد👇👇 https://linktr.ee/ruwad_almkatb رواد المكاتب اثاث مكتبي الرياض 📣 اثاث مكتبي سعر مخفض 🛋🛍 جودة عالية 🥇 و افضل الاسعار 💎 هدفنا ارضاء جميع الاذواق 🤯 وسرعه ودقة التنفيذ ✌️👏💪 توصيلق وتركيب داخل الرياض 🚚 شحن لجميع مدن المملكة 🚛 👍علامة معروف الذهبية ... أنتم معنا بأمان👍 . #طاولة_اجتماعات #طاولات_اجتماعات #طاولة_اجتماع #اثاث #حراج #الرياض #سعوديه #كرسي #كرسي_دوار #تخفيضات #تجوري #كنب #ترند #السعودية #للبيع #جديد #ضيافة #ksa #saudiarabia #عروض #النصر #الهلال #تصويري #لايك #تعليم #تصاميم #الرياض #دوام #saudi #riyadh (at Riyadh, Saudi Arabia) https://www.instagram.com/p/CjdRmn-Isql/?igshid=NGJjMDIxMWI=
#طاولة_اجتماعات#طاولات_اجتماعات#طاولة_اجتماع#اثاث#حراج#الرياض#سعوديه#كرسي#كرسي_دوار#تخفيضات#تجوري#كنب#ترند#السعودية#للبيع#جديد#ضيافة#ksa#saudiarabia#عروض#النصر#الهلال#تصويري#لايك#تعليم#تصاميم#دوام#saudi#riyadh
0 notes
Text
SQL HAVING Clause
The HAVING clause enables you to specify the conditions that filter which group results are appear in the results. This clause applies to SQL because we cannot use the WHERE clause with the iSQL aggregate functions. Both the WHERE and HAVING clauses are used to filter records in SQL queries. Syntax SELECT columnname(s) FROM tablename WHERE [condition] GROUP BY columnname(s) HAVING…
View On WordPress
#clause#group by and having clause#group by and having clause in oracle#group by and having clause in sql#group by clause#group by clause in sql#group by having clause in sql server#having#having clause#having clause in mysql#having clause in oracle#having clause in sql#having clause in sql server#having clause syntax#sql having#sql having clause#sql server having clause#what is having clause in sql?#where vs having clause
0 notes
Text
300+ TOP ORACLE Database Interview Questions and Answers
ORACLE Database Interview Questions for freshers experienced :-
1. What Is Oracle? Oracle is a company. Oracle is also a database server, which manages data in a very structured way. It allows users to store and retrieve related data in a multiuser environment so that many users can concurrently access the same data. All this is accomplished while delivering high performance. A database server also prevents unauthorized access and provides efficient solutions for failure recovery. 2. What Is an Oracle Database? An Oracle database is a collection of data treated as a big unit in the database server. 3. What Is an Oracle Instance? Every running Oracle database is associated with an Oracle instance. When a database is started on a database server (regardless of the type of computer), Oracle allocates a memory area called the System Global Area (SGA) and starts one or more Oracle processes. This combination of the SGA and the Oracle processes is called an Oracle instance. The memory and processes of an instance manage the associated database's data efficiently and serve the one or multiple users of the database. 4. What Is a Parameter File in Oracle? A parameter file is a file that contains a list of initialization parameters and a value for each parameter. You specify initialization parameters in a parameter file that reflect your particular installation. Oracle supports the following two types of parameter files: * Server Parameter Files - Binary version. Persistent. * Initialization Parameter Files - Text version. Not persistent. 5. What Is a Server Parameter File in Oracle? A server parameter file is a binary file that acts as a repository for initialization parameters. The server parameter file can reside on the machine where the Oracle database server executes. Initialization parameters stored in a server parameter file are persistent, in that any changes made to the parameters while an instance is running can persist across instance shutdown and startup. 6. What Is a Initialization Parameter File in Oracle? An initialization parameter file is a text file that contains a list of initialization parameters. The file should be written in the client's default character set. Sample initialization parameter files are provided on the Oracle distribution medium for each operating system. A sample file is sufficient for initial use, but you will probably want to modify the file to tune the database for best performance. Any changes will take effect after you completely shut down and restart the instance. 7. What is System Global Area (SGA) in Oracle? The System Global Area (SGA) is a memory area that contains data shared between all database users such as buffer cache and a shared pool of SQL statements. The SGA is allocated in memory when an Oracle database instance is started, and any change in the value will take effect at the next startup. 8. What is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is allocated for each individual database session and it contains session specific information such as SQL statement data or buffers used for sorting. The value specifies the total memory allocated by all sessions, and changes will take effect as new sessions are started. 9. What Is a User Account in Oracle? A user account is identified by a user name and defines the user's attributes, including the following: Password for database authentication Privileges and roles Default tablespace for database objects Default temporary tablespace for query processing work space 10. What Is the Relation of a User Account and a Schema in Oracle? User accounts and schemas have a one-to-one relation. When you create a user, you are also implicitly creating a schema for that user. A schema is a logical container for the database objects (such as tables, views, triggers, and so on) that the user creates. The schema name is the same as the user name, and can be used to unambiguously refer to objects owned by the user.
ORACLE Database Interview Questions 11. What Is a User Role in Oracle? A user role is a group of privileges. Privileges are assigned to users through user roles. You create new roles, grant privileges to the roles, and then grant roles to users. 12. What is a Database Schema in Oracle? A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include: tables, views, and other types of data objects. 13. What Is a Database Table in Oracle? A database table is a basic unit of data logical storage in an Oracle database. Data is stored in rows and columns. You define a table with a table name, such as employees, and a set of columns. You give each column a column name, such as employee_id, last_name, and job_id; a datatype, such as VARCHAR2, DATE, or NUMBER; and a width. The width can be predetermined by the datatype, as in DATE. If columns are of the NUMBER datatype, define precision and scale instead of width. A row is a collection of column information corresponding to a single record. 14. What Is a Table Index in Oracle? Index is an optional structure associated with a table that allow SQL statements to execute more quickly against a table. Just as the index in this manual helps you locate information faster than if there were no index, an Oracle Database index provides a faster access path to table data. You can use indexes without rewriting any queries. Your results are the same, but you see them more quickly. 15. What Is an Oracle Tablespace? An Oracle tablespace is a big unit of logical storage in an Oracle database. It is managed and used by the Oracle server to store structures data objects, like tables and indexes. 16. What Is an Oracle Data File? An Oracle data file is a big unit of physical storage in the OS file system. One or many Oracle data files are organized together to provide physical storage to a single Oracle tablespace. 17. What Is a Static Data Dictionary in Oracle? Data dictionary tables are not directly accessible, but you can access information in them through data dictionary views. To list the data dictionary views available to you, query the view DICTIONARY. Many data dictionary tables have three corresponding views: * An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles. * A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only by users with the SELECT ANY TABLE privilege. This privilege is assigned to the DBA role when the system is initially installed. * A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views. 18. What Is a Dynamic Performance View in Oracle? Oracle contains a set of underlying views that are maintained by the database server and accessible to the database administrator user SYS. These views are called dynamic performance views because they are continuously updated while a database is open and in use, and their contents relate primarily to performance. Although these views appear to be regular database tables, they are not. These views provide data on internal disk structures and memory structures. You can select from these views, but you can never update or alter them. 19. What Is a Recycle Bin in Oracle? Recycle bin is a logical storage to hold the tables that have been dropped from the database, in case it was dropped in error. Tables in recycle bin can be recovered back into database by the Flashback Drop action. Oracle database recycle save the same purpose as the recycle bin on your Windows desktop. Recycle bin can be turned on or off in the recyclebin=on/off in your parameter file. 20. What Is SQL*Plus? SQL*Plus is an interactive and batch query tool that is installed with every Oracle Database Server or Client installation. It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQL*Plus web-based user interface. 21. What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundation technology, built into the Oracle Net foundation layer that works with any standard network transport protocol. 22. What Is Open Database Communication (ODBC) in Oracle? ODBC, Open Database Communication, a standard API (application program interface) developed by Microsoft for Windows applications to communicate with database management systems. Oracle offers ODBC drivers to allow Windows applications to connect Oracle server through ODBC. 23. What is Oracle Database 10g Express Edition? Based on Oracle Web site: Oracle Database 10g Express Edition (Oracle Database XE) is an entry-level, small-footprint database based on the Oracle Database 10g Release 2 code base that's free to develop, deploy, and distribute; fast to download; and simple to administer. Oracle Database XE is a great starter database for: Developers working on PHP, Java, .NET, and Open Source applications DBAs who need a free, starter database for training and deployment Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge Educational institutions and students who need a free database for their curriculum 24. What Are the Limitations Oracle Database 10g XE? Oracle Database XE is free for runtime usage with the following limitations: Supports up to 4GB of user data (in addition to Oracle system data) Single instance only of Oracle Database XE on any server May be installed on a multiple CPU server, but only executes on one processor in any server May be installed on a server with any amount of memory, but will only use up to 1GB RAM of available memory 25. What Operating Systems Are Supported by Oracle Database 10g XE? Oracle Database 10g Express Edition is available for two types of operating Systems: Linux x86 - Debian, Mandriva, Novell, Red Hat and Ubuntu Microsoft Windows 26. How To Download Oracle Database 10g XE? If you want to download a copy of Oracle Database 10g Express Edition, visit http://www.oracle.com/technology/software/products/database/xe/. If you are using Windows systems, there are downloads available for you: Oracle Database 10g Express Edition (Western European) - Single-byte LATIN1 database for Western European language storage, with the Database Homepage user interface in English only. Oracle Database 10g Express Edition (Universal) - Multi-byte Unicode database for all language deployment, with the Database Homepage user interface available in the following languages: Brazilian Portuguese, Chinese (Simplified and Traditional), English, French, German, Italian, Japanese, Korean and Spanish. Oracle Database 10g Express Client You need to download the universal edition, OracleXEUniv.exe, (216,933,372 bytes) and client package, OracleXEClient.exe (30,943,220 bytes). 27. How To Install Oracle Database 10g XE? To install 10g universal edition, double click, OracleXEUniv.exe, the install wizard starts. It will guide you to finish the installation process. You should take notes about: The SYSTEM password you selecte: atoztarget. Database server port: 1521. Database HTTP port: 8080. MS Transaction Server port: 2030. The directory where 10g XE is installed: oraclexe Hard disk space taken: 1655MB. 28. How To Check Your Oracle Database 10g XE Installation? If you want to check your fresh installation of 10g Express Edition without using any special client programs, you can use a Web browser with this address, http://localhost:8080/apex/. You will see the login page. Enter SYSTEM as the user name, and the password (atoztarget), you selected during the installation to log into the server. Visit different areas on your 10g XE server home page to make sure your server is running OK. You can also get to your 10g XE server home page by going through the start menu. Select All Programs, then Oracle Database 10g Express Edition, and then Go To Database Home Page 29. How To Shutdown Your 10g XE Server? If you want to shutdown your 10g Express Edition server, go to the Services manager in the control panel. You will a service called OracleServiceXE, which represents your 10g Express Edition server. Select OracleServiceXE, and use the right mouse click to stop this service. This will shutdown your 10g Express Edition server. You can also shutdown your 10g XE server through the start menu. Select All Programs, then Oracle Database 10g Express Edition, and then Stop Database. 30. How To Start Your 10g XE Server? Go to the Start menu, select All Programs, Oracle Database 10g Express Edition, and Start Database. 31. How Much Memory Your 10g XE Server Is Using? Your 10g XE Server is using about 180MB of memory even there is no users on the server. The server memory usage is displayed on your server home page, if you log in as SYSTEM. 32. How To Start Your 10g XE Server from Command Line? You can start your 10g XE server from command line by: Open a command line window. Change directory to oraclexeapporacleproduct10.2.0serverBIN. Run StartDB.bat. The batch file StartDB.bat contains: net start OracleXETNSListener net start OracleServiceXE @oradim -startup -sid XE -starttype inst > nul 2>&1 33. How To Shutdown Your 10g XE Server from Command Line? You can shutdown your 10g XE server from command line by: Open a command line window. Change directory to oraclexeapporacleproduct10.2.0serverBIN. Run StopDB.bat. The batch file StopDB.bat contains: net stop OracleServiceXE 34. How To Unlock the Sample User Account in Oracle? Your 10g XE server comes with a sample database user account called HR. But this account is locked. You must unlock it before you can use it: Log into the server home page as SYSTEM. Click the Administration icon, and then click Database Users. Click the HR schema icon to display the user information for HR. Enter a new password (hr) for HR, and change the status to Unlocked. Click Alter User to save the changes. Now user account HR is ready to use. 35. How To Change System Global Area (SGA) in Oracle? Your 10g XE server has a default setting for System Global Area (SGA) of 140MB. The SGA size can be changed to a new value depending on how many concurrent sessions connecting to your server. If you are running this server just for yourself to improve your DBA skill, you should change the SGA size to 32MB by: Log into the server home page as SYSTEM. Go to Administration, then Memory. Click Configure SGA. Enter the new memory size: 32 Click Apply Changes to save the changes. Re-start your server. 36. How To Change Program Global Area (PGA) in Oracle? Your 10g XE server has a default setting for Program Global Area (PGA) of 40MB. The PGA size can be changed to a new value depending on how much data a single session should be allocated. If you think your session will be short with a small amount of data, you should change the PGA size to 16MB by: Log into the server home page as SYSTEM. Go to Administration, then Memory. Click Configure PGA. Enter the new memory size: 16 Click Apply Changes to save the changes. Re-start your server. 37. What Happens If You Set the SGA Too Low in Oracle? Let's you made a mistake and changed to SGA to 16MB from the SYSTEM admin home page. When you run the batch file StartDB.bat, it will return a message saying server stated. However, if you try to connect to your server home page: http://localhost:8080/apex/, you will get no response. Why? Your server is running, but the default instance XE was not started. If you go the Control Panel and Services, you will see service OracleServiceXE is listed not in the running status. 38. What To Do If the StartBD.bat Failed to Start the XE Instance? If StartBD.bat failed to start the XE instance, you need to try to start the instance with other approaches to get detail error messages on why the instance can not be started. One good approach to start the default instance is to use SQL*Plus. Here is how to use SQL*Plus to start the default instance in a command window: >cd (OracleXE home directory) >.binstartdb >.binsqlplus Enter user-name: SYSTEM Enter password: atoztarget ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist The first "cd" is to move the current directory the 10g XE home directory. The second command ".binstartdb" is to make sure the TNS listener is running. The third command ".binsqlplus" launches SQL*Plus. The error message "ORA-27101" tells you that there is a memory problem with the default instance. So you can not use the normal login process to the server without a good instance. See other tips on how to log into a server without any instance. 39. How To Login to the Server without an Instance? If your default instance is in trouble, and you can not use the normal login process to reach the server, you can use a special login to log into the server without any instance. Here is how to use SQL*Plus to log in as as a system BDA: >cd (OracleXE home directory) >.binstartdb >.binsqlplus Enter user-name: SYSTEM/atoztarget AS SYSDBA Connected to an idle instance SQL> show instance instance "local" The trick is to put user name, password and login options in a single string as the user name. "AS SYSDBA" tells the server to not start any instance, and connect the session the idle instance. Log in as SYSDBA is very useful for performing DBA tasks. 40. How To Use "startup" Command to Start Default Instance? If you logged in to the server as a SYSDBA, you start the default instance with the "startup" command. Here is how to start the default instance in SQL*Plus in SYSDBA mode: >.binsqlplus Enter user-name: SYSTEM/atoztarget AS SYSDBA Connected to an idle instance SQL> show instance instance "local" SQL> startup ORA-00821: Specified value of sga_target 16M is too small, needs to be at least 20M Now the server is telling you more details about the memory problem on your default instance: your SGA setting of 16MB is too small. It must be increased to at least 20MB. 41. Where Are the Settings Stored for Each Instance in Oracle? Settings for each instance are stored in a file called Server Parameter File (SPFile). Oracle supports two types of parameter files, Text type, and Binary type. parameter files should be located in $ORACLE_HOMEdatabase directory. A parameter file should be named like "init$SID.ora", where $SID is the instance name. 42. What To Do If the Binary SPFile Is Wrong for the Default Instance? Let's say the SPFile for the default instance is a binary file, and some settings are wrong in the SPFile, like SGA setting is bellow 20MB, how do you change a setting in the binary file? This seems to be a hard task, because the binary SPFile is not allowed to be edited manually. It needs to be updated by the server with instance started. But you can not start the instance because the SPFile has a wrong setting. One way to solve the problem is to stop using the binary SPFile, and use a text version of the a parameter file to start the instance. Here is an example of how to use the backup copy (text version) of the parameter file for the default instance to start the instance: >.binsqlplus Enter user-name: SYSTEM/atoztarget AS SYSDBA Connected to an idle instance 43. How To Check the Server Version in Oracle? Oracle server version information is stored in a table called: PRODUCT_COMPONENT_VERSION. You can use a simple SELECT statement to view the version information like this: >.binsqlplus Enter user-name: SYSTEM/atoztarget AS SYSDBA Connected to an idle instance SQL> COL PRODUCT FORMAT A35 SQL> COL VERSION FORMAT A15 SQL> COL STATUS FORMAT A15 SQL> SELECT * FROM PRODUCT_COMPONENT_VERSION; PRODUCT VERSION STATUS ----------------------------------- ----------- ---------- NLSRTL 10.2.0.1.0 Production Oracle Database 10g Express Edition 10.2.0.1.0 Product PL/SQL 10.2.0.1.0 Production TNS for 32-bit Windows: 10.2.0.1.0 Production 44. Explain What Is SQL*Plus? SQL*Plus is an interactive and batch query tool that is installed with every Oracle Database Server or Client installation. It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQL*Plus web-based user interface. SQL*Plus has its own commands and environment, and it provides access to the Oracle Database. It enables you to enter and execute SQL, PL/SQL, SQL*Plus and operating system commands to perform the following: Format, perform calculations on, store, and print from query results Examine table and object definitions Develop and run batch scripts Perform database administration You can use SQL*Plus to generate reports interactively, to generate reports as batch processes, and to output the results to text file, to screen, or to HTML file for browsing on the Internet. You can generate reports dynamically using the HTML output facility of SQL*Plus, or using the dynamic reporting capability of iSQL*Plus to run a script from a web page. 45. How To Start the Command-Line SQL*Plus? f you Oracle server or client installed on your windows system, you can start the command-line SQL*Plus in two ways: 1. Click Start > All Programs > Oracle ... > Start SQL Command Line. The SQL*Plus command window will show up with a message like this: SQL*Plus: Release 10.2.0.1.0 - Production on Tue ... Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> 2. Click Start > Run..., enter "cmd" and click OK. A Windows command window will show up. You can then use Windows commands to start the command-line SQL*Plus as shown in the tutorial exercise below: >cd c:oraclexeapporacleproduct10.2.0server >.binsqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Tue ... Copyright (c) 1982, 2005, Oracle. All rights reserved. 46. How To Get Help at the SQL Prompt? Once SQL*Plus is started, you will get a SQL prompt like this: SQL>. This where you can enter commands for SQL*Plus to run. To get help information at the SQL prompt, you can use the HELP command as shown in the following tutorial example: SQL> HELP INDEX Enter Help for help. @ COPY PAUSE SHUTDOWN @@ DEFINE PRINT SPOOL / DEL PROMPT SQLPLUS ACCEPT DESCRIBE QUIT START APPEND DISCONNECT RECOVER STARTUP ARCHIVE LOG EDIT REMARK STORE ATTRIBUTE EXECUTE REPFOOTER TIMING BREAK EXIT REPHEADER TTITLE ... COMPUTE LIST SET XQUERY CONNECT PASSWORD SHOW SQL> HELP CONNECT CONNECT ------ 47. What Information Is Needed to Connect SQL*Plus an Oracle Server? If you want to connect your SQL*Plus session to an Oracle server, you need to know the following information about this server: The network hostname, or IP address, of the Oracle server. The network port number where the Oracle server is listening for incoming connections. The name of the target database instance managed by the Oracle server. The name of your user account predefined on in the target database instance. The password of your user account predefined on in the target database instance. 48. What Is a Connect Identifier? A "connect identifier" is an identification string of a single set of connection information to a specific target database instance on a specific Oracle server. Connect identifiers are defined and stored in a file called tnsnames.ora located in $ORACLE_HOME/network/admin/ directory. Here is one example of a "connect identifier" definition: ggl_XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = www.atoztarget.com) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) The above "connect identifier" defines "TNS_XE" with the following connection information: * The network hostname: www.atoztarget.com. * The network port number: 1521. * The name of the target database instance: XE. 49. How To Connect a SQL*Plus Session to an Oracle Server? In order to connect a SQL*Plus session to an Oracle server, you need to: 1. Obtain the connection information from the Oracle server DBA. 2. Define a new "connect identifier" called "ggl_XE" in your tnsnames.org file with the given connection information. 3. Run the CONNECT command in SQL*Plus as shown in the tutorial exercise below: >cd c:oraclexeapporacleproduct10.2.0server >.binsqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Tue ... Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> CONNECT ggl/retneclgg@ggl_XE; Connected. SQL> SELECT SYSDATE FROM DUAL; SYSDATE --------- 05-MAR-06 50. What Happens If You Use a Wrong Connect Identifier? Of course, you will get an error, if you use a wrong connect identifier. Here is an example of how SQL*Plus react to a wrong connect identifier: SQL> CONNECT ggl/retneclgg@WRONG; ERROR: ORA-12154: TNS:could not resolve the connect identifier specified Warning: You are no longer connected to ORACLE. What you need to do in this case: Check the CONNECT command to make sure that the connect identifier is entered correctly. Check the tnsnames.ora file to make sure that the connect identifier is defined correctly. Check the tnsnames.ora file to make sure that there is no multiple definitions of the same connect identifier. Check your files system to see if you have multiple copies of tnsnames.ora in different Oracle home directories, because you installed multiple versions of Oracle. If you do have multiple copies, make sure your SQL*Plus session is picking up the correct copy of tnsnames.ora. 51. What To Do If DBA Lost the SYSTEM Password? If the DBA lost the password of the SYSTEM user account, he/she can go to the Oracle server machine, and run SQL*Plus on server locally with the operating system authentication method to gain access to the database. The tutorial exercise below shows you how: (Terminal server to the Oracle server machine) (Start SQL*Plus) SQL>CONNECT / AS SYSDBA Connected. SQL> ALTER USER SYSTEM IDENTIFIED BY ssap_lgg; User altered. Notice that the (/) in the CONNECT command tells SQL*Plus to use the current user on local operating system as the connection authentication method. 52. What Types of Commands Can Be Executed in SQL*Plus? There are 4 types of commands you can run at the SQL*Plus command line prompt: 1. SQL commands - Standard SQL statements to be executed on target database on the Oracle server. For example: "SELECT * FROM ggl_faq;" is a SQL command. 2. PL/SQL commands - PL/SQL statements to be executed by the Oracle server. For example: "EXECUTE DBMS_OUTPUT.PUT_LINE('Welcome to www.atoztarget.com')" runs a PL/SQL command. SQL*Plus commands - Commands to be executed by the local SQL*Plus program itself. For example: "SET NULL 'NULL'" is a SQL*Plus command. OS commands - Commands to be executed by the local operating system. For example: "HOST dir" runs an operating system command on the local machine. 53. How To Run SQL Commands in SQL*Plus? If you want to run a SQL command in SQL*Plus, you need to enter the SQL command in one or more lines and terminated with (;). The tutorial exercise below shows a good example: SQL> SELECT 'Welcome!' FROM DUAL; 'WELCOME -------- Welcome! SQL> SELECT 'Welcome to atoztarget.com tutorials!' 2 FROM DUAL 3 ; 'WELCOMETOatoztarget.COMTUTORIALS!' ----------------------------------- Welcome to atoztarget.com tutorials! 54. How To Run PL/SQL Statements in SQL*Plus? If you want to run a single PL/SQL statement in SQL*Plus, you need to use the EXECUTE command as shown in the following tutorial example: SQL> SET SERVEROUTPUT ON SQL> EXECUTE DBMS_OUTPUT.PUT_LINE('Welcome to atoztarget!') Welcome to atoztarget! PL/SQL procedure successfully completed. 55. How To Change SQL*Plus System Settings? SQL*Plus environment is controlled a big list of SQL*Plus system settings. You can change them by using the SET command as shown in the following list: * SET AUTOCOMMIT OFF - Turns off the auto-commit feature. * SET FEEDBACK OFF - Stops displaying the "27 rows selected." message at the end of the query output. * SET HEADING OFF - Stops displaying the header line of the query output. * SET LINESIZE 256 - Sets the number of characters per line when displaying the query output. * SET NEWPAGE 2 - Sets 2 blank lines to be displayed on each page of the query output. * SET NEWPAGE NONE - Sets for no blank lines to be displayed on each page of the query output. * SET NULL 'null' - Asks SQL*Plus to display 'null' for columns that have null values in the query output. * SET PAGESIZE 60 - Sets the number of lines per page when displaying the query output. * SET TIMING ON - Asks SQL*Plus to display the command execution timing data. * SET WRAP OFF - Turns off the wrapping feature when displaying query output. 56. How To Look at the Current SQL*Plus System Settings? If you want to see the current values of SQL*Plus system settings, you can use the SHOW command as shown in the following tutorial exercise: SQL> SHOW AUTOCOMMIT autocommit OFF SQL> SHOW HEADING heading ON SQL> SHOW LINESIZE linesize 80 SQL> SHOW PAGESIZE pagesize 14 SQL> SHOW FEEDBACK FEEDBACK ON for 6 or more rows SQL> SHOW TIMING timing OFF SQL> SHOW NULL null "" SQL> SHOW ALL appinfo is OFF and set to "SQL*Plus" arraysize 15 autocommit OFF autoprint OFF autorecovery OFF autotrace OFF blockterminator "." (hex 2e) cmdsep OFF colsep " " compatibility version NATIVE concat "." (hex 2e) copycommit 0 COPYTYPECHECK is ON define "&" (hex 26) describe DEPTH 1 LINENUM OFF INDENT ON echo OFF 57. What Are SQL*Plus Environment Variables? Behaviors of SQL*Plus are also controlled a some environment variables predefined on the local operating system. Here are some commonly used SQL*Plus environment variables: * ORACLE_HOME - The home directory where your Oracle client application is installed. * PATH - A list of directories where SQL*Plus will search for executable or DLL files. PATH should include $ORACLE_HOMEbin. * SQLPLUS - The directory where localization messages are stored. SQLPLUS should be set to $ORACLE_HOMEsqlplusmesg * TNS_ADMIN - The directory where the connect identifier file, tnsnames.ora is located. TNS_ADMIN should be set to $ORACLE_HOME/network/admin. 58. How To Generate Query Output in HTML Format? If you want your query output to be generated in HTML format, you can use the "SET MARKUP HTML ON" to turn on the HTML feature. The following tutorial exercise gives you a good example: SQL> connect HR/retneclgg SQL> SET MARKUP HTML ON SQL> SELECT FIRST_NAME, LAST_NAME, HIRE_DATE 2 FROM EMPLOYEES WHERE FIRST_NAME LIKE 'Joh%'; FIRST_NAME LAST_NAME HIRE_DATE John Seo 12-FEB-98 John Russell 01-OCT-96 59. What Is Output Spooling in SQL*Plus? The output spooling a nice feature of the command-line SQL*Plus tool. If the spooling feature is turned on, SQL*Plus will send a carbon copy of the everything on your screen to a specified local file. Output spooling is used mostly for quick dump of data to local files. Here are the commands to turn on and off output spooling in SQL*Plus: * SPOOL fileName - Turning on output spooling with the specified file. * SPOOL OFF - Turning off output spooling and close the spool file. 60. How To Save Query Output to a Local File? Normally, when you run a SELECT statement in SQL*Plus, the output will be displayed on your screen. If you want the output to be saved to local file, you can use the "SPOOL fileName" command to specify a local file and start the spooling feature. When you are done with your SELECT statement, you need to close the spool file with the "SPOOL OFF" command. The following tutorial exercise gives you a good example: SQL> connect HR/retneclgg SQL> SET HEADING OFF SQL> SET FEEDBACK OFF SQL> SET LINESIZE 1000 SQL> SPOOL tempemployees.lst SQL> SELECT * FROM EMPLOYEES; ...... SQL> SPOOL OFF You should get all records in employees.lst with fixed length fields. 61. What Is Input Buffer in SQL*Plus? Input buffer is a nice feature of the command-line SQL*Plus tool. It allows you to revise a multiple-line command and re-run it with a couple of simple commands. By default, input buffer is always turned on in SQL*Plus. The last SQL statement is always stored in the buffer. All you need is to remember to following commonly used commands: * LIST - Displays the SQL statement (the last executed SQL statement) in the buffer. * RUN - Runs the SQL statement in the buffer again. ";" is a quick command equivalent to RUN. * CLEAR BUFFER - Removes the SQL statement in the buffer. * INPUT line - Adds a new line into the buffer. * APPEND text - Appends more text to the last line in the buffer. * DEL - Deletes one line from the buffer. * CHANGE /old/new - Replaces 'old' text with 'new' text in the buffer. 62. How To Revise and Re-Run the Last SQL Command? If executed a long SQL statement, found a mistake in the statement, and you don't want enter that long statement again, you can use the input buffer commands to the correct last statement and re-run it. The following tutorial exercise gives you a good example: SQL> connect HR/retneclgg SQL> SELECT FIRST_NAME, LAST_NAME, HIRE_DATE 2 FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%'; FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%' * ERROR at line 2: ORA-00942: table or view does not exist SQL> LIST 1 SELECT FIRST_NAME, LAST_NAME, HIRE_DATE 2* FROM EMPLOYEES WHERE FIRST_NAME LIKE 'Joh%' SQL> CHANGE /EMPLOYEE/EMPLOYEES/ 2* FROM EMPLOYEES WHERE FIRST_NAME LIKE 'Joh%' SQL> RUN (Query output) SQL> INPUT ORDER BY FIRE_DATE SQL> LIST 1 SELECT FIRST_NAME, LAST_NAME, HIRE_DATE 2 FROM EMPLOYEE WHERE FIRST_NAME LIKE 'Joh%' 3* ORDER BY HIRE_DATE SQL> RUN (Query output) SQL> CLEAR BUFFER buffer cleared SQL> LIST SP2-0223: No lines in SQL buffer. 63. How Run SQL*Plus Commands That Are Stored in a Local File? If you have a group of commands that you need to run them repeatedly every day, you can save those commands in a file (called SQL script file), and using the "@fileName" command to run them in SQL*Plus. If you want to try this, create a file called tempinput.sql with: SELECT 'Welcome to' FROM DUAL; SELECT 'atoztarget.com!' FROM DUAL; Then run the "@" command in SQL*Plus as: SQL> connect HR/retneclgg SQL> @tempinput.sql 'WELCOMETO ---------- Welcome to 'atoztarget.COM -------------- atoztarget.com! 64. How To Use SQL*Plus Built-in Timers? If you don't have a stopwatch/timer and want to measure elapsed periods of time, you can SQL*Plus Built-in Timers with the following commands: * TIMING - Displays number of timers. * TIMING START - Starts a new timer with or without a name. * TIMING SHOW - Shows the current time of the named or not-named timer. * TIMING STOP - Stops the named or not-named timer. The following tutorial exercise shows you a good example of using SQL*Plus built-in timers: SQL> TIMING START timer_1 (some seconds later) SQL> TIMING START timer_2 (some seconds later) SQL> TIMING START timer_3 (some seconds later) SQL> TIMING SHOW timer_1 timing for: timer_2 Elapsed: 00:00:19.43 (some seconds later) SQL> TIMING STOP timer_2 timing for: timer_2 Elapsed: 00:00:36.32 SQL> TIMING 2 timing elements in use 65. What Is Oracle Server Autotrace in Oracle? Autotrace is Oracle server feature that generates two statement execution reports very useful for performance tuning: * Statement execution path - Shows you the execution loop logic of a DML statement. * Statement execution statistics - Shows you various execution statistics of a DML statement. To turn on the autotrace feature, the Oracle server DBA need to: * Create a special table called PLAN_TABLE. * Create a special security role called PLUSTRACE. * Grant PLUSTRACE role your user account. 66. How To Set Up Autotrace for a User Account? If an Oracle user wants to use the autotrace feature, you can use the tutorial as an example to create the required table PLAN_TABLE, the required security role PLUSTRACE, and grant the role to that user: SQL> CONNECT HR/retneclgg SQL> @oraclexeapporacleproduct10.2.0server RDBMSADMINUTLXPLAN.SQL Table (HR.PLAN_TABLE) created. SQL> CONNECT / AS SYSDBA SQL> @C:oraclexeapporacleproduct10.2.0server SQLPLUSADMINPLUSTRCE.SQL SQL> drop role plustrace; Role (PLUSTRACE) dropped. SQL> create role plustrace; Role (PLUSTRACE) created. SQL> grant plustrace to dba with admin option; Grant succeeded. SQL> GRANT PLUSTRACE TO HR; Grant succeeded. Remember that PLAN_TABLE table must be created under the user schema HR. 67. How To Get Execution Path Reports on Query Statements? If your user account has autotrace configured by the DBA, you can use the "SET AUTOTRACE ON EXPLAIN" command to turn on execution path reports on query statements. The tutorial exercise bellow shows you a good example: SQL> CONNECT HR/retneclgg SQL> SET AUTOTRACE ON EXPLAIN SQL> SELECT E.LAST_NAME, E.SALARY, J.JOB_TITLE 2 FROM EMPLOYEES E, JOBS J 3 WHERE E.JOB_ID=J.JOB_ID AND E.SALARY>12000; LAST_NAME SALARY JOB_TITLE ----------------- ---------- ----------------------------- King 24000 President Kochhar 17000 Administration Vice President De Haan 17000 Administration Vice President Russell 14000 Sales Manager Partners 13500 Sales Manager Hartstein 13000 Marketing Manager 6 rows selected. 68. How To Get Execution Statistics Reports on Query Statements? If your user account has autotrace configured by the DBA, you can use the "SET AUTOTRACE ON STATISTICS" command to turn on execution statistics reports on query statements. The tutorial exercise bellow shows you a good example: SQL> CONNECT HR/retneclgg SQL> SET AUTOTRACE ON STATISTICS SQL> SELECT E.LAST_NAME, E.SALARY, J.JOB_TITLE 2 FROM EMPLOYEES E, JOBS J 3 WHERE E.JOB_ID=J.JOB_ID AND E.SALARY>12000; LAST_NAME SALARY JOB_TITLE ----------------- ---------- ----------------------------- King 24000 President Kochhar 17000 Administration Vice President De Haan 17000 Administration Vice President Russell 14000 Sales Manager Partners 13500 Sales Manager Hartstein 13000 Marketing Manager 6 rows selected. 69. What Is SQL in Oracle? SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Relational Database Management Systems). SQL was developed by IBM Corporation. 70. How Many Categories of Data Types in Oracle? Oracles supports the following categories of data types: * Oracle Built-in Datatypes. * ANSI, DB2, and SQL/DS Datatypes. * User-Defined Types. * Oracle-Supplied Types. 71. What Are the Oracle Built-in Data Types? There are 20 Oracle built-in data types, divided into 6 groups: * Character Datatypes - CHAR, NCHAR, NVARCHAR2, VARCHAR2 * Number Datatypes - NUMBER, BINARY_FLOAT, BINARY_DOUBLE * Long and Row Datatypes - LONG, LONG RAW, RAW * Datetime Datatypes - DATE, TIMESTAMP, INTERVAL YEAR TO MONTH, INTERVAL DAY TO SECOND * Large Object Datatypes - BLOB, CLOB, NCLOB, BFILE * Row ID Datatypes - ROWID, UROWID 72. What Are the Differences between CHAR and NCHAR in Oracle? Both CHAR and NCHAR are fixed length character data types. But they have the following differences: * CHAR's size is specified in bytes by default. * NCHAR's size is specified in characters by default. A character could be 1 byte to 4 bytes long depending on the character set used. * NCHAR stores characters in Unicode. 73. What Are the Differences between CHAR and VARCHAR2 in Oracle? The main differences between CHAR and VARCHAR2 are: * CHAR stores values in fixed lengths. Values are padded with space characters to match the specified length. * VARCHAR2 stores values in variable lengths. Values are not padded with any characters. 74. What Are the Differences between NUMBER and BINARY_FLOAT in Oracle? The main differences between NUMBER and BINARY_FLOAT in Oracle are: * NUMBER stores values as fixed-point numbers using 1 to 22 bytes. * BINARY_FLOAT stores values as single precision floating-point numbers. 75. What Are the Differences between DATE and TIMESTAMP in Oracle? The main differences between DATE and TIMESTAMP in Oracle are: * DATE stores values as century, year, month, date, hour, minute, and second. * TIMESTAMP stores values as year, month, day, hour, minute, second, and fractional seconds. 76. What Are the Differences between INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND? The main differences between INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND are: * INTERVAL YEAR TO MONTH stores values as time intervals at the month level. * INTERVAL DAY TO SECOND stores values as time intervals at the fractional seconds level. 77. What Are the Differences between BLOB and CLOB in Oracle? The main differences between BLOB and CLOB in Oracle are: * BLOB stores values as LOB (Large OBject) in bitstreams. * CLOB stores values as LOB (Large OBject) in character steams. 78. What Are the ANSI Data Types Supported in Oracle? The following ANSI data types are supported in Oracle: * CHARACTER(n) / CHAR(n) * CHARACTER VARYING(n) / CHAR VARYING(n) * NATIONAL CHARACTER(n) / NATIONAL CHAR(n) / NCHAR(n) * NATIONAL CHARACTER VARYING(n) / NATIONAL CHAR VARYING(n) / NCHAR VARYING(n) * NUMERIC(p,s) * DECIMAL(p,s) * INTEGER / INT * SMALLINT * FLOAT * DOUBLE PRECISION * REAL 79. How To Write Text Literals in Oracle? There are several ways to write text literals as shown in the following samples: SELECT 'atoztarget.com' FROM DUAL -- The most common format atoztarget.com SELECT 'It''s Sunday!' FROM DUAL -- Single quote escaped It's Sunday! SELECT N'Allo, C''est moi.' FROM DUAL -- National chars Allo, C'est moi. SELECT Q'/It's Sunday!/' FROM DUAL -- Your own delimiter It's Sunday! 80. How To Write Numeric Literals in Oracle? Numeric literals can coded as shown in the following samples: SELECT 255 FROM DUAL -- An integer 255 SELECT -6.34 FROM DUAL -- A regular number -6.34 SELECT 2.14F FROM DUAL -- A single-precision floating point 2.14 SELECT -0.5D FROM DUAL -- A double-precision floating point -0.5 81. How To Write Date and Time Literals in Oracle? Date and time literals can coded as shown in the following samples: SELECT DATE '2002-10-03' FROM DUAL -- ANSI date format 03-OCT-07 SELECT TIMESTAMP '0227-01-31 09:26:50.124' FROM DUAL 31-JAN-07 09.26.50.124000000 AM -- This is ANSI format 82. How To Write Date and Time Interval Literals in Oracle? Date and time interval literals can coded as shown in the following samples: SELECT DATE '2002-10-03' + INTERVAL '123-2' YEAR(3) TO MONTH FROM DUAL -- 123 years and 2 months is added to 2002-10-03 03-DEC-25 SELECT DATE '2002-10-03' + INTERVAL '123' YEAR(3) FROM DUAL -- 123 years is added to 2002-10-03 03-OCT-25 SELECT DATE '2002-10-03' + INTERVAL '299' MONTH(3) FROM DUAL -- 299 months years is added to 2002-10-03 03-SEP-27 SELECT TIMESTAMP '1997-01-31 09:26:50.124' + INTERVAL '4 5:12:10.222' DAY TO SECOND(3) FROM DUAL 04-FEB-97 02.39.00.346000000 PM SELECT TIMESTAMP '1997-01-31 09:26:50.124' + INTERVAL '4 5:12' DAY TO MINUTE FROM DUAL 04-FEB-97 02.38.50.124000000 PM SELECT TIMESTAMP '1997-01-31 09:26:50.124' + INTERVAL '400 5' DAY(3) TO HOUR FROM DUAL 07-MAR-98 02.26.50.124000000 PM SELECT TIMESTAMP '1997-01-31 09:26:50.124' + INTERVAL '400' DAY(3) FROM DUAL 07-MAR-98 09.26.50.124000000 AM SELECT TIMESTAMP '1997-01-31 09:26:50.124' + INTERVAL '11:12:10.2222222' HOUR TO SECOND(7) FROM DUAL 31-JAN-97 08.39.00.346222200 PM 83. How To Convert Numbers to Characters in Oracle? You can convert numeric values to characters by using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(4123.4570) FROM DUAL 123.457 SELECT TO_CHAR(4123.457, '$9,999,999.99') FROM DUAL $4,123.46 SELECT TO_CHAR(-4123.457, '9999999.99EEEE') FROM DUAL -4.12E+03 84. How To Convert Characters to Numbers in Oracle? You can convert characters to numbers by using the TO_NUMBER() function as shown in the following examples: SELECT TO_NUMBER('4123.4570') FROM DUAL 4123.457 SELECT TO_NUMBER(' $4,123.46','$9,999,999.99') FROM DUAL 4123.46 SELECT TO_NUMBER(' -4.12E+03') FROM DUAL -4120 85. How To Convert Dates to Characters in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') FROM DUAL; -- SYSDATE returns the current date 07-MAY-2006 SELECT TO_CHAR(SYSDATE, 'YYYY/MM/DD') FROM DUAL; 2006/05/07 SELECT TO_CHAR(SYSDATE, 'MONTH DD, YYYY') FROM DUAL; MAY 07, 2006 SELECT TO_CHAR(SYSDATE, 'fmMONTH DD, YYYY') FROM DUAL; May 7, 2006 SELECT TO_CHAR(SYSDATE, 'fmDAY, MONTH DD, YYYY') FROM DUAL; SUNDAY, MAY 7, 2006 86. How To Convert Characters to Dates in Oracle? You can convert dates to characters using the TO_DATE() function as shown in the following examples: SELECT TO_DATE('07-MAY-2006', 'DD-MON-YYYY') FROM DUAL; 07-MAY-06 SELECT TO_DATE('2006/05/07 ', 'YYYY/MM/DD') FROM DUAL; 07-MAY-06 SELECT TO_DATE('MAY 07, 2006', 'MONTH DD, YYYY') FROM DUAL; 07-MAY-06 SELECT TO_DATE('May 7, 2006', 'fmMONTH DD, YYYY') FROM DUAL; 07-MAY-06 SELECT TO_DATE('SUNDAY, MAY 7, 2006', 'fmDAY, MONTH DD, YYYY') FROM DUAL; 07-MAY-06 87. How To Convert Times to Characters in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(SYSDATE, 'HH:MI:SS') FROM DUAL; 04:49:49 SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS.FF') FROM DUAL; -- Error: SYSDATE has no fractional seconds SELECT TO_CHAR(SYSTIMESTAMP, 'HH24:MI:SS.FF9') FROM DUAL; 16:52:57.847000000 SELECT TO_CHAR(SYSDATE, 'SSSSS') FROM DUAL; -- Seconds past midnight 69520 88. How To Convert Characters to Times in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(TO_DATE('04:49:49', 'HH:MI:SS'), 'DD-MON-YYYY HH24:MI:SS') FROM DUAL; -- Default date is the first day of the current month 01-MAY-2006 04:49:49 SELECT TO_CHAR(TO_TIMESTAMP('16:52:57.847000000', 'HH24:MI:SS.FF9'), 'DD-MON-YYYY HH24:MI:SS.FF9') FROM DUAL; 01-MAY-2006 16:52:57.847000000 SELECT TO_CHAR(TO_DATE('69520', 'SSSSS'), 'DD-MON-YYYY HH24:MI:SS') FROM DUAL; 01-MAY-2006 19:18:40 89. What Is NULL value in Oracle? NULL is a special value representing "no value" in all data types. NULL can be used on in operations like other values. But most operations has special rules when NULL is involved. The tutorial exercise below shows you some examples: SET NULL 'NULL'; -- Make sure NULL is displayed SELECT NULL FROM DUAL; N - N U L L SELECT NULL + NULL FROM DUAL; NULL+NULL ---------- NULL SELECT NULL + 7 FROM DUAL; NULL+7 ---------- NULL SELECT NULL * 7 FROM DUAL; NULL*7 ---------- NULL SELECT NULL || 'A' FROM DUAL; N - A SELECT NULL + SYSDATE FROM DUAL; NULL+SYSD --------- NULL 90. How To Use NULL as Conditions in Oracle? If you want to compare values against NULL as conditions, you should use the "IS NULL" or "IS NOT NULL" operator. Do not use "=" or "" against NULL. The sample script below shows you some good examples: SELECT 'A' IS NULL FROM DUAL; -- Error: Boolean is not data type. -- Boolean can only be used as conditions SELECT CASE WHEN 'A' IS NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; FALSE SELECT CASE WHEN '' IS NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN 0 IS NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; FALSE SELECT CASE WHEN NULL IS NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN 'A' = NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; -- Do not use "=" FALSE SELECT CASE WHEN 'A' NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; -- Do not use "" FALSE SELECT CASE WHEN NULL = NULL THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; -- Do not use "=" FALSE 91. How To Concatenate Two Text Values in Oracle? There are two ways to concatenate two text values together: * CONCAT() function. * '||' operation. Here is some examples on how to use them: SELECT 'ggl' || 'Center' || '.com' FROM DUAL; atoztarget.com SELECT CONCAT('atoztarget','.com') FROM DUAL; atoztarget.com 92. How To Increment Dates by 1 in Oracle? If you have a date, and you want to increment it by 1. You can do this by adding the date with a date interval. You can also do this by adding the number 1 directly on the date. The tutorial example below shows you how to adding numbers to dates, and take date differences: SELECT TO_DATE('30-APR-06') + 1 FROM DUAL; -- Adding 1 day to a date 01-MAY-06 SELECT TO_DATE('01-MAY-06') - TO_DATE('30-APR-06') FROM DUAL; -- Taking date differences 1 SELECT SYSTIMESTAMP + 1 FROM DUAL; -- The number you add is always in days. 08-MAY-06 SELECT TO_CHAR(SYSTIMESTAMP+1,'DD-MON-YYYY HH24:MI:SS.FF3') FROM DUAL; -- Error: Adding 1 to a timestamp makes it a date. 93. How To Calculate Date and Time Differences in Oracle? If you want to know how many years, months, days and seconds are there between two dates or times, you can use the date and time interval expressions: YEAR ... TO MONTH and DAY ... TO SECOND. The tutorial exercise below gives you some good examples: SELECT (TO_DATE('01-MAY-2006 16:52:57','DD-MON-YYYY HH24:MI:SS') - TO_DATE('31-JAN-1897 09:26:50','DD-MON-YYYY HH24:MI:SS')) YEAR(4) TO MONTH FROM DUAL; -- 109 years and 3 months 109-3 SELECT (TO_DATE('01-MAY-2006 16:52:57','DD-MON-YYYY HH24:MI:SS') - TO_DATE('31-JAN-1897 09:26:50','DD-MON-YYYY HH24:MI:SS')) DAY(9) TO SECOND FROM DUAL; -- 39901 days and some seconds 39901 7:26:7.0 SELECT (TO_TIMESTAMP('01-MAY-2006 16:52:57.847', 'DD-MON-YYYY HH24:MI:SS.FF3') - TO_TIMESTAMP('31-JAN-1897 09:26:50.124', 'DD-MON-YYYY HH24:MI:SS.FF3')) YEAR(4) TO MONTH FROM DUAL; -- 109 years and 3 months 109-3 SELECT (TO_TIMESTAMP('01-MAY-2006 16:52:57.847', 'DD-MON-YYYY HH24:MI:SS.FF3') - TO_TIMESTAMP('31-JAN-1897 09:26:50.124','DD-MON-YYYY HH24:MI:SS.FF3')) DAY(9) TO SECOND FROM DUAL; -- 39 94. How To Use IN Conditions in Oracle? An IN condition is single value again a list of values. It returns TRUE, if the specified value is in the list. Otherwise, it returns FALSE. Some examples are given in the script below: SELECT CASE WHEN 3 IN (1,2,3,5) THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN 3 NOT IN (1,2,3,5) THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; FALSE SELECT CASE WHEN 'Y' IN ('F','Y','I') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE 95. How To Use LIKE Conditions in Oracle? LIKE condition is also called pattern patch. There 3 main rules on using LIKE condition: * '_' is used in the pattern to match any one character. * '%' is used in the pattern to match any zero or more characters. * ESCAPE clause is used to provide the escape character in the pattern. The following script provides you some good pattern matching examples: SELECT CASE WHEN 'atoztarget.com' LIKE '%Center%' THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN 'atoztarget.com' LIKE '%CENTER%' THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; -- Case sensitive by default FALSE SELECT CASE WHEN 'atoztarget.com' LIKE '%Center_com' THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN '100% correct' LIKE '100% %' ESCAPE '' THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE 96. How To Use Regular Expression in Pattern Match Conditions in Oracle? If you have a pattern that is too complex for LIKE to handle, you can use the regular expression pattern patch function: REGEXP_LIKE(). The following script provides you some good examples: SELECT CASE WHEN REGEXP_LIKE ('atoztarget.com', '.*ggl.*','i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN REGEXP_LIKE ('atoztarget.com', '.*com$','i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE SELECT CASE WHEN REGEXP_LIKE ('atoztarget.com', '^F.*','i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL; TRUE 97. What Are DDL Statements in Oracle? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are 3 primary DDL statements: CREATE - Creating a new database object. ALTER - Altering the definition of an existing data object. DROP - Dropping an existing data object. 98. How To Create a New Table in Oracle? If you want to create a new table in your own schema, you can log into the server with your account, and use the CREATE TABLE statement. The following script shows you how to create a table: >.binsqlplus /nolog SQL> connect HR/atoztarget Connected. SQL> CREATE TABLE tip (id NUMBER(5) PRIMARY KEY, subject VARCHAR(80) NOT NULL, description VARCHAR(256) NOT NULL, create_date DATE DEFAULT (sysdate)); Table created. This scripts creates a testing table called "tip" with 4 columns in the schema associated with the log in account "HR". 99. How To Create a New Table by Selecting Rows from Another Table? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the CREATE TABLE...AS SELECT statement to do this. Here is an example script: >.binsqlplus /nolog SQL> connect HR/atoztarget Connected. SQL> CREATE TABLE emp_dept_10 2 AS SELECT * FROM employees WHERE department_id=10; Table created. SQL> SELECT first_name, last_name, salary 2 FROM emp_dept_10; FIRST_NAME LAST_NAME SALARY -------------------- ------------------------- ---------- Jennifer Whalen 4400 As you can see, this SQL scripts created a table called "emp_dept_10" using the same column definitions as the "employees" table and copied data rows of one department. This is really a quick and easy way to create a table. 100. How To Add a New Column to an Existing Table in Oracle? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the ALTER TABLE ... ADD statement to do this. Here is an example script: SQL> connect HR/atoztarget Connected. SQL> CREATE TABLE emp_dept_110 2 AS SELECT * FROM employees WHERE department_id=110; Table created. SQL> ALTER TABLE emp_dept_110 ADD (vacation NUMBER); Table altered. SQL> SELECT first_name, last_name, vacation 2 FROM emp_dept_110; FIRST_NAME LAST_NAME VACATION -------------------- ------------------------- ---------- Shelley Higgins William Gietz This SQL script added a new column called "vacation" to the "emp_dept_110" table. NULL values were added to this column on all existing data rows. ORACLE Database Questions and Answers Pdf Download Read the full article
0 notes
Text
IBMi vs. Mainframe
D- project delivery timelines
- cost-effectiveness
- user-friendliness, instinctive, ibm’s humane design,
- CL commands designed/created --- not using unix programmers
- uptime / downtime
- stability
- manageability
- scalability
- work pacing
- object-oriented
Generally, projects done on IBMi platform are delivered in shorter timelines compared to mainframes’. You might be asking yourselves, why so? Simply because IBMi design to enable staff to wear many hats cuts the number of personnel significantly is one. Built-in software that goes with the package includes the operating system, database management system (DB2), iSQL, Query tools (Query, Query Manager) and ADTS (Application Development ToolSet). The ADTS is composed of PDM (Program Development Manager), SEU (Source-Entry Utility), DFU (Data File Utility), SDA (Screen Design Aid), RLU (Report Layout Utility), ISDB (Interactive Source Debugger) and FCMU (File Compare and Merge Utility).
Let me expound on the robust integrated software that comes along with the system. PDM is the environment where the programmer can navigate to access other tools. We use SEU to edit source codes. SDA is the tool to create and modify screens with WYSWYG (What You See is What You Get) features. Similarly, RLU brings the same flavor to reports, enabling the user see how it would look like. These built-in instinctive tools that make extensive use of fill-in-the-blank prompts give the user an excellent level of user-friendliness not found in mainframe systems.
IBMi family of computers are engineered to cater from small, medium-sized and large companies. Mainframe-class systems are used in industries such as banking, airlines, manufacturing, healthcare and retail.
In all, these powerful functionalities and features of IBMi reduce the overall cost of projects.
0 notes
Text
SAP AS ABAP Developer Edition: Steps to fix DBACOCKPIT and extending your DB space
First of all, having SAP provide these Developer Edition ABAP servers for FREE is an absolute blessing! I’m sure the entire community is absolutely grateful and appreciate it – I know I am! Here’s the link to download the ABAP servers and there are also links to guides on how to install found on the same page, if you don’t already know – https://tools.hana.ondemand.com/#abap Anyway, I did notice a couple of issues when I first installed these instances with DBACOCKPIT and would like to share some of the fixes that I’ve done to my local instance. I’ve had these fixes ‘documented’ for a while but didn’t have the time to publish them. But, here they are and I hope these will be useful to others too. The steps below should be applicable to both the 750 SP02 and 751 SP02 versions. DISCLAIMER: I am not a SAP Basis resource nor a SAP DBA, these steps below somehow worked for me and I certainly cannot guarantee that they will work for you too. Proceed at your own risk (especially the part about extending the DB)! I can not be held responsible if any of these steps below made your system unusable. If you agree, you may proceed. Error when executing transaction DBACOCKPIT ISSUE: If you run transaction DBACOCKPIT after installing the server, you might notice the error messages below. I believe that’s because the password for the user ‘sapsa’ was changed to the master password that we entered during installation and needs to be updated in the system. SOLUTION: Step 1: Switch to the SAPGUI version of the DBACOCKPIT Step 2: Navigate to System Landscape -> Database Connections -> Then drop-down on the folder SAP ASE and select the node +++SYBADM. If you click on the “Test” button before changing your username and password, you might see this error message below. So, go ahead and click on the button ‘Change User Credentials’ and enter the following: Username: sapsa Password: ” The password you entered when prompted when installing the ABAP server Step 3: Validate that the username + password now works by clicking on the ‘Test’ button That’s it! Now, if you restart the DBACOCKPIT transaction again, you no longer get the error messages that you saw earlier. Errors in DBACOCKPIT periodic jobs Now, if you’ve fixed the issue above, you should now be able to go into DBACOCKPIT and explore around. Then, I noticed another issue… ISSUE: Data Collector and other periodic jobs are getting some sort of authentication errors as well. Go to the tab ‘Database NPL’, then click on the dropdown ‘Configuration’ -> DBA Cockpit Framework -> Data Collectors and Admin Procedures Look at the ‘Errors’ column and select on one of the rows with Errors on it. And I saw the error entries below… SOLUTION: After some Googling around, looks like we just need to drop and recreate the extern login for SYB_JSTASK. For this, go to the virtual machine and run XTERM and execute the following commands. * Switch over to user SYBNPL and enter your master password when prompted – su sybnpl * Then, login to the DB with isql – isql -SNPL -Usapsa -X * Enter password when prompted – Then, let’s validate to make sure that there is indeed a login for SYB_JSTASK set up in the system. To do this, execute the following commands * > use master * > go * > sp_helpexternlogin * > go You should see a return of at least 1 row with the Server SYB_JSTASK and Login/Externlogin with sapsa. Now, let’s fix the issue by dropping the Externlogin and re-creating it again. We execute sp_dropexternlogin to drop it. * > exec sp_dropexternlogin SYB_JSTASK, sapsa * > go You should then see a message that says ‘Remote login/alias dropped.’ Finally, we execute sp_addexternlogin to recreate it again * > exec sp_addexternlogin SYB_JSTASK, sapsa, sapsa, ‘’ * > go And that’s it. If you have followed the steps above, you should get a similar screen as below. And now, if you go back into DBACOCKPIT and monitor the logs of the periodic jobs again, you should now see success entries instead of the error logs. Refer to the green arrows below. Success! OPTIONAL: Add more space to database NPL by extending it While browsing around DBACOCKPIT, I also noticed that the free space for database NPL is pretty limited. There’s about 3GB of free space left for the delivered AS ABAP 751 SP02 instance. You can find the screen-shot above in DBACOCKPIT if you click to ‘Database NPL’ tab, then Performance -> Dashboard and look under Space Usage. This step is completely optional. 3GB should really be sufficient for a lot of the POCs or test development that I want to perform but I wanted to see if I could extend / add more space to this database. If you do too, you can follow the steps below, but please make sure that your virtual machine has enough free space to be allocated to the database. I am going to extend the database by another 10GB of space. You need to be in the virtual machine and also be running XTERM to execute the steps below: * Switch over to user SYBNPL and enter your master password when prompted – su sybnpl * Then, login to the DB with isql – isql -SNPL -Usapsa -X * Enter password when prompted – * > use master * > go * > disk init name = ‘NPL_data_002’, physname = ‘/sybase/NPL/sapdata_1/NPL_data_002.dat’, skip_alloc = true, size = ‘10240M’ * > go * > alter database NPL on NPL_data_002 =’10240M’ * > go Done! Now, let’s head back into DBACOCKPIT and see what we’ve done there. Ahhh.. now that’s better! That’s all folks! Good luck! http://bit.ly/2ySdcQQ #SAP #SAPCloud #AI
0 notes
Text
New Post has been published on João Clérigo - Photography
New Post has been published on http://fotografia.clerigo.pt/how-to-install-freetds-unixodbc-on-centos-7-with-php-5-6-to-access-sql-server-databases/
How to Install FreeTDS + UnixODBC on CentOS 7 with PHP 5.6 to access SQL Server Databases
Predetermined requisites: That you have at least Apache and PHP installed. First, update your machine OS, like this:
yum -y update
Next, check if you have the right repo for PHP enabled in /etc/yum.repos.d/remi.repo It should look like this:
[remi-php56] name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror # NOTICE: common dependencies are in "remi-safe" enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Next install these required packages:
yum -y install php-odbc php-pdo unixODBC unixODBC-devel
FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by SQL Server, and allows unix / linux hosts to connect to these databases.
CentOS does not have a package ready for the installation of FreeTDS, but in the EPEL repository (Extra Packages for Enterprise Linux) there is a ready-to-use package. Configure CentOS to use the EPEL repository and install FreeTDS.
yum install epel-release yum check-update yum install freetds freetds-devel
The next steps are very important. We need to configure FreeTDS. The FreeTDS configuration file is located at /etc/freetds.conf. Edit this file, and add following, changing the parameter for your needs:
[nome_banco_sqlserver] host = server_IP port = server_port tds version = 7.4
One very important parameter is the “tds version” you have to match it to you SQL Server version, or you won’t be able to connect. You can check in this table the right one for you.
If everything went OK, you are now able to test your connection. But before anything else, lets try and communicate only with telnet:
telnet server_IP server_PORT
If you have an error like:
telnet: connect to address server_IP: Connection timed out
Something is wrong, the server IP is incorrect or the port. You must check this out until you have a connection like:
Trying server_IP… Connected to server_IP. Escape character is '^]'.
You can exit now by typing “quit”.
Now you can test if the connection to SQL Server, via FreeTDS, is working properly. For this you can use the FreeTDS tsql utility, like this:
tsql -H server_IP -L -p server_PORT -U sql_USERNAME -P sql_PASSWORD
You should get a result, with a list of the SQL Instances. If the connection was not successful, you will have to look for a solution before continuing to the next step. If you were not able to complete the last step, it’s no use to go ahead: try to see the documentation of FreeTDS, because you need it to connect to the database correctly because UnixODBC will have to use it.
Then, if you are here, happy days, you’re almost done. So far you have already have FreeTDS installed, configured and accessing the SQL Server.
Now it’s time to set up UnixODBC.
You have to edit the /etc/odbcinst.ini file and add the following content to the bottom of the file:
[ODBC] Trace = No TraceFile = /tmp/sql.log ForceTrace = No [FreeTDS] Driver = /usr/lib64/libtdsodbc.so.0 FileUsage = 1
In the above we are instructing that UnixODBC should use the FreeTDS driver (/usr/lib64/libtdsodbc.so.0) for it’s connections. If we want, to debug problematic connections, we can enable the trace file by changing from No to Yes (in production systems, leave as No).
Now we have to create or edit the /etc/odbc.ini file and leave it with the following content:
# Data Source Name (DSN) para o MS SQL-Server: [alias] Description = Conexão ao SQL Server 2008 R2 Driver = FreeTDS Trace = No Server = server_IP Database = SQLSERVER_database_name Port = server_PORT
Explaining the above:
alias = is an arbitrary alias, the name of the DSN. Can be anything and it will be used in connection calls to the SQL Server Server = SQL Server IP Database = name of the database to which you want to connect Port = SQL Server port to receive connections
Now you can test the connections to the databases via UnixODBC, through the isix utility of UnixODBC.
Test connection to SQL Server using DSN alias, like this:
isql alias sql_USERNAME sql_PASSWORD -v
Response should look like this:
+---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL>
This is a SQL console, now you’re connected and you can run commands in the database, like this:
SQL> select count(*) from your_TABLENAME; +------------+ | | +------------+ | 2048 | +------------+ SQLRowCount returns 1 1 rows fetched SQL> quit
CentOS 7 features SELinux (Security Enhanced Linux) and it’s enabled by default and because of these security, Apache can not access network resources or databases.
To configure SELinux with the correct permissions, by releasing Apache to access network and database resources, we have to set two boolean properties in SELinux with the following commands:
setsebool -P httpd_can_network_connect on setsebool -P httpd_can_network_connect_db on
If you have SELinux disabled, this will not be needed.
Finally, using PHP, and it’s fairly simple. You can create a file “test.php” to test the connection to the SQL Server via PDO, something like this:
$server_IP = "server_IP"; $server_PORT = "server_PORT"; $server_DB = "server_DB"; $sql_USERNAME = "sql_USERNAME"; $sql_PASSWORD = "sql_PASSWORD"; $pdo = new PDO("odbc:Driver=FreeTDS; Server=$server_IP; Port=$server_PORT; Database=$server_DB; UID=$sql_USERNAME; PWD=$sql_PASSWORD;"); if (!$pdo) print '<h3>Could not connect to MS SQL Server.</h3>'; else print '<h3>Connection to MS SQL Server, via PDO, completed successfully!</h3>'; try $query = "SELECT * FROM your_TABLENAME"; $result = $pdo->prepare($a); $result->execute(); catch (PDOException $err) var_dump($err); $results = $result->fetchAll(PDO::FETCH_ASSOC); var_dump($results);
Run the file. If all went well your browser is now showing a successful connection message and a dump of the contents of one of your tables.
If you have run into any problem that you can’t solve, seek more help. Try these links:
FreeTDS User Guide
UnixODBC Documentation
Linux/Unix ODBC
0 notes
Link
SQLS*Plus is just like an Oracle SQL*Plus / sqlplus for Microsoft SQLServer.
SQLS*Plus is used by DBAs, Developers and Operations to execute SQL Server DBA tasks, run SQL script /s and automate SQL database data processing and reporting batch jobs.
With advanced options and functionality, SQLS*Plus is an optimal alternative to SQLServer sqlcmd, osql, isql and other SQL command line tool /s
SQLS*Plus is free for individual use and for commercial use on a single server and single SQL Server instance.
Annual SQLS*Plus enterprise support and maintenance site license is required for use in a multi-server and multi-instance database environment (see http://www/sqlsplus/.com site for details)
0 notes
Video
instagram
02-02-2019 #aadpakvis (bij Tbilisi International Airport • თბილისის საერთაშორისო აეროპორტი) https://www.instagram.com/p/BtpyBW-ISQL/?utm_source=ig_tumblr_share&igshid=1clzjed8nw9cg
0 notes
Text
ODBC Devuan and Debian complete how to and docu
This documentation has two parts, and overall ODBC documentation and a specific Devuan ODBC documentation. The firs part are provided due most administrators and developers must understand the ODBC infrastructure to property debug problems. This documentation starts on the "friendofdevuan" wiki due ODBC information was very poor inclusivelly in oficial Debian wiki, and now this content under http://dlvr.it/PK0VdD
0 notes
Text
0 notes
Text
St. Edwards ECON 3301 – The market for rental cars
St. Edwards ECON 3301 – The market for rental cars
Question 3-1. The market for rental cars has two segments, business travelers and leisure travelers. The demand from business travelers is QB = 35 – 0.25P, and the demand from leisure travelers isQL = 120 – 1.5P. If the price of a rental car is $60, what is the consumer surplus in each market segment?
3-2. For demand Q = 1 – P, compute the consumer surplus function as a function of P.
3-3. A…
View On WordPress
0 notes
Text
Error RDI back-end setup ocurred en DBACOCKPIT para Solution Manager 7.2 con Sybase
Después de mucho tiempo sin escribir en parte por no encontrar o realizar algo de “nivel” que sienta amerite la pena compartir me topo con el Solution Manager 7.2, tan de moda/necesidad actualmente y han ido surgiendo varios errorcitos coquetos.
En esta ocasión el problema es la saptools de Sybase usada para las herramientas de administración de SAP en Sybase ASE.
Posterior a la instalación del sistema SOLMAN 7.2 y actualizar al SPS 05 (ignoro si tiene el mismo error en SPS inferiores) se procede a realizar las post-actividades y activaciones para el mantenimiento de Sybase en la tx DBACOCKPIT y las configuraciones Data Collector, Schedule a job y Set up ATM presentan los siguientes errores:
Si ampliamos el error:
Se proceden a aplicar las notas: 1946165, 1882376, 2433149 y 1965755 sin poder solucionar el problema.
Se probaron otras opciones sin éxito hasta que se tomó la decisión de regenerar la base de datos saptools con apoyo de la nota 2497314
Ingresar al SO con el usuario syb<sid> e iniciar a la linea de comandos isql
Respaldar la base de datos saptools: dump database saptools to <path de respaldo> with compression = 101
Obtener la configuración actual de la base de datos saptools y guardar: sp_helpdb saptools
Borrar la base de datos saptools: drop database saptools
Crear la nueva base de datos saptools: create database saptools on saptools_data_001 = ‘2048M’ log on saptools_log_001 = ‘204M’
Colocarle los parametros necesarios según se capturó en el tercer punto, esto mediante el comando: sp_dboption ‘saptools’, <comando>, <valor> por ejemplo sp_dboption saptools, ‘trunc log on chkpt’, true
Para finalizar se ingresa a la tx DBACOCKPIT ruta <pestaña de SID> -> Configuration -> DBA Cockpit Framework -> Data Collectors and Admin Procedures -> Implement template seleccionar SAP Default (*) y luego presionar Implement
Con esto la base de datos saptools se habrá regenerado correctamente y se podrá activar el ATM, agendar respaldos, etc
Saludos,
1 note
·
View note