cancel
Showing results for 
Search instead for 
Did you mean: 

USERENV error.

Former Member
0 Kudos

Hello, during the Homogeneous system copy from Win 32 to 64 , i'm stop on error -->

CJS-00084 SQL statement or script failed. DIAGNOSIS: Error message: ORA-2003: Invalid USERENV parameter! This

200 -- also means that we must manually update this file whenever RDBMS adds a

201 -- new option.

202 if c = 'COMMITSCN' then

203 raise USERENV_COMMITSCN_ERROR;

204 elsif c = 'TERMINAL' then

205 begin

206 c := pesuen(c);

207 exception

208 when ICD_UNABLE_TO_COMPUTE then

209 select userenv('TERMINAL') into c from sys.dual;

210 end;

211 elsif c = 'ENTRYID' then

212 begin

213 c := pesuen(c);

214 exception

215 when ICD_UNABLE_TO_COMPUTE then

216 select userenv('ENTRYID') into c from sys.dual;

217 end;

218 elsif c = 'SESSIONID' then

219 begin

220 c := pesuen(c);

221 exception

222 when ICD_UNABLE_TO_COMPUTE then

223 select userenv('SESSIONID') into c from sys.dual;

224 end;

225 elsif c = 'LANGUAGE' then

226 begin

227 c := pesuen(c);

228 exception

229 when ICD_UNABLE_TO_COMPUTE then

230 select userenv('LANGUAGE') into c from sys.dual;

231 end;

232 elsif c = 'LANG' then

233 begin

234 c := pesuen(c);

235 exception

236 when ICD_UNABLE_TO_COMPUTE then

237 select userenv('LANG') into c from sys.dual;

238 end;

239 elsif c = 'INSTANCE' then

240 begin

241 c := pesuen(c);

242 exception

243 when ICD_UNABLE_TO_COMPUTE then

244 select userenv('INSTANCE') into c from sys.dual;

245 end;

246 elsif c = 'CLIENT_INFO' then

247 begin

248 c := pesuen(c);

249 exception

250 when ICD_UNABLE_TO_COMPUTE then

251 select userenv('CLIENT_INFO') into c from sys.dual;

252 end;

253 elsif c = 'ISDBA' then

254 begin

255 c := pesuen(c);

256 exception

257 when ICD_UNABLE_TO_COMPUTE then

258 select userenv('ISDBA') into c from sys.dual;

259 end;

260 elsif c = 'SCHEMAID' then

261 begin

262 c := pesuen(c);

263 exception

264 when ICD_UNABLE_TO_COMPUTE then

265 select userenv('SCHEMAID') into c from sys.dual;

266 end;

267 elsif c = 'SID' then

268 begin

269 c := pesuen(c);

270 exception

271 when ICD_UNABLE_TO_COMPUTE then

272 select userenv('SID') into c from sys.dual;

273 end;

274 elsif c = 'PID' then

275 begin

276 c := pesuen(c);

277 exception

278 when ICD_UNABLE_TO_COMPUTE then

279 select userenv('PID') into c from sys.dual;

280 end;

281 else

282 raise INVALID_USERENV_PARAMETER;

283 end if;

284 return c;

285 end;

286

287 -- Trusted*Oracle additions

288

289 Function ROWLABEL return MLSLABEL is

290 begin return null; end;

291 -- removed - now builtin's

292

293 -- Function TO_CHAR(label MLSLABEL, format varchar2 := '')

294 -- return VARCHAR2 is

295 -- begin return peslts(label,format); end;

296 --

297 -- Function TO_LABEL(label varchar2, format varchar2 := '')

298 -- return MLSLABEL is

299 -- begin return pesstl(label,format); end;

300

301 -- group functions

302 Function LUB (label MLSLABEL) return MLSLABEL is

303 begin return null; end;

304 Function GLB (label MLSLABEL) return MLSLABEL is

305 begin return null; end;

306

307 -- end of Trusted*Oracle additions

308

309

310 -- beginning of NLS routines

311 -- replaced with new versions 6/3/92 JEM

312

313 function NLSSORT(c VARCHAR2 CHARACTER SET ANY_CS) return RAW is

314 begin

315 return pesxco(c,'');

316 end NLSSORT;

317

318 function NLS_UPPER(ch VARCHAR2 CHARACTER SET ANY_CS)

319 return VARCHAR2 CHARACTER SET ch%CHARSET is

320 begin

321 return pesxup(ch,'');

322 end NLS_UPPER;

323

324 function NLS_LOWER(ch VARCHAR2 CHARACTER SET ANY_CS)

325 return VARCHAR2 CHARACTER SET ch%CHARSET is

326 begin

327 return pesxlo(ch,'');

328 end NLS_LOWER;

329

330 function NLS_INITCAP(ch VARCHAR2 CHARACTER SET ANY_CS)

331 return VARCHAR2 CHARACTER SET ch%CHARSET is

332 begin

333 retur. SOLUTION: See ora_sql_results.log and the Oracle documentation for details.

In ora_sql_results.log no one error ......

How do i determine what Userenv parameter is incorrect, and where it can be corrected?

The control.sql are

CONNECT / AS SYSDBA

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE

SET DATABASE "SID"

RESETLOGS

ARCHIVELOG

MAXLOGFILES 255

MAXLOGMEMBERS 3

MAXDATAFILES 1022

MAXINSTANCES 50

MAXLOGHISTORY 11680

LOGFILE

GROUP 1 (

'D:\ORACLE\SID\ORIGLOGA\LOG_G11M1.DBF',

'D:\ORACLE\SID\MIRRLOGA\LOG_G11M2.DBF'

) SIZE 50M,

GROUP 2 (

'D:\ORACLE\SID\ORIGLOGB\LOG_G12M1.DBF',

'D:\ORACLE\SID\MIRRLOGB\LOG_G12M2.DBF'

) SIZE 50M,

GROUP 3 (

'D:\ORACLE\SID\ORIGLOGA\LOG_G13M1.DBF',

'D:\ORACLE\SID\MIRRLOGA\LOG_G13M2.DBF'

) SIZE 50M,

GROUP 4 (

'D:\ORACLE\SID\ORIGLOGB\LOG_G14M1.DBF',

'D:\ORACLE\SID\MIRRLOGB\LOG_G14M2.DBF'

) SIZE 50M

DATAFILE

'D:\ORACLE\SID\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',

'D:\ORACLE\SID\SAPDATA3\UNDO_1\UNDO.DATA1',

'D:\ORACLE\SID\SAPDATA1\SYSAUX_1\SYSAUX.DATA1',

'D:\ORACLE\SID\SAPDATA1\SR3_1\SR3.DATA1',

'D:\ORACLE\SID\SAPDATA1\SR3_2\SR3.DATA2',

'D:\ORACLE\SID\SAPDATA1\SR3_3\SR3.DATA3',

'D:\ORACLE\SID\SAPDATA1\SR3_4\SR3.DATA4',

'D:\ORACLE\SID\SAPDATA1\SR3_5\SR3.DATA5',

'D:\ORACLE\SID\SAPDATA2\SR3_6\SR3.DATA6',

'D:\ORACLE\SID\SAPDATA2\SR3_7\SR3.DATA7',

'D:\ORACLE\SID\SAPDATA2\SR3_8\SR3.DATA8',

'D:\ORACLE\SID\SAPDATA2\SR3_9\SR3.DATA9',

'D:\ORACLE\SID\SAPDATA2\SR3_10\SR3.DATA10',

'D:\ORACLE\SID\SAPDATA1\SR3700_1\SR3700.DATA1',

'D:\ORACLE\SID\SAPDATA1\SR3700_2\SR3700.DATA2',

'D:\ORACLE\SID\SAPDATA1\SR3700_3\SR3700.DATA3',

'D:\ORACLE\SID\SAPDATA1\SR3700_4\SR3700.DATA4',

'D:\ORACLE\SID\SAPDATA2\SR3700_5\SR3700.DATA5',

'D:\ORACLE\SID\SAPDATA1\SR3USR_1\SR3USR.DATA1',

'D:\ORACLE\SID\SAPDATA2\SR3700_6\SR3700.DATA6',

'D:\ORACLE\SID\SAPDATA2\SR3700_7\SR3700.DATA7',

'D:\ORACLE\SID\SAPDATA4\SR3DB_1\SR3DB.DATA1',

'D:\ORACLE\SID\SAPDATA4\SR3DB_2\SR3DB.DATA2',

'D:\ORACLE\SID\SAPDATA4\SR3DB_3\SR3DB.DATA3',

'D:\ORACLE\SID\SAPDATA2\SR3_11\SR3.DATA11',

'D:\ORACLE\SID\SAPDATA2\SR3700_8\SR3700.DATA8',

'D:\ORACLE\SID\SAPDATA1\SYSAUX_2\SYSAUX.DATA2',

'D:\ORACLE\SID\SAPDATA1\SYSTEM_2\SYSTEM.DATA2'

;

ALTER DATABASE OPEN RESETLOGS;

ALTER TABLESPACE PSAPTEMP ADD TEMPFILE 'D:\ORACLE\SID\SAPDATA2\TEMP_1\TEMP.DATA1'

SIZE 2000M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE 10000M;

shutdown immediate

startup upgrade

spool utlirp.log

@?/rdbms/admin/utlirp.sql

spool off

Shutdown immediate

Startup

Spool utlrp.log

@?/rdbms/admin/utlrp.sql

Spool off

exit

Both utlirp.sql and utlrp.sql are worked fine ....Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

The problem here seems to be that sapinst parses the comments in the Oracle delivered scripts and interprets occurences of ORA- strings as errors. You could try the following (admittedly not very nice) workaround:

-> go to %ORACLE_HOME%\rdbms\admin

-> locate the file stdbody.sql

Edit the file in the following way:

-> locate these lines:


    -- around 'USERENV(c)' because passing USERENV() anything but a string
    -- literal parameter result in ORA-2003: Invalid USERENV parameter!  This

-> just replace 'ORA-2003' with something like 'xxx'

Does it work afterwards?

Best Regards,

Michael

Former Member
0 Kudos

Hello Michael Braunstein , thanks for support.

Do you think it might help? With regard to what may occur such situation?

I'm on other work now, and only in 8 hours will be able to try. We together with my colleagues have opened a message in SAP, --> 142125 / 2009 , if you can please check. Thanks again.

Regards, Sergo Beradze.

Former Member
0 Kudos

Hello,

I just had a look at the customer message and the colleague working on this case basically had the same idea. By inserting the 'spool off' command in the control.sql, all output is surpressed and sapinst will not receive this error code.

Feel free to chose the solution you like more ;-).

Best Regards,

Michael

Former Member
0 Kudos

Thanks, XXX , and error gone. Thanks again, with regards, Sergo Beradze.

Answers (1)

Answers (1)

markus_doehr2
Active Contributor
0 Kudos

Do you have exactly the same patchlevels installed on source and destination?

Markus

Former Member
0 Kudos

Hello Mr. Markus. The Oracle are identical -->

10.2.0.2 bundle 15. One are 32 second 64 .

The SAP on source system have's Basis 16 , SAP_AP 12. and also are EHP2 ERP installed,

for system copy i'm use the SR3 DVD's and use the

SAP NetWeaver 7.0 Support Release 3 --> Software Life-Cycle Options --> System Copy > Oracle> Target System --> Central System --> ABAP+JAVA

All load's on source system are doin'g, using ora_br_copy.bat and sapinst for source system (JAVA load).

Regards.

former_member603052
Contributor
0 Kudos

Hi Sergo,

Since its Win 32 to 64 , Its called heterogeneous copy.Please say am i right or not.

Thanks,

Kalyan

Former Member
0 Kudos
.Please say am i right or not

No , it's normal Homogeneous copy, only need some

scripts on and the CONTROL.SQL script. Read the SYSTEM COPY guide(best if note, in note are correct script). Regards.