Resolved issue records over two hours

Source: Internet
Author: User
Tags mssqlserver

Sometimes a very small problem may take a long time to solve. Here we record the problems that once took my time.

2011-12-22:

1. Load the webpage containing the svg map in the WinForm, and assign values to the elements on the svg.

Original Order:

A. initialize svg elements after the page is loaded

Window. onload = function htmlInit (){
Try {
EnableWheelScroll (true); // sets the zoom in and drag effect.
InitSvgElment (); // initialize the Svg Element
GetSvgDisplayData (); // sentiment data
SetInterval ("getSvgDisplayData ()", "180000"); // send a request every three minutes
} Catch (e ){
Alert (e. message );

}

B. The value assignment function of svg is called after the page is loaded on winform. Some variables to be initialized are called in the value assignment function.

As a result, winform is executed before the svg element is initialized, so that the map element cannot be assigned a value.

The modification is also very simple. Put InitSvgElment (); // initialize the Svg element

$ (Function (){

InitSvgElment (); // initialize the Svg Element
.

2. Start IE to access the webpage with svg map, and then restart IE.

This is related to the security guard. If you only use for system repair, some ie settings will be "optimized", resulting in a crash when accessing the svg plug-in.

Some computer IE access SVG Automatic Restart problem http://jiangzheng.iteye.com/blog/1275234 provides a solution

3. Create a registry function that runs on a common computer without any problems. The function crashes on a computer with anti-virus software installed with little red umbrella and cannot be used.

RegistryKey Run = HKLM. CreateSubKey (@ "SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \");

Change

RegistryKey Run = HKLM. OpenSubKey (@ "SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \");

You can.

This problem was discovered only when the test was incomplete, resulting in deployment to the user.

4. Create the Dictionary Scripting. Dictionary in js and report an exception "ActiveX parts cannot create objects"

This error is very common, mainly because it can be solved by registering some active dll.

ActiveX parts cannot create a solution http://www.cnblogs.com/291099657/archive/2009/01/02/1366955.html for the object Scripting. Dictionary

 

2011-12-31:

5. I originally wrote a small program for forwarding logs to my mailbox. In a project, I set it to send logs once every two hours. It worked well at the beginning, and then I couldn't receive the emails. Therefore, it is suspected that the customer's Internet is disconnected or that no system program can be automatically run after the server is restarted. Later, my colleague checked that the Internet was okay, the machine was not restarted, and the software was still running. After checking the information, I can receive another email ...... The problem persists !!! In fact, my colleague did not tell me an exception. A prompt box "email sending error" is displayed on his software. Look at the Code:

Private void LogTimer_Tick (object sender, EventArgs e)
{
This. LogTimer. Stop ();
Try
{
This. SendEmail (true );
}
Catch (Exception ex)
{
MessageBox. Show (ex. Message, "failed to send mail", MessageBoxButtons. OK, MessageBoxIcon. Error );
}

This. LogTimer. Start ();
}

The problem lies in the pop-up box. When unattended, no one clicks the pop-up box and the timer stops there ..... So you cannot receive the email.

2012-1-11:

6. Get the current application path in windows Serveice

I remember a long time ago there was a windows service project using System. environment. the path is specified in CurrentDirectory + "/Log.txt" mode. This code is not debugged during development. Later, the log file cannot be found in the directory where the service program is located, after debugging, the System is used in the winform program. environment. currentDirectory can return the current directory, but in Windows Service

"C: \ WINDOWS \ system32", if you do not know the path, directly use a System. IO. file. create ("aaa.txt") code to Create a log file, which is also in the "C: \ WINDOWS \ system32" directory. Generally, you can use AppDomain. CurrentDomain. BaseDirectory in a windows service Project to correctly obtain the current directory.

2012-2-4:

7. because the landlord does not want to provide the network, he switched to a small company that cannot be called the company to provide the so-called optical fiber to the building network. When they were installing the company, he heard a line-making complaint about the poor network cable, in addition, when the network cable is connected, it turns out that it is directly peeled and connected to 1236 (as if it were the four) and wrapped in white tape. what's even worse is that the network cable and the wire were tied together in the corridor. My problem is that when I went to bed with a good network last night, the ADSL 678 error could not be connected, but the NIC was good and I went to bed. I spent a day playing outside today. I came back at night and found that the Protector bound by the wire and network cable in the corridor had tripped. Even if I didn't care about pushing it up, I thought I would. Entry discovery

The network is still unavailable, and the NIC light is not on. So I found my head, And the hub was not plugged in. The problem persists. If there is a problem with the line, we will find the network. One of the three people said they were cool and cool as an old employee and bit the crystal head with their teeth. The network cable head has been redone, so they don't even have a tester. They still don't have a light when plugged in to the computer for testing. I suspect that there is a problem with the NIC driver, and the problem persists when I Unmount and reinstall it, unless it is the first time that the system driver has been installed, the possibility of a problem is very small. Later, I inserted the line they made for me into one of my wireless routers, which turned on and proved that the line they made was okay. Connect my computer to the vro with a network cable. If the light is not on, the NIC may be faulty.

However, I used it well yesterday, but it didn't work for a day. The NIC should not be faulty. I took a cell phone flashlight and looked at the network card for a long time and found that there was something like a hair. I blew it out, but the problem still persists. Shut down and restart, the light is not on, the laptop power is inserted during the restart process, and the NIC light is on. No problem. After a long network cable is switched to the external network cable, the light will not turn on. I tried several times to verify whether there was a problem with the module between the NIC and the power supply. It was close to the computer and had no bad smell. I took my computer to the corridor and found a short network cable to connect to the hub. The light was on and the network was okay. I think the problem lies in the network cable. At the risk of my life, I bundled the network cable with China Telecom into a cable partition, pulled the network cable, and inserted it into the computer. The problem was solved.

The process is twists and turns, and it may take a lot of networks if they do not pay attention to technical details. Technology is the cost of entrepreneurship.

 

: I resigned and posted my previous work records

1. Use the command line to suspend iis: net stop iisadmin
Run the command line to start iis: net start iisadmin; net start w3svc
Note: To start iis, You need to execute two Commands: net start iisadmin, which is the most common on the Internet. Most of the tutorials are written in this way, but the http service cannot be started. therefore, you must run the net start w3svc command to start the iis service.
Therefore, to sum up, two commands are required to open IISs on the command line. Only one command is required to close IIS on the command line.
========================================================== ========================================================== ========================================================== =
1. Obtain the user table name:
SELECT name FROM sysobjects WHERE type = 'U' AND sysstat = '83'

Note: Generally, only type = 'U' is required, but sometimes the system tables are mixed in (I don't know why). After adding the following sentence, these system tables can be ruled out.

2. Obtain information about all columns in the table (including data type names ):
SELECT syscolumns. name, policypes. name, syscolumns. isnullable, syscolumns. length
FROM syscolumns, policypes
WHERE syscolumns. xusertype = policypes. xusertype AND "syscolumns. id = object_id ('tablename ')

Note:
(1) In order to highlight some important content, several pieces of information are selected for output.
(2) The syscolumns table only contains data type numbers. To obtain the complete name, you need to find it from the categorypes table. Generally, it is better to use xusertype for user data types, there will be no one-to-many cases.
(3) syscolumns. length is the length of the physical memory, so nvarchar, varchar, and Other types are shown in the database as half of this.

3. Obtain the column names contained in the primary key of the table:
SELECT syscolumns. name
FROM syscolumns, sysobjects, sysindexes, sysindexkeys
WHERE syscolumns. id = object_id ('tablename') AND sysobjects. xtype = 'pk' AND sysobjects. parent_obj = syscolumns. id AND sysindexes. id = syscolumns. id AND sysobjects. name = sysindexes. name AND sysindexkeys. id = syscolumns. id AND sysindexkeys. indid = sysindexes. indid AND syscolumns. colid = sysindexkeys. colid

Note: This is found in four system tables. The relationship is complex and can be roughly expressed:
Syscolumns contains the column information and table id in the table. The sysobjects table contains the primary key name (similar to PK_Table) and Table id. The sysindexes table contains the primary key name, table id, and index number, sysindexkeys contains the table id, index number, and column number.
========================================================== ========================================================== ========================================================== =
SQL: Check the port number

Q: I have created a server alias that uses the TCP/IP network library. The client server alias is configured to dynamically determine the port used. How can I find out the port used by the customer so that I can set my own firewall?

A: The port used by the client to contact the SQL Server instance is the same as the port used by the instance to listen on the client request instance. You have several methods to determine the port number being used. Remember, when the Server is installed for the first time, SQL Server dynamically selects a port. In the future, the port numbers used for server suspension and restart are the same. Dynamic port allocation is a one-time event.

To view the port number used by the SQL Server instance, you can select either of the following methods:

Open the Server network utility and click Properties of TCP/IP entries in the enabled protocol list.

View error logs of a specific instance. You will see similar entries in the error log:

SQL Server listening on 127.0.0.1: 1362.
The four-digit number after the colon is the port that SQL Server is used to listen to the IP address. The left side of the colon is the detailed information.

View the registry. Depending on how you install and upgrade SQL Server, the specific registry subkeys are different, but you will see similar keys as below:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \
InstanceName \ MSSQLServer \ SuperSocketNetLib \ Tcp \
InstanceName is the name of the SQL Server instance you are using (for default instances, InstanceName is MSSQLServer ). This key has an entry named TcpPort, which contains the port number being used.

You need this port number to set the firewall between the client and the server. The client sends a special request to the UDP port 1434 of SQL Server to determine which port to use. SQL Server Returns the list of available Server instances and the ports in use for each instance. If UDP port 1434 is blocked, the connection between the firewall and the SQL Server instance cannot be implemented.

========================================================== ========================================================== ========================================================== =
Oracle service description

HOME_NAME-Oracle Home Name, such as OraHome92 and OraHome81

(1) OracleServiceSID

Database Service, which automatically starts and stops the database. If a database is installed, its default start type is automatic. The service process is Oracle. EXE, the parameter file initSID. ora, the log file SIDALRT. log, the console SVRMGRL. EXE, and SQLPLUS. EXE.

(2) OracleHOME_NAMETNSListener

The Listener service is only required when the database needs Remote Access (whether through another host or local SQL * Net network protocol ), you can access the local database without using this Oracle service. Its default start type is automatic. The service process is TNSLSNR. EXE, the parameter file Listener. ora, the log file listener. log, and the console LSNRCTL. EXE. The default ports are 1521 and 1526.

(3) OracleHOME_NAMEAgent

The OEM Proxy Service receives and responds to tasks and Event requests from the OEM console. It is only required when you use the OEM to manage databases. Its default start type is automatic. The Oracle service process is DBSNMP. EXE, the parameter file snmp_rw.ora, the log file nmi. log, and the console LSNRCTL. EXE. The default port is 1748.

(4) OracleHOME_NAMEClientCache

The name cache service is used to connect Oracle Names data of a remote database. Its default start type is manual. However, unless you have an Oracle Names server, you do not need to run this service. The service process is ONRSD. EXE, the parameter file NAMES. ORA, the LOG file ONRSD. LOG, and the console NAMESCTL. EXE.

(5) OracleHOME_NAMECMAdmin

The Connection Management Service is used to build the Connection Manager server. It is only required by the server as the Connection Manager. Its default start type is manual. The service process is CMADMIN. EXE, the parameter file CMAN. ORA, the log file CMADM_PID.TRC, And the console CMCTL. EXE. The default port is 1830.

(6) OracleHOME_NAMECMan

The Connection gateway service is used to build the Connection Manager server. It is required only when the Oracle server is used as the Connection Manager. Its default start type is manual. The service process is CMGW. EXE, the parameter file CMAN. ORA, the log file CMAN_PID.TRC, And the console CMCTL. EXE. The default port is 1630.

(7) oraclehome_namepolicatherer

The Performance package data collection service does not need to be started unless Oracle Capacity Planner and Oracle Performance Manager are used. Its default start type is manual. The service process is VPPDC. EXE, the log file alert_dg.log, And the console vppcntl.exe.

(8) OracleHOME_NAMEHTTPServer

Generally, we only use the WEB server provided by Oracle to access the Web pages under the Oracle Apache directory, such as JSP or modplsql pages. Unless you use it as your HTTP service, you do not need to start it (if you start it, it will take over the IIS service). Its default start type is manual. The Oracle service process is APACHE. EXE, and the parameter file is httpd. conf. The default port is 80.

(9) OracleHOME_NAMEPagingServer

A digital pager or email with a modem sends a warning (not tried). Its default start type is manual. Service Process PAGNTSRV. EXE, log file paging. log.

(10) OracleHOME_NAMENames

The Oracle Names service is required only when the Server is used as the Names Server. Its default start type is manual. Oracle service process NAMES. EXE, parameter file NAMES. ORA, LOG file NAMES. LOG, console NAMESCTL. EXE, default port 1575.

(11) OracleSNMPPeerMasterAgent

The SNMP Service proxy is used to manage the server by the SNMP network management software. Unless you use the network management tool to monitor the database, you do not need to start the server. The default start type is manual. The service process is AGNTSVC. EXE. The parameter file is MASTER. CFG. The default port is 161.

(12) OracleSNMPPeerEncapsulater

The SNMP encapsulation service is used for SNMP protocol conversion. Unless you use an incompatible SNMP proxy service, it does not need to be started. The default start type is manual. The service process is ENCSVC. EXE, and the parameter file is ENCAPS. CFG. The default port is 1161.

(13) OracleHOME_NAMEManagementServer

The default start type of the OEM Management Service is manual. The Oracle service process is OMSNTSVR. EXE and the log file oms. nohup.
========================================================== ========================================================== ========================================================== =
Oracle10g create a tablespace script on PLSQL Developer Oracle10g create a tablespace script on PLSQL Developer
Create a tablespace
Create tablespace Joy

Datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ Joy. def 'size 500 M
Autoextend on next 100 M maxsize unlimited logging
Extent management local autoallocate
Segment space management auto;
 

1) DATAFILE: path for storing tablespace data files
2) SIZE: initially set to 200 M
3) UNIFORM: the size of the specified area is 128 k. If not specified, the default area size is 64 k.
4) The space name MOF_TEMP is not required to be the same as the data file name MOF_TEMP.dbf.
5) autoextend on/OFF indicates that automatic table space expansion is started/stopped.
6) alter database datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ mof_temp.dbf' resize 500 m; // manually modify the data file size to 500 M
Delete a tablespace
Drop tablespace Joy including contents and datafiles;
 

2. Create a user

Create user test identified by test default tablespace Joy;

Iii. Authorization

Grant dba to Joy;
Grant unlimited tablespace to Joy;

========================================================== ========================================================== ========================================================== =

In SQL Server 2005, ROW_NUMBER and ROW_NUMBER are not sorted. 1. If we see that nhib.pdf is written in this way, it is easier to understand it (should it not be efficient ?)
-- With is just an alias?

With query as (select ROW_NUMBER () over (order by (select 0) as rownum, * FROM Product)
Select * from query where rownum between 5 AND 10

-- 2. ROW_NUMBER must specify the write over (order by **). Sometimes I don't want to sort it at all and want to sort it in the original order (it also takes time to sort it)
-- The method is:
Select ROW_NUMBER () over (order by (select 0) as rownum, * FROM Product

-- There is so much to say.
========================================================== ========================================================== ========================================================== =
Solve ORA-12560: TNS: protocol adapter errors, share with everyone
Today, I encountered the problem of ORA-12560: TNS: protocol adapter error. After some efforts, the problem has been solved and shared with everyone.
There are three reasons for the problem that caused the ORA-12560: TNS: protocol adapter error:
1. The listening service is not started. On windows, perform the following operations: start --- program --- management tools --- Service, open the service panel,

Start the oraclehome92TNSlistener service.
2. The database instance is not started. On windows, perform the following operations: start --- program --- management tools --- Service, open the service

Panel, start oracleserviceXXXX, XXXX is your database SID.
3. Registry issues. Regedit, and then enter HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE \ HOME0 to change the environment variable ORACLE_SI

D is set to XXXX, XXXX is your database SID. Or the right few my computers, properties -- Advanced -- environment variables --- system variables -- New

, Variable name = oracle_sid, variable value = XXXX, XXXX is your database SID. Or before entering sqlplus, under command line

Set oracle_sid = XXXX, XXXX is your database SID.
After the above steps, you can solve the problem.
========================================================== ========================================================== ========================================================== ========
How to Set dual gateway for a dual-nic host
A Web host requires two-way Intranet and Internet access. One subnet is a neutral zone, and the gateway is set to 192.168.1.254. The other subnet uses a vro leased line to connect to a large intranet, set the gateway to 10.1.8.254.

Each machine is equipped with two NICs and divided into two gateways. [generally, an important unit is to physically connect two networks at the same time, which is not secure]. Currently, only the gateway can communicate between the Internet and the Intranet each time it is changed, but it cannot be connected to the Internet and the Intranet at the same time. The problem is, can the gateway be connected to the Internet and the Intranet at the same time without changing the gateway?

The simplest method is to combine various Gateway Routing knowledge on the Internet:

1. Set the gateway for the NIC connected to the internet to 192.168.1.254. The default gateway is enabled;

2. After the IP address of the network card connecting to the Intranet is configured, set the gateway to null (that is, there is no gateway). After the gateway is enabled, the Intranet cannot be routed through the gateway;

3. Enter route print to view the metric of the Intranet IP address;

3. Go to CMD and run:

Route-p add 10.0.0.0 mask route 0.0.0 10.1.8.254 metric 30

(This means that the routing gateway of the 10 * IP packet is set to 10.1.8.254, and the-p parameter indicates permanent writing to the route table)

4. enable two NICs at the same time. The two gateways can work at the same time, and the two subnets can be accessed at the same time. You do not need to reset them after Shutdown and restart!

========================================================== ========================================================== ========================================================== ========

PLSQL Developer oracle 10g create and delete tablespaces, rename,
Log on to the Oracle database through pl/SQL, and then execute the menu: File/New/command window, open a command window, and then execute the script in the Command window to create and delete tablespaces.

Create a tablespace

Create tablespace db_name _
Datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ db_name _. dbf'size 200 M
Autoextend on next 10 M maxsize unlimited logging
Extent management local autoallocate
Segment space management auto;

1) DATAFILE: path for storing tablespace data files

2) SIZE: initially set to 200 M

3) UNIFORM: the size of the specified area is 128 k. If not specified, the default area size is 64 k.

4) space name: db_name _ is not required to be the same as the data file name db_name _. dbf.

5) autoextend on/OFF indicates that automatic table space expansion is started/stopped.

6) alter database datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ db_name _. dbf' resize 500 m; // manually modify the data file size to 500 M

7) drop tablespace db_name _ including contents and datafiles; // delete a TABLESPACE

Test creating a tablespace
Create tablespace IMSTEST
Datafile 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ HNORCL \ IMTEST. def 'size 200 M
Autoextend on next 20 M maxsize unlimited logging
Extent management local autoallocate
Segment space management auto;
Commit;

Create a user and set the DBA role
CREATE USER MARTIN
Identified by martinpwd
DEFAULT TABLESPACE USERS
Temporary tablespace temp;
For example:
-- Create a new user
Create user jack
Identified by "123"
Default tablespace "USERS"
Temporary tablespace "TEMP"
Grant connect to jack;
Grant dba to jack;
Grant sysdba to jack;

// Delete a user
Drop user jack cascade;

[Oracle 10 Gb]-change the name of the tablespace
SQL> COL FILE_NAME format a70
SQL> SET linesize 120
SQL> SET pagesize 99
SQL> COL TABLESPACE_NAME format a10
SQL>
SQL> SELECT file_name, tablespace_name FROM dba_data_files;

========================================================== ======================================

2012-05-17:

1. When the database is restored, the old hacker cannot obtain the exclusive access permission. Use the following statement to apply.
Alter database portal_develop SET OFFLINE WITH ROLLBACK IMMEDIATE

 

2. Flex cross-origin access to WebService

A. place a cross-domain file on the site

B. Add a statement to load cross-domain files in the flex initialization function.

Two problems:

A. The format of the Cross-origin file is new after flash play 9.0. I didn't notice it at the beginning.

B. A package name must be referenced when loading a cross-domain file in flex.

 

.... To be continued

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.