Skip to main content

Posts

Bulkcollect and any restrictions in Bulkcollect In SQL

Question: What is bulk-collect and any restrictions in bulk-collect ? what is the use of limit clause in bulk-collect ? Answer: With bulk collect we can move all the resultant set in bulk to b processed in PL/SQL engine which kindles high efficiency but at the cost of memory ,thus the resultant set is moved in batches by giving how many records to be moved in one batch by specifying it in limit clause. Actually bulk collect performance is very high,because when ever resource table having large amount of data to fetch data using cursors that is degrade performance of the application,to improve performance of the application then we are using bulk collect,limit is an optional clause using in cursor fetch statement with bulk collect clause. Bulk collect reduces the context switching between the SQL and PL/SQL engines .. thereby increasing performance.. we can reduce the context switch to one but in case of very large data set. it's must that you use limit clause to manage t

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