Skip to main content

Posts

Showing posts from 2015

Activity Monitor fails- Microsoft SQL Server Management Studio

Error Details: Getting below error when trying to open process details or checking long queries in Activity Monitor window in SQL server R2 Enterprise Edition. The Activity Monitor is unable to execute queries against server [xxxx server]. Activity Monitor for this instance will be placed into a paused state. Use the context menu in the overview pane to resume the Activity Monitor. Other Information: Unable to find SQL Server process ID [PID] on server [xxxx server] (Microsoft.SqlServer.Management.ResourceMonitoring) Solution : This error exist because one of your service is not enabled on server.Name of Service is Performance Counter DLL Host. Just go to Services in control panel and find service Performance Counter DLL Host set it automatic and start the service. After doing this you need to close sql and reopen again. If still error not resolved then go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance by in registry editor using regedt32 command.

Virus protection tips for your laptop of PC

1. Please do not open any Email attachments from unknown sources your own personal mail accounts such as Yahoo, Gmail, etc. 2. Kindly take backup all your important Data regularly on CD or DVD and scan external disk before using. 3. Please  do not click on any Links , sent from unknown sources, either via Emails or accessing your Facebook,twitter account.  These can be infected with virus. 4. Please do not Disable your Anti-Virus under any circumstances on your machine. 5. Update all Patches - Antivirus, Operating System , MS Office and windows patches update . 6. If you are unable to open any of your files then need to check virus infection and scan with antivirus. 7. If you use or share any External Drives such as  USB Hard Disks, need to SCAN them with the Antivirus software before using them.

Disadvantages of materialized View in SQL

Following are the Disadvantages of materialized View in SQL 1.We can not perform any DML Operations on materialized View ,but you can perform DDL Operations like DROP.The thing is here it stores the all records even if it is duplicate or non-duplicates,especially which we are using aggregate values.For example daily loads,monthly loads,yearly loads.such cases it would be very helpful storing of entire data if it is new or old. The disadvantage is takes space Can only be based on a simple Select if you require real time data. maintaining the materialized View  Logs has an overhead on the master system. 2.We can't perform DML on materialized View  because it is like snapshot or read only .it is mainly used for reporting purposes.A materialized view can be either read-only, updatable or writable. We Can't Perform DML on read-only but can Perform DML on updatable or writable. 3.On readable - we cant perform DML. on updatable- we can perform DML, we need to create the mate

What is the Difference between count(*) and count(1) in SQL

Question: Following are the Differences between count(*) and count(1) in SQL Answer: 1.COUNT(*) will include NULLS but it counts no.of ROWS in a TABLE, AND COUNT(column_or_expression) counts no.of NOT NULL values within a COLUMN. 2.COUNT(*) is depend on full table but COUNT(1) is depend on only one column and both are given same output.

Difference between collection and bulk binding in SQL

Following at the Differences between collection and bulk binding in SQL To retrieve multiple rows we can use cursors or bulk collections. Cursors row by row mechanism so performance decreased. But collections not row by row process all rows retrieved at time so performance increased. And bulk bind means doing DML(data manipulation language) operations as a bulk. By using for all statement we can do bulk-binding. If you want to do bulk-bind first should use bulk collections .

Get Name,SID for user for windows

To Get Name,SID for users for windows  there are many ways to get that . SID full name is Security Identifier. 1. You can execute regedt32.exe  command from run mode. Go to HKey_Users and you can see sid of user like following picture. 2.Second way you can use command on command prompt and run the following command. wmic useraccount where name='username' get sid To get details in file you can use below way. wmic useraccount where name='username' get sid > c:\sid.txt 3. To get All users SID you can use below command. wmic useraccount get name,sid To get details in file user below.. wmic useraccount get name,sid> c:\sid.txt

How to Reduce Microsoft Outlook Data file size

Sometime out Outlook Data file size become big and it's not getting decrease after deleting of lot of old mails then there is one option to decrease data file size of outlook. You need to use compact option of outlook file. Below are step to do it. 1. Delete items that are old dated and not required. 2. Go to File tab->Account Settings-> Account Settings. 3. Go to Data Files tab, select the data file that for compacting purpose then you can  click Settings     then Click On Compact Now.

Step Recorder feature of Windows 7

Do you know that you can record steps that you are using for your work on windows by using step recorder. You need to just click on Start button then type step recorder in search box then you can open the step recorder. Then click on start to start your task recording when you want to stop your step recorder just click on stop. Then save as dialog box will be open you can save your file on selected location and file will be save in zip format. Once file saved you can open that file in Internet explorer browser. Its windows secret that I know most people do not know but it is very much helpful to make document for your task for future learning. File will be save in MHT format which is MHTML format.

How to find distinct from number of list in string

How to find distinct from number of list in string in SQL Solution: SELECT LTRIM(H,',') OUTPUT FROM (SELECT sys_connect_by_path(K,',') H, L val FROM (SELECT K, ROW_NUMBER() OVER (ORDER BY K) L FROM (SELECT UNIQUE TO_NUMBER(REPLACE(SUBSTR(G,1,INSTR(G,',',1)),',','')) K FROM (SELECT B, J, A, (LTRIM(SUBSTR(A,B,J),',')) G FROM ( SELECT DISTINCT b, LEAD(b)over (order by b ASC) j, A FROM (SELECT instr(a,',',level)b, A FROM (SELECT ('1,2,0,2,432,445,3,3,-1,10099,-2,0.32,0.3432,.3432,4,4,5,6,0.32,-2,432,32,21029,10099,3209839') ||',' a FROM dual ) CONNECT BY level <=LENGTH(A)+1 ORDER BY b ) ) WHERE B<>J ORDER BY B ) ORDER BY 1 ) ORDER BY K ) WHERE connect_by_isleaf=1 START WITH L =1 CONNECT BY L = prior L+1 );

Error "Can not load File or Assembly "xxxxx". Parameter is incorrect in Asp.net

If you are facing below error Error "Can not load File or Assembly "xxxxxx". Parameter is incorrect in Asp.net Solution is: You can try out this cleaned up or delete files from below path  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary Files.

Asp code to call home page on logout button,reset password of user

Asp code to call home page on logout button Make script code this way Put this code in vb-script tag sub home() document.frm.submit() end sub //to call function on click event this way onclick="home()" Asp code to reset password of user If you want to reset password or change password of particular user and you can login page then you can get hint or help to set this code in your form. set con=server.CreateObject ("ADODB.CONNECTION") set rs=server.CreateObject ("ADODB.RECORDSET") con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database Path" Response.Clear () set rs = con.Execute ("select * from logtable where Username='" & Request.Form ("logid") & "' and pwd = '" & Request.Form ("oldpassword") & "'" ) if rs.RecordCount <=0 then Response.Write "invalid password" end if if Request.Form("che

Example of New operator overloading,Call by value function and reference in c++

Example of New operator overloading in c++ const int maxnames = 5; class Names { char name[25]; static char Names::pool[]; static short int Names::inuse[maxnames]; public: Names(char* s = 0) { if (s) strncpy(name, s, sizeof(name)); } void* operator new[](size_t) throw(std::bad_alloc); void operator delete[](void*) throw(); void display() const { std::cout << name << std::endl; } }; // Simple memory pool to handle fixed number of Names. char Names::pool[maxnames * sizeof(Names)]; short int Names::inuse[maxnames]; // Overloaded new[] operator for the Names class. void* Names::operator new[](size_t size) throw(std::bad_alloc) { int elements = size / sizeof(Names); // Find the first empty element (if any). int p = -1; int i = 0; while ((i < maxnames) && (p == -1)) { if (!inuse[i]) p = i; ++i; } // Not enough room. if ((p == -1) || ((maxnames - p) < elements)) throw std::ba

Get Missing Index details from Activity Monitor Screen in SQL to get more performance

Create Missing index using SQL Activity Monitor to process improvement If you want to improve performance of application then keep view on activity monitor in SQL and go to long executed query line then you can see from recent expensive query window screen . You can see the average duration of query execution. To get Missing Index details from Activity Monitor Screen in SQL to get more performance you can do following steps. /* Missing Index Details from ExecutionPlan1.sqlplan The Query Processor estimates that implementing the following index could improve the query cost by 93.6536%. */ /* USE [DB_TEST] GO CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[GENERALJOURNALACCOUNTENTRY] ([CREATEDTRANSACTIONID]) GO */ Once you get index you can create index by directly executing query or you can create index manually. You can create index in query execution process time is very high.

Solution for SQL Database Backup Restore Error

Sql Error Description Facing Below Error during Restoring of SQL Database to existing database or newly created database. Restore of database 'MicrosoftDynamicsAx' failed. (  Microsoft.SqlServer.Management.RelationalEngineTasks) System.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.SmoExtended) Solution : This Error due to you have take Full SQL Backup in Read only mode. To solve this issue you can try below steps. 1.U ntick tail log backup checkbox .If you don't know about Tail log backup option then search on google to know more about tail log backup. 2. Second option is you can take full backup of database again then restore then file on database then you can deleted backed up file to free the disk space.

Intranet and Extranet,Artificial Neural Networks,Server and Workstation

Intranet and Extra net An Intranet is a private network (LAN) that uses the TCP/IP protocol suite. However, access to the network is limited only to the users inside the organization. The network uses application programs defined for the global Internet such as HTTP, and may have web servers, print servers, file servers etc. Extra net Private network that uses the Internet protocol and the public telecommunication system Shares part of a business's information with suppliers, vendors, partners, customers or other businesses. Viewed as part of a company's intranet that is extended to users outside the company. Artificial Neural Networks ARTIFICIAL NEURAL NETWORKS •Neural Networks can supplement the enormous potential of traditional computers with the ability to make sensible decisions and to learn by experience. •Neural Computation is done by a dense mesh of computing nodes and connections. They operate collectively and simultaneously on data inputs.

Structured query language,SQL Query Processing

Structured query language The common commands and methods used in it are grouped into the following categories: Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), Logical Connectors, Comparison operators, Aggregate functions, Joins, Sub query, Relational operators, Where clause etc. Data definition language covers SQL commands that create and destroy database tables. Data manipulation language covers SQL commands that create, change or destroy the information in a database table or the structure of the table. Data control language covers protection to the database such as granting access to the tables. Comparison operators cover those operators that allow for comparison between two items. Aggregate function deals with those standard SQL functions that allow programmers to narrow the search of a database. Joins category covers those items that allow information from two or more tables to be related. SQL Query Processing

Limitations of computer,Introduction of Internet

Limitations of computer 1. No Feelings: Computers are not living. Hence, can’t make judgment of its own. Its instructions are based on information given to it in form of program. 2. It is Dumb: Computer posses no intelligence of it’s own. It’s I.Q. is zero. Computer can’t take it’s own decision in this regard. Definition of  Internet Internet is a worldwide network that provides an infrastructure to connect universities, government offices, companies, students, scientists, researchers and private individuals. A machine to be on the Internet means it runs TCP/IP protocol stack, has an IP address, and has the ability to send IP packets to all the other machines on the Internet. A private individual having a personal computer can call up an Internet service provider using a modem, be assigned a temporary IP address, and send IP packets to other Internet hosts.  An Internet consists of a set of connected networks that act as an integrated whole. The Internet provides universal

Application Domain,Definition of SQL Server Integration Service(SSIS).

Application Domain Application domain is nothing but a process(not exactly as normal process) where the application will be running on it. Application domain will isolates all the applications by running each application in a diff. app domain. For instance, if 5 applications are running on your system, it will then creates 5 diff app domain to guarantee the security. It also has the following advantages, 1. An application can be independently stopped. 2. An application cannot directly access code or resources in another application. 3. A fault in an application cannot affect other applications. Definition of SQL Server Integration Service(SSIS). SQL Server Integration Services (SSIS) is one of the main issues of Microsoft BI (Business Intelligence) concept representing the data integration and data transformation in the enterprise level approach. SSIS (SQL Server Integration Services) has the ability to gather data from various resources in different kinds of formats, p

SQL Tips-Bulk insert records into table ,Select into ,Insert into,delete record in chunks,Remove unused space

Bulk insert records into table in sql  This is the way to Bulk insert records into table in sql or oracle insert into  If you want to insert of table data to existing table then you need to select insert into query. E.g. INSERT   INTO   Table2 SELECT   *  FROM   Table1 insert into dTable select * from sTable It mean table2 and table1 both exists before execution of query and its simply insert data line by line. It takes more time on execution. Select into: If you want to copy of table structure with data to new table then you need to select select into query. E.g. Select * into tab1 from tab2. It means tab2 exists and tab1 does not exist in database before execution of query. After execution it will copy data of tab2 to tab1 and it will create table tab1 also. if dTable is blank and doesn't have any record. Create this as follows: definately reduce the time. CREATE TABLE dtable NOLOGGING AS SELECT * FROM stable Example of delete records from sq

Command to know the incoming network connections,transmitting data to server in unix

Command   to know the incoming network connections in unix   to know a command which would help knowing the incoming network connections through(from & to) different ip-address:ports netstat -anp | grep "port" | grep "process" Transmitting data to server through code in linux int no_of_bytes_to_send; char* buffer[100]; no_of_bytes_to_send=sizeof(buffer); while(no_of_bytes_to_send>0) { int byte_send = send(sd,buffer,no_of_bytes_to_send); no_of_bytes_to_send = no_of_bytes_to_send - byte_send; buffer+=byte_send; }

Code To Fill data table in DataGrid,fill static, get DataSet combo in asp.Net

Code To Fill DataGrid using asp.net  You can try Code To Fill DataGrid using asp.net common class. After creation these methods you need to call these method to your form editors by creating class object. Fill DataGrid Private Sub fillgrid() dim dta2 as New dataTable Dim str1 As String = "select * from receipt_detail " Dim datatb As New DataTable datatb = obj.OpenDataTable(str1, "receipt_detail") dta2.DataSource = datatb dta2.DataBind() End Sub 'Other Related Function Public Function OpenCn() As Boolean Try If cn Is Nothing Then cn = New SqlConnection End If If Not (cn.State = ConnectionState.Open) Then cn.ConnectionString = constr cn.Open() End If Finally End Try Return True End Function Public Function Closecn() As Boolean Try If Not (cn Is Nothing) Then cn.Close() End If Finally cn.Dispose() End Try Return True End Function Public Function OpenDataTable(B

Workbook Data Into One Single Sheet,Sort Alphabetic​ally ,Row column height width manipulation -MS Excel

Workbook Data Into One Single Sheet using MS Excel  If you have 10 workbook each workbook have single sheet of data (tab name should be anything) if you need consolidation sheet into all 10 workbook into one then you can do this with code use below mention code and your work will done . Sub test() Dim FS, Fle, FLDR, fles Dim Fletype As Variant Set FS = CreateObject("scripting.filesystemobject&quot ;) Dim intLstrow As Integer Dim intLstcol As Integer Dim dlgDialoge As FileDialog Dim srcsheet As Worksheet Dim wk As Workbook 'Set dlgDialoge = Application.FileDialog(msoFileDialogFolderPicker) Set wk = ThisWorkbook Set FLDR = FS.getfolder(BrowseFolder) Set fles = FLDR.Files For Each Fle In fles Fletype = Split(Fle.Name, ".") If (Fletype(UBound(Fletype)) = "xls" Or Fletype(UBound(Fletype)) = "xlsx") Then Set srcsheet = Workbooks.Open(Fle.path).Worksheets(1) intLstrow = srcsheet.Range("

Create or replace trigger before insert on field in sql

1.Create  or replace trigger before insert on field in sql Create or replace trigger t1 Before insert on Employee For each row declare v_firstname Employee.firstname%type; v_lastname Employee.lastname%type; Begin DBMS_OUTPUT.PUT_LINE('You inserted the first Name:'|| :NEW.FIRSTNAME); DBMS_OUTPUT.PUT_LINE('You inserted the first Name:'|| :NEW.LASTNAME); Begin select distinct firstname into v_firstname from Employee where firstname=:NEW.FIRSTNAME; IF(:NEW.FIRSTNAME = v_firstname) THEN DBMS_OUTPUT.PUT_LINE('This first name exists already in the table Employee.'); end if; exception when no_data_found then DBMS_OUTPUT.PUT_LINE('This first name does not exist in the table Employee.'); End; Begin select distinct lastname into v_lastname from Employee where lastname=:NEW.lastNAME; IF(:NEW.LASTNAME = v_lastname) THEN DBMS_OUTPUT.PUT_LINE('This last name exists already in the table Employee.

Select query to get Database owner and Get package name from the database in SQL

To get owner of all database in sql you can run following query in sql server query editor. select suser_sname(owner_sid) from sys.databases To get owner of particular database like Testdb is database name in sql you can run following query in sql server query editor. select suser_sname(owner_sid) from sys.databases where name = 'Testdb'  Get package name from the database query level If you  have a front end application.When a button on that page is clicked, a package is called.If you  want to find that package name from from the db level. Db level means by writing a query. How to find it? use who called me function for example OWA_UTIL.WHO_CALLED_ME(owner ,name, lineno ,caller_t ); 

Difference between primary key and unique key,Find Primary key,Index help,Not Null in SQL

Difference between primary key and unique key A table can have only one primary key but multiple unique keys. unique key may have null value which is not allowed in primary. simply primary key is unique + not null where as unique key Field contains any number of NULL values. Find primary key, index_name ,index key  using sp_Help command in sql How to find primary key, index_name and index_key in the same query For a particular table and also want to group by index_name use sysindexes table to get the output you want use the stored procedure sp_helpindex [object name] sp_help 'table name' Null and Not Null value in Primary and unique keys in sql Primary key should contain unique value and not null because if attribute value is null than how should maintain the uniqueness.. one more think i want to add that Primary key is a type of constraint and foreign key is also a type of constraint and pk is null then u can't use the null value as a foreign key. S

Simple command to shrink all database at once to reduce database size in SQL server

Simple command to shrink all database at once to reduce database size in SQL server This is very simple command to shrink all database at once to reduce database size in SQL server but one thing you need to remember do not forget to make recovery mode simple before executing this command. EXEC sp_MSForEachDB 'select ''?'' as [Database]; ALTER DATABASE [?] SET RECOVERY SIMPLE; DBCC SHRINKDATABASE (''?'' , 0)' After execution of command it will display all database name with details of size. I hope this command will help you a lot on troubleshooting of disk size. Shrinking and reducing database size in sql Summary: If there is big difference in ldf file and .bak file then you can shrink database to reduce size of database. you can use following method at Details use <dbname> checkpoint go backup log <dbname> with truncate_only, go dbccshrinkfile(<logfilename>,1000)

Re-indexes all the tables using DBCC BREINDEX command

Summary: re-indexes all the tables using DBCC BREINDEX command. This goes and re-indexes all the tables and takes about 7 minutes and make an improvement of 10% Details: USE DbName_1 --Enter the name of the database you want to reindex totally DECLARE @TableName varchar(255)  DECLARE TableCursor CURSOR FOR  SELECT YourTableName FROM information_schema.tables  WHERE table_type = 'base table'  OPEN TableCursor  FETCH NEXT FROM TableCursor INTO @TableName  WHILE @@FETCH_STATUS = 0  BEGIN  DBCC DBREINDEX(@TableName,' ',100)  FETCH NEXT FROM TableCursor INTO @TableName  END  CLOSE TableCursor  DEALLOCATE TableCursor ReIndexing All Database Tables at once in SQL Database Server This is a simple three line command for Re-indexing All Database Tables at once in SQL Database Server. This command is very helpful to improve your database performance by re indexing tables. Its Update Statistics on Tables. USE YouDatabaseName GO EXEC sp_MSforeachtable @co

SQL Stored Procedure Examples-Create,Delete and Drop Table ,insert,row count

Create,Delete and Drop Table  Through SQL Stored Procedure Following is code which you can create new Stored procedure in SQL Stored procedure section and can write following code. You can understand easily by reviewing whole code. set ANSI_NULLS OFF set QUOTED_IDENTIFIER OFF GO Create PROCEDURE [dbo].[SP_abc](@userID char(3)) AS BEGIN -- Statement to create table if NOT exists (select * from dbo.sysobjects where id = object_id('abc')) exec("CREATE TABLE abc(@field1 CHAR(3),LOGDT SMALLDATETIME,LOGTM DATETIME )") END set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- Statement to Delete records from table table Create PROCEDURE [dbo].[SP_DELETE](@ID1 char(3)) AS BEGIN SET NOCOUNT ON if exists (select * from dbo.sysobjects where id = object_id('L')) BEGIN DELETE FROM abc WHERE ID1=@id1 END END set ANSI_NULLS OFF set QUOTED_IDENTIFIER OFF GO -- Statement to Drop table Create PROCEDUR

SQL Join Query Tips-Example of right ,self query itselft,anti ,left join,Full outer join

Example of self join query in sql. Summary : If you are looking for information like self join query mean table used self as join let us see following example to get more clear. Hear I used  right join with self join. Example of self join query in sql,right join,self join,join query itself. select * from emp where empno not in (select e.empno from emp e right join dept d on e.empno = d.empno) How to use self join in sql select query Example of self join: To find the IDs which have a different department: select distinct A.id  from myTable A join myTable B on A.id = B.id where A.dept <> B.dept Example of join select query in sql Query to get a list of all students who have a certain checklist item (MFST) with a status of Initiated where all other checklist items have a status of Completed. Should I be using Exists or should I be using someting else? SELECT A.COMMON_ID,         B.AID_YEAR,         C.CHKLST_ITEM_CD,         C.ITEM_STATUS FROM PS_PERSON

Whate is Java Servlets ,JDBC,JAVA API,Webserver

WHAT IS JAVA SERVLETS ? An HTTP servlet can generate an HTML page, either when the servlet is accessed explicitly by name, by following a hypertext link, or as the result of a form submission. An HTTP servlet can also be embedded inside an HTML page, where it functions as a server-side include. Servlets can be chained together to produce complex effects--one common use of this technique is for filtering content. Finally, snippets of servlet code can be embedded directly in HTML pages using a new technique called JavaServer Pages. Servlets : A servlet is dynamically loaded module that services requests from Web server, by another service called response. Servlet is efficient as it is initialized only once when the web server loads it. Servlets are efficient, persistent, portable, robust, extensible, and secure, and they have facility to embed JavaScript. JDBC :  The JDBC is a pure JAVA API used to execute SQL statements. It provides the classes and interfaces that can be us

Anti Virus Tips-Remove autorun.inf folder virus,protect from virus,Best Antivirus

Remove autorun.inf folder virus 1. click on Start Button 2.then Click on Run 3. write down "cmd" in the Run box then you can see a CMD box. Here, you will write down cd...(Change directory) you can see like this C:\> then write c:\> attrib when you will write this command "attrib" it will show you all of your affected file. but you should only attentive for SHR autorun.inf and SHR AUTOTEXT.bat(these are virus) then follow this instruction>>> C:\>attrib -s -h -r autorun.inf C:\> del autorun.inf and then restart your computer. if you see this problem again then just delete autorun.inf. you should do same thing for all of your drivers. Some tips to protect from virus Here are some practical tips to help you decide whether or not to open an attached emails: 1. If you get an email with an attachment from someone you don't know, delete it. You don't take candy from strangers, and you should behave the same with email attac

SQL Select Query Examples-retrieve Last five records,subquery , last letters in capital

Select Query to retrieve Last five records of the table select * from emp a where 5 >= (select count(1) from emp b where a.empno != b.empno and a.sal <= b.sal) order by a.sal desc assumptions: 1. Empno is primary key in emp table 2. 5 last records must be required based on some sorting, so i took it as salary . Select Query to get the first and last letters in capital in SQL This is sample example to use Select Query to get the first and last letters in capital in SQL. You can use with your table instead of test5. upper is function to get letter in upper case and substr method is used to get first and last letter. select upper(substr(ename,1,1)) || substr(ename,2,length(ename)-2) || upper(substr(ename,length (ename),1)) from test5; Example of subquery in sql select e.employee_id,e.first_name||' '||last_name as name,e.department_id,e.hire_date,e.manager_id,d.department_name, m.first_name||' '||m.last_name manager from employees e join department

Tips for Linux Kernel scheduling,shutdown and restart command,steps to kernel updating

 kernel scheduling in Linux In kernel you have kernel threads. Some part of the kernel code runs in the userspace process context and some other part runs in the kernel thread context. All the userspace processes and kernel threads are scheduled with no difference except that their priority(that is both userspace process and kernel threads are treated same). we can change the kernel with our algorithm.. algorithm in sence round robin,shortest job first, fcfs, etc. You have a mirror or some part (dono the exact name) in kernel where you store your algorithm. and make kernel work in your algorithm. If your algorithm works fine without crashing the system you can set ur algorithm as default overwriting the existing one. Its possible to write your own algorithm too. scheduler schedules processes either it may be user or kernel, all user and kernel processes are same and kernel treats them in the same manor,except kernel process will not be swapped out, kernel process will have mor

Redirect output in a file,Check Exist validation,Cursor Example in PL SQL

Redirect output in a file in Oracle PL SQL There are different ways: a) Before you execute the package you can enable SPOOL. or b) Create a temporary package and insert the log messages into that so that data can be viewed later on the temporary table. or c) Use DBMS_FILE package procedure to open and write data into files. Check exists validation using pl/sql declare v_deptno dept.deptno%type:=&gdeptno; cursor deptcursor is select * from dept where deptno=v_deptno; v_deptcursor deptcursor%rowtype; begin open deptcursor; fetch deptcursor into v_deptcursor; if deptcursor%found then dbms_output.put_line('v_deptcursor.ename); else dbms_output.put_line('sorr..! no deptloyee exists..'); end if; end; PL Sql program example of cursor on employee table This is a PL Sql program example of cursor on employee table to check whether employee exist or not. declare v_empno emp.empno%type:=&gempno; cursor em

How To Upgrade Your Computer's Memory,Renaming of Drives

 Upgrade Your Computer's Memory Upgrading computer memory involves increasing the RAM of your computer, so the first thing you have to figure out is the type of RAM the system uses, how it's configured, and how many RAM slots you have available. A memory upgrade usually requires that you first check the computer's user manual, or the manual for the motherboard. Find out if the memory is parity or non-parity. You can also check the website of your computer to find out the memory you need for computer memory upgrades. Now, find out what the speed of the PC memory is. When dealing with computer memory, you have to know this information. Next, does your computer use single in-line memory modules (SIMMs) or dual in-line memory modules (DIMMs)? When conducting an upgrade, it's also key to figure out if the computer uses regular, FPM, EDO, or Synch DRAM. How many pins are on the motherboard? 30, 72, or 168? Computer memory upgrades require that you remove the cover from

Set batch file which schedules dump from database in MYSQL

Set batch file which schedules dump from database in MYSQL To Set batch file which schedules dump from database in MYSQL you can try following way. echo Running dump... c:\MYSQL\bin\mysqldump -u root -padmin --result-file="c:\back\backup_ %date%.sql" db_dm echo Done! Placing MySQL database from local computer to host You Can place MySQL database from local computer to host by following steps. Import/export file first export the database click on export tab you'll get the query for whole database copy it and paste in notepad save it with .sql extension then open your server control panel go to phpmyadmin and import the saved sql file

PHP Tips-Getting the nodes list of xml doument with responseXml in ajax ,call image save in database,time difference etc

Getting the nodes list of xml doument with responseXml in ajax var obj = ""; function callAjaxObj() { try { obj = new XMLHttpRequest(); } catch(e) { try { obj = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { obj = ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("your browser doesn't support ajax"); return false; } } } } function testResponseXml() { callAjaxObj(); obj.open("get","sample.xml",true); obj.onreadystatechange=function() { if(obj.readyState==4) { var doc = obj.responseXML.documentElement; //var doc = obj.responseXML; alert(doc.getElementsByTagName('user').length); } } obj.send(null); } Example of calender script in PHP calender script in PHP echo " $title $year "; echo "SMTWTFS"; $day_count = 1; echo ""; while (