sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of...

32
Q7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what is dump tran with standby_access? Q9: What is log suicide ? Q10: When we require log suicide of a DB? Q11: What is the bypass recovery, when we require the bypass recovery? Q12: What is the difference between shutdown and shutdown with no_wait, besides the immediate shutdown difference? Shutdown with no wait never perform the checkpoint before server shutdown. Q13: Suppose In our one database huge trans are going on, we issued the shutdown with no_wait . Will it hit the server restart and how? Yes it will impact, database recovery may take long –long time, Please avoid to do this. Q14: What’s the named data cache, what is buffer pooling and how the cache hit effects the system performance ? Q15: We are getting stack traces for one of our databases? How will you investigate? Q16: Is object level recovery possible in ASE? Using archive database feature we can do object level recovery. SBT can also perform object level recovery. Q17: What is the difference between sysstats and systabstats table? Q18: What is histogram and what its default step value?

Transcript of sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of...

Page 1: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Q7: Which feature of ASE15.o most impressed you and why?

Q8: What is your org’s backup policy, what is dump tran with standby_access?

Q9: What is log suicide ?

Q10: When we require log suicide of a DB?

Q11: What is the bypass recovery, when we require the bypass recovery?

Q12: What is the difference between shutdown and shutdown with no_wait, besides the immediate shutdown difference?

Shutdown with no wait never perform the checkpoint before server shutdown.

Q13: Suppose In our one database huge trans are going on, we issued the shutdown with no_wait . Will it hit the server restart and how?

Yes it will impact, database recovery may take long –long time, Please avoid to do this.

Q14: What’s the named data cache, what is buffer pooling and how the cache hit effects the system performance ?

Q15: We are getting stack traces for one of our databases? How will you investigate?

Q16: Is object level recovery possible in ASE?

Using archive database feature we can do object level recovery. SBT can also perform object level recovery.

Q17: What is the difference between sysstats and systabstats table?

Q18: What is histogram and what its default step value?

Q19: Why we requires non default step value in histogram ?

Q20: Can we run the update stat on one table one two step(halt table in first time and after that  rest half of table)?

Interview Questions on User Management & Permissions

1. What is sybase security model for any user/login?

Page 2: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

2. What is the difference between syslogins and sysusers?

3. How can we add the login in ase? What is the required parameter of sp_addlogin?

4. What are aliases?

5. What’s the diff between role and group and which one is better?

6. How can we sync the logins from prod to uat server, how many tables we need take care for the login sync?

7. What’s suid mismatch?

8. Why do we require aliases?

9. Whts the importance of sysrole table in each database?

10. Explain syslogins syssrvroles, sysloginroles and sysroles and whts the linkup among all?

11. What is proxy authorization?

12. During the refresh from PROD -> UAT env,tables which we require to take care?

13. Explain about sysprotect tabel and sp_helprotect sp?

14. Can we change the password of other login, if yes, how?

15. What is the role required for user management?

16. diffrence b/w 12.5 syslogins and 15.5 syslogins?

17. What is guest user in database and why we require guest user?

18. What is the keycustodian_role in ASE 15.5?

19. How can we include the passwordpolicy? explain sp_passwordpolicy?

20. Can we include password history feature? From which version it is avilable and how can we do that?

21. Can we include one sql proc which exceute during login and how can we do that?

Page 3: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

New Ques on 21st Feb 2011

1. How can we get the compression level information from the dump files?

2. What is the difference between update and exclusive locks?

3. What is isolation level in ASE? And default value of isolation level.?

4. How can we avoid the deadlock in the database?

5. Is there any way to print the deadlock information in the errorlog?

6. Give the two benefits for creating the database using for load option?

7.What are new features of the Sybase 15? And let me know which you are using in your day to day operations?

8. What is the joining order in ASE ( suppose we have 4-5 tables with different  size)?

9. What difference between sysmon and MDA table ?

10 . Can we take the output of sybmon in a table?

——

 

New Questions on 11th march 2011=============================What is Identity Colum?What is the advantage and disadvantage of Identity coloums?From performnace point of view ,which is better if exists or if not exists?How can we avoid fragmentation in table?There is update statement on one APL and one DOL table. Which one would be fatser?Consider the cases: where clause on index cluster index coloum , other case not using any index.Why the reorg is faster on DOL table as compare cluster index rebuild on APL?Wht cluster index with sorted_data on APL is faster than reorg rebuild in DOL?What is Sybase recommendation for tempdb size, suppose we have 300GB , 150GB dbs are inserver, wht would be the sybase recommendation for sizing of tempdb?

Page 4: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Whats the difference between dsysnc and direct io?Suppose we are not concerning about the recovery of the database, which would be better for performance dsync(on/off) or direct io and why?Whats the asynchronus prefetch ? How is it helping in performance enhance?We having a 4k page size server, what can be possible pool size in the server?As Sybase recommends 4K size pool for log usage in 2k page size server , please let me know the pool recommendtaion for 4K pagesize server?How can we reduce the spinlock without partioning the data cache?Can we have the spinlock contention with single engine?In sysmon report what are the five segment you will be looking for performance?Whta is meta data cache?Whta is the archive database?How can we enable the acrhive database for compresssed backup?Hows the object level recovery is possible in ASE?How can we find the culprit spid which has filled up th etempdb database?How can we find the culprit spid which is badly used the log segment of tempdb?Whats partioning? How partioning helping in increaeing the performance?Suppose a table is partioned based on a coloum, how dataserver will be handle the insert on the table?Apart from the query plans, wht else resides in proc cache?What is new config param “optimization goal”? Whats the parameter we need to provide it?User is experiancing very slow performace, what can be the reason for this slowness?What is engine affinity and how can set the engine affinity?If there are 3 cpus in the box, how many engine we can configure ?Suppose dataserver is running very slow and sp_monitor is showing 100% cpu usages, what can be possible issue? Where will you look at?What is the error classes in replication server?What is the diffrence between Warm standby and table level replication?Can you please let me know five case when the thread goes down in replication?What are triggers? What are type of triggers and how many triggers can we configure on a table?What are diffrecnt locking scheme in ASE and what are the latches?How can we dump a replication queue?

New questions @ Dec 2011How can we configure the dbcc database?

How can you configure sybsecurity?

Page 5: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Have you ever worked on terabyte size of  database? How are you taking backup for the same?

Whats the diff between MSA and WS?  Can we consider MSA as a Ws?

You are not able to execute any command in ASE as tempdb is full and you cant create user defined tempdb on the fly , how will you investigate ?

What are the new features fo Sybase ASE 15?

What are the different options avilable with reorg ?

Why we require reorg ?

Suppose if every thing is fine in REplication enviorment  and data is not replicating , how will you troubleshoot the same?

What is gen id in rep server?

How can you check the latency in the replication enviorment?

Whats is HA in Sybase? How can we monitor the HA status?

Question 1How many maximum numbers of columns can create in a table?

Answer 1Maximum number of columns in a table is based on two parameters

1. Fixed length or variable length column2. APL (all pages locked) or DOL (data only locked) tables

If columns are fixed-length then maximum number would be 1024 irrespective of APL/DOL table.If columns are variable-length then maximum number would be 1024 for DOL table.If columns are variable-length then maximum number would be 254 for APL table.

Question 2What is the maximum number of arguments can be passed in stored procedure?

Answer 2The maximum number of arguments for stored procedure is 2048.

Page 6: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Question 3What is the maximum number of references allowed for a table?

Answer 3The maximum number of references allowed for a table is 200.

Question 4What is the maximum number of aggregate columns can be used in a compute class?

Answer 4127

Question 5What is the maximum number of columns can be used in “group by” clause?

Answer 5255

Question 6How many indexes can a table hold?

Answer 6A table can have maximum 250 indexes wherein 1 is clustered and remaining 249 are nonclustered indexes.

Question 7 How many clustered index can be created in a table and why?Answer 7Maximum number of clustered index can be created in a table is 1 because clustered index pages are tightly coupled with table pages and clustered index forces the table to store the data in a sorted way. So sorting can be defined only in one way. Hence, only 1 clustered index is possible in a table.

Question 8What is the limit of nesting level of sub-queries in a TSQL query?Answer 816 level limit.

Question 9What is the maximum number of sub-queries can be defined on each side of a union?Answer 9The maximum number of sub-queries on each side of a union is 16.

Question 10How many columns can be referenced by a view?Answer 10 The number of columns referenced by a view cannot exceed 1024.

Page 7: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Question 11How many total numbers of table can be used on all sides of a union query?Answer 11The total number of tables that can appear on all sides of a union query is 256.

Question 12How many columns can be specified in a single composite index?Answer 1231 columns in a single composite index can be specified. All the columns in a composite index must be insame table. The maximum allowable size of the combined index values is 600 bytes. That is, the sum of the lengths of the columns that make up the composite index cannot exceed 600.

Question 13How many page locks are required to escalate to table lock?Answer 13200 page locks are required to escalate to table lock.

Question 14How many row locks are required to escalate to table lock?Answer 14200 rows locks are required to escalate to table lock.

Question 1What is the difference between Database and DBMS (Database Management System)?Answer 1Database is the collection of database objects i.e. Tables, Views, and Procedures etc.DBMS consists of software that operates on database which provides storage, access, security, backup and other facilities.DBMS is responsible for storing data in tables and maintains relation among them.

Question 2What is the basic architectural difference between Sybase, Oracle, UDB/DB2, MS SQL Server?Answer 2 There are two algorithms to design the databases. So all databases are based on these 2 algorithms and we can group databases accordingly.

Algorithm DatabasesMultiple Instances – Single Database Oracle, IBM UDB and DB2 on ZOSMultiple Instances – Multiple Databases Sybase, MS SQL Server

Question 3What are the system mandatory databases in Syabse?Answer 3Sybase contains the 5 mandatory databases which are required to run ASE.

Page 8: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Mandatory Databases:1. Master Database Master Database is the brain of ASE. It contains the

system tables that stores the data used to run and manage ASE.2. Model Database Model is the template database used to create new

database.3. Sybsystemprocs Database It stores all the system procedures which are

required to perform operations on system tables.4. Sybsystemdb Database It contains data for the distributed transaction

management feature.5. Tempdb Database It contains the temporary tables used to perform

temporary operations,

Question 4In addition to Question 3, what are others ASE defined system databases?Answer 4In addition to above 5 system databases, ASE has 5 more system defined databases.

6. Sybsyntax Database It contains the syntax help for SQL keywords.7. Dbccdb Database Installing dbccdb allows system administrators to check

database consistency using parallel processing commands.8. Sybsecurity Database It contains auditing information – Installing

sybsecurity allows administrators to audit users.9. Sybdiag Database It is used for diagnostic purpose.10.pubs2 and pubs3 Database These are sample databases for a fictitious

book distribution company, only for R&D purpose. We generally do not install these db’s in our application environment.

11.<Application Databases> Application databases are user defined databases in production or development environments.

Question 5What are system tables and their usage?Answer 5System tables are an inbuilt table which gets created at the time of server build.

1. System tables store the data about server and database.2. System tables are created and maintained by ASE only.3. No user can update the system tables.4. System tables are accessed by users using system procedures.

E.g. sysdatabase system table stores details about the databases installed in a given server. Details of those databases can be accessed using system define system procedure sp_helpdb <database name>, etc.

Question 6What is the total number of system tables exists in master database and other database?Answer 6All databases, except master, have 29 system tables which stores the information corresponding to same database only.

Page 9: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

There are total 56 system tables exists in master database. As master database is the brain of the ASE server, it stores the information about each and every databases and configuration parameter, so it has some extra tables apart from common 29 tables.

Question 9What are rules regarding usage of system tables?Answer 9

Rules for using system tables

Unless noted otherwise, system tables use allpages locking.

Updating system tables

All direct updates on system tables are by default not allowed -even for the database owner. Instead, Adaptive Server supplies system procedures to make any normally needed updates and additions to system tables.You can allow direct updates to the system tables if it becomes necessary to modify them in a way that cannot be accomplished with a system procedure.

To accomplish this, a System Security Officer must reset the configuration parameter called allow updates to system tables with the system proceduresp_configure.

Question 10Why system table “syslogs” should not be altered manually?Answer 10Do not attempt to modify syslogs with a delete, update, or insert command. An attempt to delete all rows from syslogs will put Adaptive Server into an infinite loop that eventually fills up the entire database. Because while manually updating the syslog table will insert a record in the same syslog table as a part of its logging function, so every time it will delete a row a new row would insert into the table and eventually sever will put onto an infinite loop.

Question 11Can we create trigger on system tables?Answer 11We cannot create triggers on system tables. If we try to create a trigger on a system table, Adaptive Server returns an error message and cancels the trigger.

Question 12Can aggregate functions can be used on virtual tables such as syslocks and sysprocesses?Answer 12

Page 10: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Aggregate functions cannot be used on virtual tables such as syslocks and sysprocesses.

Question 13What are the tasks involve in performing Auditing ?Answer 13

Auditing Involves1. List the roles which are active.2. Subcommand – for alter table command, the options add column or drop

column might be used3. Previous value – The value prior to the update if the event resulted in the

update of a value.4. Current value - The new value if the event resulted in the update of a value.5. Proxy information – The original login name, if the event occurred while a set

proxy was in effect.6. Principal information – The principal name from the underlying security

mechanism, if the user’s login is the secure default login and the user logged into Adaptive Server via unified login. The valueof this field is NULL, if the secure default login is not being used

Question 14Define system procedures?Answer 14System procedures are in built stored procedures which act upon the system tables.We can’t modify the system tables directly, with the use of system stored procedures we can view and modify the system table data.

7 Automatically includes an IDENTITY column with a unique, — ????nonclustered index for new tables in the pubs2 database:use mastergosp_dboption pubs2, “unique auto_identity index”,truegouse pubs2gocheckpointgo

Usage — The master database option settings cannot be changed– For a report on which database options are set in a particular database, execute sp_helpdb.– After sp_dboption has been executed, the change does not take effect until the checkpoint command is issued in the database for which the option was changed.– The no chkpt on recovery option disables the trunc log on chkpt option when both are set with sp_dboption for the same database. This conflict is especially possible in the tempdb database which has trunc log on chkpt set to on as the default.===================

Page 11: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

===================sp_helpdb

it reports information about a specified DB or about all the DB on the Server [sp_helpdb ]Syntax – sp_helpdb [dbname]dbname — is the name of the database on which to report information. Without this optional parameter, sp_helpdb reports on all databases. dbname can include wildcard characters to return all databases that match the specified pattern.Usage — sp_helpdb reports on the specified database when dbname is given. If no value is supplied for dbname, sp_helpdb reports on all the databases listed in master.dbo.sysdatabases.–======================================sp_spaceused

it returns the space used by a specified table [ sp_spaceused ]Displays estimates of the number of rows, the number of data pages, the size of indexes, and the space used by a specified table or by all tables in the current database.Syntax – sp_spaceused [objname [,1] ]objnameis the name of the table on which to report. If omitted, a summary of space used in the current database appears.1prints separate information on the table’s indexes and text/image storage.sp_spaceused titlesname rows reserved data index_size unused——- —– ———- —– ——— ——titles 18 48 KB 6 KB 4 KB 38 KB(0 rows affected)

SYBASE ASE

Question 1What are important Sybase environment variables set while server build?Answer 1In Linux environment

1. $SYBASE It is a Sybase home directory called as Sybase installation directory.

2. $SYBASE_ASE It is a Sybase ASE home called as Sybase ASE Home in $SYBASE.

3. $SYBASE_OCS Sybase open client directory.4. $DSQUERY Sybase server name.

Question 2What is the difference between environment variables $SYBASE and $SYBASE_ASE?Answer 2

Page 12: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

$SYBASE is a root directory of Sybase wherein all Sybase products would get installed.Whereas ASE (Adaptive Server Engine) server is one of the product of Sybase, so it will installed at $SYBASE_ASE location (inside $SYBASE)

Question 3Which file defines all the environment variable and what it’s location?Answer 3In Unix environment, Sybase.sh/Sybase.csh stores all environment variables which resides at $SYBASE directory.

Question 4Define configuration and interface file?Answer 4Configuration file: it stores the configuration information for the Sybase ASE server. It resides in $SYBASE/(some times $SYBASE/$SYBASE_ASE) –When some times comes?By default configuration file name is like <servername>.cfgWhen server starts, ASE server allocates the resources as per configuration file.

Interface file: Interface file stores the connection information between client and server. It resides in $SYBASE.

If configuration file, does not exists, it creates the new one with default values.

Question 5What is Run server file and how to mention configuration file name in run server file?Answer 5Run server file, which gets created during ASE installation, contains the dataserver command to start Adaptive Server or the backup server command to start backup server. By default, the runserver file is in the current directory and is named RUN_servername.

We specify the configuration file name with –c option in the RUN server file.

Question 6What is configuration Parameters?Answer 6Configuration parameters are setting which controls the behavior of ASE server. All configuration parameters gets stored in configuration file which resides at $SYBASE_ASE .After the ASE installation, ASE supplies default values for the parameter. With these default values, ASE server can start only.

[SQL Server Administration]procedure cache size = DEFAULTdefault database size = DEFAULT

Page 13: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

identity burning set factor = DEFAULTallow nested triggers = DEFAULTallow updates to system tables = DEFAULT

Question 7How to see the configuration value set up?Answer 7To see configuration values, use system stored procedure “sp_configure”. By running this stored procedure without passing any arguments will provide all parameters values.

sp_configure with parameter name provides the details for that given parameter only.

sp_ configure [“parameter_name” | “group_name” ]

Question 8How to change the configuration parameter?Answer 8We can change the configuration parameter in 2 ways.

1. using sp_configure system procedure.2. Manually modify the cfg file.

Question 9What are different types of configuration parameters and how their values get reflected?Answer 9ASE has two types of system parameters.

1. Static parameter Static parameter changes reflected after the reboot of server.

2. Dynamic parameter Dynamic parameter changes reflected immediately.

Question 10What is the role of configuration file while server startup?Answer 10On server startup, ASE allocates the resources as per the configuration file.It also makes the backup of the existing configuration file with name <servername>.bak

Question 11What is the good practice to change the configuration parameter?Answer 11When you use “sp_configure” to change a parameter, the server:

1. Saves a copy of old file with name <servername>.001, <servername>.0022. Write a new cfg file <servername>.cfg

Question 12Which table stores the value of configuration parameter?Answer 12

Page 14: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

sysconfigures (In master database only) This table stores the value from startup time, or from the last modification of a parameter value.

Columns:Value Startup value for the parameter Comment Name of the parameterStatus Numeric value that represents the type of configuration parameter

Question 13Which table stores the “in use” configuration parameters?Answer 13syscurconfigs (In master database only) This table stores the configuration values in use.

Columns:Value Current value for the parameterStatus Numeric value that represents the type of configuration parameterdefvalue Default value of the parameter

syscurconfigs table stores the active dynamic configuration parameters and startup time of static parameters.

1. What are the required system databases in ASE?Answer: master, model, tempdb, sybsystemprocs, sybsystemdb.

2. What is the difference between system tables found in every database and system tables found only in the master database?Answer: System tables found in every database store data about that database. System tables found only in the master database store data about the entire server( metadata, data about other databases, run time information , config information)

3. When you execute a stored procedure (starting with sp_), where does the server look for that procedure?Answer: The server first looks for the procedure in the current database. If it is not there, it then checks the sybsystemprocs database. If it is not there, it finally checks the master database. If the stored procedure cannot be found there, it returns an error.

3. When you execute a stored procedure(does not starting with sp_), where does the server look for that procedure?Answer: Server only looks in current database.

3. What is the location of the ASE 15.0 configuration files (*.cfg) for windows and Unix platform?Answer: $SYBASE :Windows, $SYBASE/$SYBASE_ASE : Unix

1. What is the difference between ASE Package Installer and srvbuild?

Page 15: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: Installer unloads the ASE software ( its create the directory structure). srvbuild creates an Actual Adaptive Server.

2. What is the SySAM?Answer: SySAM stands for Sybase Software Asset Manager. SySAM is the component of Installer that determines which “premium features” are available for installation.

3. How many devices are created during installation in ASE 15? Which system databases are stored on these devices?Answer: Three devices are created during installation: the sysprocsdev device, which stores the sybsystemprocs database, the systemdbdev device which stores the sybsystemdb, and the master device, which stores the master, model, and tempdb databases.

4. Where is the RUNSERVER file located?Answer: In ASE 15.0 servers, the RUNSERVER file is located in the $SYBASE/ASE-15_0/install directory.

5. How can you verify that a server is running?Answer: You can verify a server is running

i) by using the showserver command in Unix/Linux or in a Windows Command Prompt

ii)window by using the command ‘net start’. You can also go to Windows Services in the control panel.ii) By “ps –eaf | grep datas” command in UNIX

1. What is the purpose of the interfaces/sql.ini file?Answer: The interfaces/sql.ini file is an “address book” that clientand servers use to determine which address they should use whencommunicating with each other.

Question 46 What is the default value of the procedure cache siz configuration parameter?Answer 46 7000 pages

2. Name three specific pieces of information found in the interfaces/sql.ini file.Answer: The interfaces/sql.ini file contains the server name, the service type, the network protocol, the host name, and the port number.

3. When is the interfaces/sql.ini file typically first created?Answer: The interfaces file is typically first created during installation of the server.

4. What is the primary purpose of the dsedit utility?Answer: You can edit the interfaces using the dsedit and also ping the server to test the connection.

Page 16: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

5. On which machines (the server machine or the client machines) must the interfaces/sql.ini file be located?Answer: If LDAP is not used, the interfaces/sql.ini file must belocated on every machine in the network that has either a server orclient.

1. What is the default name of the configuration file?Answer: By default, the configuration file is named <server_name>.cfg.

2. What command or procedure is used to display helpful information about configuration parameters?Answer: sp_helpconfig 3. Without a configuration file the Adaptive Server will not start? If no, then how will it start?Answer: it will create a new CFG with default values and server will start.

1. Considering Server name is TestServer , what can be Answer: The SYBASE.bak file is a backup made at startup, and it contains a copy of the configuration file at startup. The file named SYBASE.001 is a copy of an earlier version of the configuration file made when the configuration file was modified via sp_configure. It could be the same as the backup file, or it could be a much earlier copy of the configuration file.

2. Who can use sp_configure to make changes to the configuration file?Answer: Only System Administrators and System Security Officers can change the configuration file via sp_configure.

3. What are the sp_configure “configuration file” subcommands?Answer: The subcommands are write, restore, verify, and read. 4. How should you configure a server that has two different processing requirements, such as one that is used for OLTP processing during the day and DSS processing at night?Answer: You should probably create two different configuration files, one for each period of time, and then restart the server with the given configuration file at the start of each period.

1. What is the housekeeper?Answer: The housekeeper is a task that becomes active when no other tasks are active. It writes dirty pages to disk, reclaims lost space, flushes statistics to systabstats, and checks license usage. 2. What is the default value of the procedure cache siz configuration parameter?Answer: 7000 pages1. Which components of Adaptive Server memory cannot be configured?Answer: The Adaptive Server executable, kernel structures an memory object pools cannot be configured.3. Name three configuration parameters that use significant a mounts of memory.Answer: number of user connections, number of open databases, number of open indexes, number of open objects, number of locks, number of devices

Page 17: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

4. What happens if the amount of memory required by the configuration is not available on the server machine?Answer: If the amount of memory required by the configuration is not available the server will not start.5. What two configuration parameters control memory allocation behavior?Answer: allocate max shared memory and dynamic allocation on demand.

2. What two kinds of events can stop disk mirroring?Answer: A device can become unmirrored in the event of mediafailure, or it can be intentionally unmirrored by the SystemAdministrator.3. What are the sixe specifiers for the disk init command?Answer: K, M, G, T1. What is a device?Answer: A device is any part of a physical disk(raw partition) or operating systemfile that stores database objects.2. Why does a System Administrator execute the disk init command?Answer: The disk init command is used to initialize a device.Devices must be initialized before they can be used for databasecreation. .3. What is a vdevno? What values can be used for the vdevno of a newdevice?Answer: A vdevno is a virtual device number. Every device has aunique vdevno value. The value is assigned in the disk init commandand it will be from 2 to (the number of configured devices -1).4. What is a default device?Answer: A default device is a device on which a database is createdwhen no device has been specified.5. What is the master device?Answer: The master device is a device created during installation. Ithouses master, model, tempdb, and sybsystemdb. master cannot bemoved off of the master device.6. What is disk mirroring?Answer: Disk mirroring is a way of duplicating an entire device toensure recoverability in the event of a media failure.

1. How large should you make your database log?Answer: 10 – 25 % of overall database size.2. What two system databases are involved in user database creation?Answer: The master and model databases are involved in databasecreation. The contents of the model database are copied to form thecontents of the new database, and information is recorded in master.3. Name three options that can be turned on for a database.Answer: Any 3 of: allow nulls by default, auto identity, dbo useonly, ddl in tran, identity in nonunique index, read only, single user,unique auto_identity index, abort tran on log full, no chkpt onrecovery, no free space acctg, select into/bulkcopy/pllsort, trunc logon chkpt.1. Name two things an SA should consider before creating a database.

Page 18: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: The size of the database, the location of the database,whether or not there is space available for the database, whether ornot data and the log should be on different devices, the extent towhich the device is accessed, whether a device for a database or logis or needs to be mirrored.2. What is the procedure sp_estspace used for?Answer: sp_estspace is used to estimate the amount of a space thatan existing table or index will require.3. How do you create a database so the data and the transaction log areon separate devices?Answer: To create a database with a separate transaction log, in thecreate database statement, specify the device name for the dataportion, and specify a different device name for the log.4. Why is it a good practice to place the log on a separate device?Answer: Lets you back up the transaction log separately, decreasesthe likelihood that both the data and the log will be damaged at thesame time, helps in monitoring space usage and managing the space,allows disk mirroring of the log for maximum uptime and up-to-theminuterecovery.5. Who can create a database? Who can own a database?Initially, only the System Administrator can create databases.However, the System Administrator can grant this privilege to otherusers, who can then create databases provided they also have accessto the master database. Initially, the creator of a database owns it, butownership can be transferred to any user.6. What command is used to expand a database?Answer: The alter database command can expand a database.

1. What steps should you do to protect the master database?Answer: Create at least one new device Use segments to allocate allfuture growth of model, tempdb, and sybsystemdb to this newdevice. Make the master device a non-default device2. Why should you use free-space thresholds?Answer: A free-space threshold can be used to monitor spaceavailable on the segment SAs can use free-space thresholds to sendnotification when space usage reaches a certain level3. What areas of the database do the system segments control?.Answer: The system segment, the default segment, and thelogsegment segment1. Why is it important to protect the master device?Answer: Because it contains the master database. If the masterdatabase does not have the resources it needs, there can be a systemwideloss of performance.2. What sorts of problems can occur if tempdb is too small?Answer: tempdb is used both by users creating temporary tables andby server processes that need to sort data, group data, storeintermediate results, and so on. If tempdb is too small, users andserver processes will have insufficient resources to process theirqueries rapidly, and their queries will fail.3. Name one way in which you can simplify recovery through the use

Page 19: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

of resource allocation.Answer: Mirroring devices, locating database data and logs onseparate devices, keeping the master device uncluttered.4. Name two ways in which you can improve performance through theuse of resource allocation.Answer: Putting frequently accessed tables on different devices,putting a table on one device and its indexes on another device,spreading a table across multiple devices. .5. Name three non-threshold commands you can use to monitor spaceusage.Answer: sp_helpdb, sp_helpsegment, sp_spaceused, dbccchecktable. .6. How can a threshold help you monitor space usage?Answer: A threshold can help monitor space usage by executing astored procedure with a warning message when there is a certainamount of space left on a segment.

4. What happens when a log segment becomes full?Answer: Operations on the database halts and performance isaffected.1. What is the tempdb database used for?Answer: tempdb is used by the system for sorting and aggregates,and by users for temporary tables2. What command is used to expand the system tempdb database?Answer: alter database3. How big is the system tempdb at installation?Answer: The size of the model database – 3 MB in ASE 15.0Can assign logins to individual tempdbs?Answer: True2. When using multiple temporary databases, tempdb bindings areassigned to the ___________.Answer: login or the aplication3. What performance benefits can be gained by configuring multipletemporary databases?Answer:Distributes the workload across multiple tempdbsReduces system table contentionReduces resource contentionLoad balancing can be done automaticallyHeavy users or applications can be bound to theirown temporary database1. Who has the privilege to set the passwordexpiration interval for logins.Answer: login with sso_role2. Which action is more secure, locking a login or dropping the login?Answer: locking the login3. which database and table stores Login information ?Answer: master & syslogins1. Is it possible for a user to have access to a server and its databasesand still not be able to query any tables?

Page 20: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: Yes, if the user has a login and is a user in all thedatabases, but the user has no permission to use objects, then the userwould be able to access a database but not query its tables.2. Name three things that you can or must specify when creating alogin.Answer: The login name, the password, the default database, thedefault language, the full name, the password expiration interval, theminimum password length, the maximum number of failed logins.3. How does an end user change his or her login password?Answer: An end user can change his or her password usingsp_password.4. What happens to a login that is locked?Answer: If a login is locked, the login information is retained in theserver (such as the server user ID), but the user cannot log on to theserver using that login.5. What is proxy authorization?Answer: Proxy authorization is the ability for one login toimpersonate another.1. What is an alias?Answer: An alias is an identity that maps a login to a database user.2. A user cannot be dropped from a database if that userowns objects in that databaseAnswer: True3. What objects require permissions to create?Answer: Tables, views, defaults, rules, stored procedures.1. What is the largest number of groups a user can belong to? What isthe smallest?Answer: A user can belong to at most two groups: the public groupand one DBO-defined group. A user always belongs to at least onegroup, the public group,2. What two commands can add a user to a group?Answer: sp_adduser and sp_changegroup can add a user to a group.3. user1 has not been made a user of database2, but user1 can stillaccess database2. Explain how this might be possible. (There arethree possible answers.)Answer: (1) database2 has a guest account. (2) user1 has an alias indatabase2. (3) user1 has proxy authorization and impersonates alogin that is a user of database2.4. When trying to extend a set of permissions to a number of users,what are the limitations involved in using groups?Answer: Groups exist on the database level, not the server level;users can belong to only one DBO-defined group.5. What are the four things that must take place in order for a userdefinedrole to become active?Answer:(1) An SSO must create the role.(2) Permissions must be assigned to the role.(3) An SSO must add a user to the role.(4) The role must be enabled.1. What is the scope of a user-defined role?

Page 21: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: Server wide2. What roles within the server has the capability to create other roles?Answer: SSO-role only3. What happens when a user has a set of permissions that is differentfrom the ones assigned to a group to which they belong?Answer: The permissions assigned last have precedence..4. How is a user-defined role different from a group assignment?Answer: User-defined roles are system-wide. Multiple user-definedroles can be given to a single user. Once defined, roles can bedynamically turned off and on by the user, thereby supporting moreflexibility than with groups. A user-defined role can also includeother user-defined roles.User-defined roles can take advantage of creating:Hierarchical accessAccess defined for a specific application.1. Name any four database utilities provided by ASE.Answer: bcp, dsedit, Sybase Central, ddlgen2. (True/False) bcp is a command line utility that is invoked from insidethe ASE via isql.Answer: False3. (True/False) Using fast or slow bcp is a function of a parameterspecified when bcp is invoked.Answer: False1. How can you use Sybase Central to generate a DDL script for agiven object?Answer: To create a DDL script in Sybase Central, open thedatabase, navigate to the desired object, right-click the object, andselect the appropriate Generate DDL option.2. How do you determine which speed bcp will use?Answer: bcp speed is determined by whether there are indexes ortriggers on the table. If a table has indexes or triggers, slow bcp isused. Otherwise, fast bcp is used.3. What is logged during a fast bcp? During a slow bcp?Answer: During a fast bcp, only page allocations are logged. Duringa slow bcp, page allocations and inserts are logged.4. Under what bulk copy circumstances must the selectinto/bulkcopy/pllsort option be turned on?Answer: select into/bulkcopy/pllsort must be turned on only if youare copying data into a table via fast bcp.5. When copying data from one operating system to another, whichformat is recommended? Why?Answer: Character format is recommended when copying data fromone operating system to another, because each operating system hasits own native format, and the format of one system might beincompatible with another.6. If you bulk copy into a partitioned table and do not specify apartition number, how does the server determine which partition toinsert the data into?Answer: The server determines the partition randomly.1. What is the primary purpose of a checkpoint?

Page 22: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: The primary purpose of a checkpoint is to reduce theamount of time needed for recovery by writing all dirty pages todisk.2. What is a “dirty page”?Answer: A dirty page is a page that has been modified in datacache, but the modifications have not yet been written to disk.3. (True/False) After automatic recovery is completed each database isin a "consistent state".Answer: True1. Why does the server need to execute the automatic recovery process?Answer: The server needs to execute the automatic recoveryprocess because it must ensure that all transactions in process duringor shortly before the last shutdown are either rolled forward or rolledback as a unit.2. Why are Adaptive Server transaction logs known as “write-aheadlogs”?Answer: Adaptive Server transaction logs are known as writeaheadlogs because log pages are written to disk before thecorresponding data and index pages.3. Does a commit tran always write an “end transaction” record to thelog? Does a rollback tran?Answer: A commit tran does not always write an “end transaction”record to the log. It does so only when @@trancount goes from 1 to0. (In other words, it does so only when it is not a nested committran.) rollback tran always writes an “end transaction” record to thelog, regardless of its nesting level.4. During recovery, how does the server know that a given transactionwas incomplete?Answer: The server knows that a given transaction was incompletebecause the transaction log contains a “begin transaction” record butno “end transaction” record.5. During recovery, when does the server “roll forward” a transaction?When does it “roll back” a transaction?Answer: The server rolls forward transactions that are committedin the log but are not fully reflected on data pages. The server rollsback a transaction that is incomplete or is rolled back in the log but ispartially or fully reflected in the data pages.6. There are four circumstances under which pages in cache are writtento disk. Name them.Answer: Pages in cache are written to disk: 1) when the pagesmust be aged out, 2) when a checkpoint occurs, 3) when thehousekeeper writes pages to disk, or 4) when a commit tran isexecuted. Note that the first three circumstances write log and datapages to disk, but the fourth circumstance writes only log pages todisk.7. Recovery order can be set for which types of databases?Answer: Recovery order can be set only for user databases (andonly on Adaptive Server Enterprise 11.9.2 and forward).

1. Under what circumstances should database consistency be checked?

Page 23: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

Answer: When you are about to perform a database dump, if anerror log message reports table corruption, if queries are notbehaving as expected, or as part of normal system monitoring.2. (True/False) A database owner can grant/revoke permission toexecute some dbcc commands to other users.Answer: False3. (True/False) A database that demonstrates inconsistencies may berepaired with the command dbcc dbrepair.Answer: False1. Name one example of a database inconsistency.Answer: A page is allocated but not linked, a page is linked but notallocated, a page does not point to the appropriate previous or nextpage.2. What is the difference between dbcc checktable and dbcc checkdb?Answer: dbcc checktable checks the allocation and links for aspecific table and its indexes. dbcc checkdb checks all tables andindexes in a specific database.3. Which command checks referential integrity for the system tables ofa database?Answer: dbcc checkcatalog checks referential integrity betweensystem tables.4. What must you do before you can use the dbcc checkstoragecommand?Answer: You must configure Adaptive Server for parallelprocessing, install and set up the dbccdb database, and provide theserver with information on each database to be checked.5. How is the dbcc checkstorage command able to provide a morethorough level of checking with less impact on performance?Answer: The dbcc checkstorage command stores and processesinformation in the dbccdb database, thereby providing thoroughchecking without impacting performance on other databases.

1. When do you need to have a local Backup Server?Answer: You always need to have a local Backup Server to dodatabase dumps and loads.2. (True/False) Database and log dumps can be compressed.Answer: True1. What is Backup Server?Answer: Backup Server is a server that performs all processingwhen dumping and loading databases.2. When do you need to have a local Backup Server? A remote BackupServer?Answer: You always need to have a local Backup Server to dodatabase dumps and loads. You also need a remote Backup Server ifyou want to do dumps to or loads from a remote device.3. What happens when the transaction log fills up? What should you doin response to this?Answer: When the transaction log fills up, data modifications aresuspended or aborted. In response to this, you should make room inthe transaction log, which is typically done by truncating the

Page 24: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

transaction log.4. Name three techniques or statements that can be used to back updata.Answers: database mirrors, dump database, dump transaction, thelast-chance threshold.5. Name three circumstances under which the master database shouldbe backed up.Answer: Before and after adding or dropping devices; before andafter adding, altering or dropping databases; after adding logins andusers to the master database.1. What is the name of the system stored procedure that is used to makea backup server known to the ASE that it serves?Answer: sp_addserver2. (True/False) Database recovery is an automatic feature of theAdaptive Server.Answer: True.3. What are minimally logged transactions?Answer: Transactions that are only recorded with one row ofinformation in the log to define the operation. select …into, fast bcp,and truncate table are 3 examples.1. Does dumping a database make the database go offline? Doesloading a database make the database go offline?Answer: Dumping a database does not make it go offline. Loading adatabase does make a database go offline.2. What should you verify about a database before performing a dumpof the database?Answer: You should verify the consistency of a database beforedumping it.3. Name one limitation of backing up databases using only dumpdatabase and load database.Answer: You cannot restore modifications made since the lastdatabase dump; performance may suffer if you make frequentdatabase dumps, but restoration may suffer if you make infrequentdatabase dumps.4. Can you roll through a damaged database dump? If so, how?Answer: Yes, you can roll through a damaged database dump byusing the transaction log dumps made after the damaged databasedump.5. Can you roll through a damaged transaction log dump? If so, how?Answer: No, you cannot roll through a damaged transaction logdump.1. Where is the syslogshold table located?Answer: In the master database only.2. Point-in-time recovery does not apply to databaseswhere data and logs are on the same device?Answer: True3. List two of the six recommended tables that Sybase suggests bulkcopies be made to assist in full recoveryAnswer: Any 2 of:sysdatabases,

Page 25: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

sysdevices,syslogins,sysusages,syssrvroles,sysloginroles1. What is the last-chance threshold?Answer: The last-chance threshold is a point in a database’s logsegment determined by the server. When the number of used pagescrosses this point, the server executes sp_thresholdaction andsuspends or aborts all transactions in progress.2. What happens if the last-chance threshold is crossed and there is nosp_thresholdaction procedure?Answer: The server sends an error to the error log if a database hasno sp_thresholdaction procedure and the last-chance threshold iscrossed.3. How can a long-running transaction limit the effectiveness of logtruncation?Answer: Truncation can remove only inactive pages from the log.If a transaction is long-running, it extends the active portion, therebylimiting the number of inactive pages that can be removed from thelog.4. Name three circumstances under which the master database shouldbe backed up.Answer: Before and after adding or dropping devices; before andafter adding, altering or dropping databases; after adding logins andusers to the master database.

1. What is the name of the system table that stores system errormessages?Answer: master..sysmessages2. What is the difference between sp_monitor and sp_sysmon?Answer: sp_monitor displays high level server statistics.sp_sysmon provides detailed server statistics on a wide range ofsystem activities.3. What login role is required in order to access the MDA tables?a. sa_roleb. sybase_ts_rolec. mon_roled. sso_roleAnswer: c. mon_role1. Where is the error log normally located?Answer: The error log is normally located in the /$SYBASE/ASE-15_X/install directory.2. Name two types of information that can be found in the error log.Answer: Possible answers: Startup information, hardware/softwareerrors, fatal errors, kernel errors.3. How can you identify that a process is a system process?Answer: A system process can be identified by using the sp_whooutput. System processes have a NULL login name and nohostname.

Page 26: sybaseblog.comsybaseblog.com/wp-content/uploads/2012/10/ques.docx · Web viewQ7: Which feature of ASE15.o most impressed you and why? Q8: What is your org’s backup policy, what

4. What kinds of processes cannot be killed?Answer: You cannot kill a system process, and you also cannot killyour own process.5. What kinds of processes should be killed with extreme caution?Answer: Processes that are “infected” or “background” should bekilled with extreme caution, if at all.6. What does License Use Monitor do if the number of licenses in useexceeds the number in the license agreement?Answer: License Use Monitor sends an error message to the errorlog if the number of licenses in use exceeds the number in the licenseagreement.