Yesterday, I used ENTERPRISEMANAGER to set ORACLE's internal server. today, I will talk about how to use system procedures in QueryAnalyzer for the same settings. In EnterpriseManager, the settings are divided into the following three parts: 1. Server name and Server type 2. Server option 3. security when using storage settings.
Yesterday I used enterprise manager to set ORACLE's linked server. today I will talk about how to use system procedures in Query Analyzer for the same settings.
In Enterprise Manager, the configuration includes the following three parts:
I. server name and server type
II. server options
III. security
Storage settings are also divided into three parts:
Steps:
1. add servers
When using sp_addmediaserver, the parameters to be used are as follows:
@ Server "linked server"
@ Srvproduct "Product name"
@ Provider "Provider"
@ Datasrc "Data source"
II. set server options
To use sp_serveroption, the following parameters are required:
@ Server "Linked server"
@ Optname "RPC" or "rpc out"
@ Optvalue True or False
3. add Login
To use sp_add1_srvlogin, the parameters are as follows:
@ Rmtsrvname "Linked server"
@ Useself True or False
@ Locallogin local LOGIN
@ Rmtuser: Remote User
@ Rmtpassword remote user password
Application instance code
Exec sp_addmediaserver 'oracleserver', 'Oracle ', 'msdaora', 'oracleserver'
Exec sp_serveroption 'oracleserver', 'rpc. out', 'True'
Exec sp_serveroption 'oracleserver', 'rpc ', 'True'
Exec sp_add1_srvlogin 'oracleserver', 'false', null, 'sa ',''
Because the younger brother's English proficiency is limited, although he can understand the help of the previous several processes, he cannot translate it, so he had to put the source code he set up at that time, so he could not explain it all, as long as you use this code to do less, you can achieve your goal.
The above code is successfully tested on UNIX ORACLE7 and NT4 SP5 SQL7.