BDriver.cxx (9b5730f6) | BDriver.cxx (24c56ab9) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 30 unchanged lines hidden (view full) --- 39#include <unotools/localfilehelper.hxx> 40#include "resource/adabas_res.hrc" 41#include "resource/sharedresources.hxx" 42 43 44#include <memory> 45#include <sys/stat.h> 46 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 30 unchanged lines hidden (view full) --- 39#include <unotools/localfilehelper.hxx> 40#include "resource/adabas_res.hrc" 41#include "resource/sharedresources.hxx" 42 43 44#include <memory> 45#include <sys/stat.h> 46 |
47inline SvStream& operator<<( SvStream& s, const rtl::OString r) { return (s << r.getStr()); } 48inline SvStream& operator<<( SvStream& s, const rtl::OUString r) { return (s << ::rtl::OUStringToOString(r,gsl_getSystemTextEncoding())); } 49 |
|
47#if defined(UNX) 48const char sNewLine = '\012'; 49#else 50const char sNewLine[] = "\015\012"; // \015\012 and not \n 51#endif 52#define ADABAS_DB_11 "11.02.00" 53#define ADABAS_KERNEL_11 "11.02" 54#define ADABAS_DB_12 "12.01.00" --- 899 unchanged lines hidden (view full) --- 954 sExt.AssignAscii(".sql"); 955 956 String sWorkUrl(m_sDbWorkURL); 957 ::utl::TempFile aInitFile(String::CreateFromAscii("Init"),&sExt,&sWorkUrl); 958 aInitFile.EnableKillingFile(); 959 { 960 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(aInitFile.GetURL(),STREAM_WRITE) ); 961 (*pFileStream) << "ALTER USER \"" | 50#if defined(UNX) 51const char sNewLine = '\012'; 52#else 53const char sNewLine[] = "\015\012"; // \015\012 and not \n 54#endif 55#define ADABAS_DB_11 "11.02.00" 56#define ADABAS_KERNEL_11 "11.02" 57#define ADABAS_DB_12 "12.01.00" --- 899 unchanged lines hidden (view full) --- 957 sExt.AssignAscii(".sql"); 958 959 String sWorkUrl(m_sDbWorkURL); 960 ::utl::TempFile aInitFile(String::CreateFromAscii("Init"),&sExt,&sWorkUrl); 961 aInitFile.EnableKillingFile(); 962 { 963 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(aInitFile.GetURL(),STREAM_WRITE) ); 964 (*pFileStream) << "ALTER USER \"" |
962 << ::rtl::OString(_aInfo.sSysUser,_aInfo.sSysUser.getLength(),gsl_getSystemTextEncoding()) | 965 << _aInfo.sSysUser |
963 << "\" NOT EXCLUSIVE " 964 << sNewLine; 965 pFileStream->Flush(); 966 } 967 { // just to get sure that the tempfile still lives 968 sTemp.Erase(); 969 LocalFileHelper::ConvertURLToPhysicalName(aInitFile.GetURL(),sTemp); 970 LoadBatch(_aInfo.sDBName,_aInfo.sSysUser,_aInfo.sSysPassword,sTemp); --- 13 unchanged lines hidden (view full) --- 984 { 985 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 986 pFileStream->Seek(STREAM_SEEK_TO_END); 987 (*pFileStream) << "x_param" 988#if defined(WNT) 989 << ".exe" 990#endif 991 << " -d " | 966 << "\" NOT EXCLUSIVE " 967 << sNewLine; 968 pFileStream->Flush(); 969 } 970 { // just to get sure that the tempfile still lives 971 sTemp.Erase(); 972 LocalFileHelper::ConvertURLToPhysicalName(aInitFile.GetURL(),sTemp); 973 LoadBatch(_aInfo.sDBName,_aInfo.sSysUser,_aInfo.sSysPassword,sTemp); --- 13 unchanged lines hidden (view full) --- 987 { 988 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 989 pFileStream->Seek(STREAM_SEEK_TO_END); 990 (*pFileStream) << "x_param" 991#if defined(WNT) 992 << ".exe" 993#endif 994 << " -d " |
992 << ::rtl::OString(_DBNAME,_DBNAME.getLength(),gsl_getSystemTextEncoding()) | 995 << _DBNAME |
993 << " -u " | 996 << " -u " |
994 << ::rtl::OString(_USR,_USR.getLength(),gsl_getSystemTextEncoding()) | 997 << _USR |
995 << "," | 998 << "," |
996 << ::rtl::OString(_PWD,_PWD.getLength(),gsl_getSystemTextEncoding()) | 999 << _PWD |
997 << " " | 1000 << " " |
998 << ::rtl::OString(_CMD,_CMD.getLength(),gsl_getSystemTextEncoding()) | 1001 << _CMD |
999#if defined(WNT) 1000#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1001 << " >> %DBWORK%\\create.log 2>&1" 1002#endif 1003#else 1004#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1005 << " >> /tmp/kstart.log" 1006#else --- 185 unchanged lines hidden (view full) --- 1192 pFileStream->Seek(STREAM_SEEK_TO_END); 1193 (*pFileStream) << 1194#if defined(WNT) 1195 "xutil.exe" 1196#else 1197 "utility" 1198#endif 1199 << " -u " | 1002#if defined(WNT) 1003#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1004 << " >> %DBWORK%\\create.log 2>&1" 1005#endif 1006#else 1007#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1008 << " >> /tmp/kstart.log" 1009#else --- 185 unchanged lines hidden (view full) --- 1195 pFileStream->Seek(STREAM_SEEK_TO_END); 1196 (*pFileStream) << 1197#if defined(WNT) 1198 "xutil.exe" 1199#else 1200 "utility" 1201#endif 1202 << " -u " |
1200 << ::rtl::OString(_USRNAME,_USRNAME.getLength(),gsl_getSystemTextEncoding()) | 1203 << _USRNAME |
1201 << "," | 1204 << "," |
1202 << ::rtl::OString(_USRPWD,_USRPWD.getLength(),gsl_getSystemTextEncoding()) | 1205 << _USRPWD |
1203 << " -d " | 1206 << " -d " |
1204 << ::rtl::OString(_DBNAME,_DBNAME.getLength(),gsl_getSystemTextEncoding()) | 1207 << _DBNAME |
1205 << " " | 1208 << " " |
1206 << ::rtl::OString(_rParam,_rParam.getLength(),gsl_getSystemTextEncoding()) | 1209 << _rParam |
1207 << " > " | 1210 << " > " |
1208 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1211 << sPhysicalPath |
1209 << " 2>&1" 1210 << sNewLine; 1211 pFileStream->Flush(); 1212 } 1213 1214 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1215#if OSL_DEBUG_LEVEL > 0 1216 OProcess::TProcessError eError = --- 26 unchanged lines hidden (view full) --- 1243 { 1244 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1245 pFileStream->Seek(STREAM_SEEK_TO_END); 1246 (*pFileStream) << "xload" 1247#if defined(WNT) 1248 << ".exe" 1249#endif 1250 << " -d " | 1212 << " 2>&1" 1213 << sNewLine; 1214 pFileStream->Flush(); 1215 } 1216 1217 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1218#if OSL_DEBUG_LEVEL > 0 1219 OProcess::TProcessError eError = --- 26 unchanged lines hidden (view full) --- 1246 { 1247 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1248 pFileStream->Seek(STREAM_SEEK_TO_END); 1249 (*pFileStream) << "xload" 1250#if defined(WNT) 1251 << ".exe" 1252#endif 1253 << " -d " |
1251 << ::rtl::OString(sDBName,sDBName.getLength(),gsl_getSystemTextEncoding()) | 1254 << sDBName |
1252 << " -u " | 1255 << " -u " |
1253 << ::rtl::OString(_rUSR,_rUSR.getLength(),gsl_getSystemTextEncoding()) | 1256 << _rUSR |
1254 << "," | 1257 << "," |
1255 << ::rtl::OString(_rPWD,_rPWD.getLength(),gsl_getSystemTextEncoding()); | 1258 << _rPWD; |
1256 1257 if ( !isKernelVersion(CURRENT_DB_VERSION) ) 1258 (*pFileStream) << " -S adabas -b "; 1259 else 1260 (*pFileStream) << " -S NATIVE -b "; 1261 | 1259 1260 if ( !isKernelVersion(CURRENT_DB_VERSION) ) 1261 (*pFileStream) << " -S adabas -b "; 1262 else 1263 (*pFileStream) << " -S NATIVE -b "; 1264 |
1262 (*pFileStream) << ::rtl::OString(_rBatch,_rBatch.getLength(),gsl_getSystemTextEncoding()) | 1265 (*pFileStream) << _rBatch |
1263 << " > " | 1266 << " > " |
1264 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1267 << sPhysicalPath |
1265 << " 2>&1" 1266 << sNewLine; 1267 1268 pFileStream->Flush(); 1269 } 1270 1271 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1272#if OSL_DEBUG_LEVEL > 0 --- 100 unchanged lines hidden (view full) --- 1373 (*pFileStream) << "* mirror devspaces:\n"; 1374 (*pFileStream) << "n\n"; 1375 (*pFileStream) << "if $rc <> 0 then stop\n"; 1376 (*pFileStream) << "*--- device description ---\n"; 1377 (*pFileStream) << "* sys devspace name:\n"; 1378 { 1379 String sTemp; 1380 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sSysDevSpace,sTemp); | 1268 << " 2>&1" 1269 << sNewLine; 1270 1271 pFileStream->Flush(); 1272 } 1273 1274 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1275#if OSL_DEBUG_LEVEL > 0 --- 100 unchanged lines hidden (view full) --- 1376 (*pFileStream) << "* mirror devspaces:\n"; 1377 (*pFileStream) << "n\n"; 1378 (*pFileStream) << "if $rc <> 0 then stop\n"; 1379 (*pFileStream) << "*--- device description ---\n"; 1380 (*pFileStream) << "* sys devspace name:\n"; 1381 { 1382 String sTemp; 1383 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sSysDevSpace,sTemp); |
1381 (*pFileStream) << ::rtl::OString(sTemp.GetBuffer(),sTemp.Len(),gsl_getSystemTextEncoding()); | 1384 (*pFileStream) << sTemp; |
1382 } 1383 (*pFileStream) << "\n* log devspace size:\n"; 1384 (*pFileStream) << ::rtl::OString::valueOf(_aDBInfo.nLogSize); 1385 (*pFileStream) << "\n* log devspace name:\n"; 1386 { 1387 String sTemp; 1388 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sTransLogName,sTemp); | 1385 } 1386 (*pFileStream) << "\n* log devspace size:\n"; 1387 (*pFileStream) << ::rtl::OString::valueOf(_aDBInfo.nLogSize); 1388 (*pFileStream) << "\n* log devspace name:\n"; 1389 { 1390 String sTemp; 1391 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sTransLogName,sTemp); |
1389 (*pFileStream) << ::rtl::OString(sTemp.GetBuffer(),sTemp.Len(),gsl_getSystemTextEncoding()); | 1392 (*pFileStream) << sTemp; |
1390 } 1391 (*pFileStream) << "\n* data devspace size:\n"; 1392 (*pFileStream) << ::rtl::OString::valueOf(_aDBInfo.nDataSize); 1393 (*pFileStream) << "\n* data devspace name:\n"; 1394 { 1395 String sTemp; 1396 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sDataDevName,sTemp); | 1393 } 1394 (*pFileStream) << "\n* data devspace size:\n"; 1395 (*pFileStream) << ::rtl::OString::valueOf(_aDBInfo.nDataSize); 1396 (*pFileStream) << "\n* data devspace name:\n"; 1397 { 1398 String sTemp; 1399 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sDataDevName,sTemp); |
1397 (*pFileStream) << ::rtl::OString(sTemp.GetBuffer(),sTemp.Len(),gsl_getSystemTextEncoding()); | 1400 (*pFileStream) << sTemp; |
1398 } 1399 1400 (*pFileStream) << "\n* END INIT CONFIG\n"; 1401 (*pFileStream) << "if $rc <> 0 then stop\n"; 1402 if(_aDBInfo.bRestoreDatabase) 1403 { 1404 (*pFileStream) << "RESTORE DATA QUICK FROM '"; 1405 { 1406 String sTemp; 1407 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sBackupFile,sTemp); | 1401 } 1402 1403 (*pFileStream) << "\n* END INIT CONFIG\n"; 1404 (*pFileStream) << "if $rc <> 0 then stop\n"; 1405 if(_aDBInfo.bRestoreDatabase) 1406 { 1407 (*pFileStream) << "RESTORE DATA QUICK FROM '"; 1408 { 1409 String sTemp; 1410 LocalFileHelper::ConvertURLToPhysicalName(_aDBInfo.sBackupFile,sTemp); |
1408 (*pFileStream) << ::rtl::OString(sTemp.GetBuffer(),sTemp.Len(),gsl_getSystemTextEncoding()); | 1411 (*pFileStream) << sTemp; |
1409 } 1410 (*pFileStream) << "' BLOCKSIZE 8\n"; 1411 (*pFileStream) << "if $rc <> 0 then stop\n"; 1412 (*pFileStream) << "RESTART\n"; 1413 1414 } 1415 else 1416 { 1417 (*pFileStream) << "ACTIVATE SERVERDB SYSDBA \""; | 1412 } 1413 (*pFileStream) << "' BLOCKSIZE 8\n"; 1414 (*pFileStream) << "if $rc <> 0 then stop\n"; 1415 (*pFileStream) << "RESTART\n"; 1416 1417 } 1418 else 1419 { 1420 (*pFileStream) << "ACTIVATE SERVERDB SYSDBA \""; |
1418 (*pFileStream) << ::rtl::OString(_aDBInfo.sSysUser,_aDBInfo.sSysUser.getLength(),gsl_getSystemTextEncoding()); | 1421 (*pFileStream) << _aDBInfo.sSysUser; |
1419 (*pFileStream) << "\" PASSWORD \""; | 1422 (*pFileStream) << "\" PASSWORD \""; |
1420 (*pFileStream) << ::rtl::OString(_aDBInfo.sSysPassword,_aDBInfo.sSysPassword.getLength(),gsl_getSystemTextEncoding()); | 1423 (*pFileStream) << _aDBInfo.sSysPassword; |
1421 (*pFileStream) << "\"\n"; 1422 } 1423 (*pFileStream) << "if $rc <> 0 then stop\n"; 1424 (*pFileStream) << "exit\n"; 1425 } 1426 return aInitFile.GetURL(); 1427} 1428// ----------------------------------------------------------------------------- --- 7 unchanged lines hidden (view full) --- 1436 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1437 pFileStream->Seek(STREAM_SEEK_TO_END); 1438 1439 (*pFileStream) << "x_cons" 1440#if defined(WNT) 1441 << ".exe" 1442#endif 1443 << " " | 1424 (*pFileStream) << "\"\n"; 1425 } 1426 (*pFileStream) << "if $rc <> 0 then stop\n"; 1427 (*pFileStream) << "exit\n"; 1428 } 1429 return aInitFile.GetURL(); 1430} 1431// ----------------------------------------------------------------------------- --- 7 unchanged lines hidden (view full) --- 1439 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1440 pFileStream->Seek(STREAM_SEEK_TO_END); 1441 1442 (*pFileStream) << "x_cons" 1443#if defined(WNT) 1444 << ".exe" 1445#endif 1446 << " " |
1444 << ::rtl::OString(sDBName,sDBName.getLength(),gsl_getSystemTextEncoding()) | 1447 << sDBName |
1445 << " SHOW " 1446 << _ACTION 1447 << " > " | 1448 << " SHOW " 1449 << _ACTION 1450 << " > " |
1448 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1451 << sPhysicalPath |
1449 << sNewLine; 1450 pFileStream->Flush(); 1451 } 1452 1453 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1454 aApp.execute( (OProcess::TProcessOption)(OProcess::TOption_Hidden | OProcess::TOption_Wait)); 1455#if OSL_DEBUG_LEVEL < 2 1456 if(UCBContentHelper::Exists(sCommandFile)) --- 62 unchanged lines hidden (view full) --- 1519 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1520 pFileStream->Seek(STREAM_SEEK_TO_END); 1521 1522 (*pFileStream) << "getparam" 1523#if defined(WNT) 1524 << ".exe" 1525#endif 1526 << " " | 1452 << sNewLine; 1453 pFileStream->Flush(); 1454 } 1455 1456 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1457 aApp.execute( (OProcess::TProcessOption)(OProcess::TOption_Hidden | OProcess::TOption_Wait)); 1458#if OSL_DEBUG_LEVEL < 2 1459 if(UCBContentHelper::Exists(sCommandFile)) --- 62 unchanged lines hidden (view full) --- 1522 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1523 pFileStream->Seek(STREAM_SEEK_TO_END); 1524 1525 (*pFileStream) << "getparam" 1526#if defined(WNT) 1527 << ".exe" 1528#endif 1529 << " " |
1527 << ::rtl::OString(sDBName,sDBName.getLength(),gsl_getSystemTextEncoding()) | 1530 << sDBName |
1528 << " KERNELVERSION > " | 1531 << " KERNELVERSION > " |
1529 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1532 << sPhysicalPath |
1530 << sNewLine; 1531 } 1532 1533 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1534 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1535#if OSL_DEBUG_LEVEL < 2 1536 if(UCBContentHelper::Exists(sCommandFile)) 1537 UCBContentHelper::Kill(sCommandFile); --- 31 unchanged lines hidden (view full) --- 1569 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1570 pFileStream->Seek(STREAM_SEEK_TO_END); 1571 1572 (*pFileStream) << "getparam" 1573#if defined(WNT) 1574 << ".exe" 1575#endif 1576 << " " | 1533 << sNewLine; 1534 } 1535 1536 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1537 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1538#if OSL_DEBUG_LEVEL < 2 1539 if(UCBContentHelper::Exists(sCommandFile)) 1540 UCBContentHelper::Kill(sCommandFile); --- 31 unchanged lines hidden (view full) --- 1572 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1573 pFileStream->Seek(STREAM_SEEK_TO_END); 1574 1575 (*pFileStream) << "getparam" 1576#if defined(WNT) 1577 << ".exe" 1578#endif 1579 << " " |
1577 << ::rtl::OString(sDBName,sDBName.getLength(),gsl_getSystemTextEncoding()) | 1580 << sDBName |
1578 << " DATA_CACHE_PAGES > " | 1581 << " DATA_CACHE_PAGES > " |
1579 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1582 << sPhysicalPath |
1580 << sNewLine; 1581 } 1582 1583 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1584 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1585#if OSL_DEBUG_LEVEL < 2 1586 if(UCBContentHelper::Exists(sCommandFile)) 1587 UCBContentHelper::Kill(sCommandFile); --- 28 unchanged lines hidden (view full) --- 1616 1617 String sCommandFile = generateInitFile(); 1618 { 1619 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1620 pFileStream->Seek(STREAM_SEEK_TO_END); 1621 1622 (*pFileStream) << "dbversion" 1623 << " > " | 1583 << sNewLine; 1584 } 1585 1586 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1587 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1588#if OSL_DEBUG_LEVEL < 2 1589 if(UCBContentHelper::Exists(sCommandFile)) 1590 UCBContentHelper::Kill(sCommandFile); --- 28 unchanged lines hidden (view full) --- 1619 1620 String sCommandFile = generateInitFile(); 1621 { 1622 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1623 pFileStream->Seek(STREAM_SEEK_TO_END); 1624 1625 (*pFileStream) << "dbversion" 1626 << " > " |
1624 << ::rtl::OString(sPhysicalPath.GetBuffer(),sPhysicalPath.Len(),gsl_getSystemTextEncoding()) | 1627 << sPhysicalPath |
1625 << sNewLine; 1626 } 1627 1628 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1629 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1630#if OSL_DEBUG_LEVEL < 2 1631 if(UCBContentHelper::Exists(sCommandFile)) 1632 UCBContentHelper::Kill(sCommandFile); --- 93 unchanged lines hidden (view full) --- 1726 1727#else // UNX 1728 String sCommandFile = generateInitFile(); 1729 { 1730 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1731 pFileStream->Seek(STREAM_SEEK_TO_END); 1732 (*pFileStream) << "x_dbinst" 1733 << " -d " | 1628 << sNewLine; 1629 } 1630 1631 OProcess aApp(sCommandFile ,m_sDbWorkURL); 1632 aApp.execute( (OProcess::TProcessOption)OPROCESS_ADABAS); 1633#if OSL_DEBUG_LEVEL < 2 1634 if(UCBContentHelper::Exists(sCommandFile)) 1635 UCBContentHelper::Kill(sCommandFile); --- 93 unchanged lines hidden (view full) --- 1729 1730#else // UNX 1731 String sCommandFile = generateInitFile(); 1732 { 1733 ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); 1734 pFileStream->Seek(STREAM_SEEK_TO_END); 1735 (*pFileStream) << "x_dbinst" 1736 << " -d " |
1734 << ::rtl::OString(_aInfo.sDBName,_aInfo.sDBName.getLength(),gsl_getSystemTextEncoding()) | 1737 << _aInfo.sDBName |
1735 << " -u " | 1738 << " -u " |
1736 << ::rtl::OString(_aInfo.sSysUser,_aInfo.sSysUser.getLength(),gsl_getSystemTextEncoding()) | 1739 << _aInfo.sSysUser |
1737 << "," | 1740 << "," |
1738 << ::rtl::OString(_aInfo.sSysPassword,_aInfo.sSysPassword.getLength(),gsl_getSystemTextEncoding()) | 1741 << _aInfo.sSysPassword |
1739 << " -w " | 1742 << " -w " |
1740 << ::rtl::OString(_aInfo.sDomainPassword,_aInfo.sDomainPassword.getLength(),gsl_getSystemTextEncoding()) | 1743 << _aInfo.sDomainPassword |
1741 << " -b "; 1742 1743 if ( isKernelVersion(ADABAS_KERNEL_11) ) 1744 (*pFileStream) << "-i all"; 1745 (*pFileStream) 1746#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1747 << " >> /tmp/kstart.log" 1748#else --- 67 unchanged lines hidden --- | 1744 << " -b "; 1745 1746 if ( isKernelVersion(ADABAS_KERNEL_11) ) 1747 (*pFileStream) << "-i all"; 1748 (*pFileStream) 1749#if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) 1750 << " >> /tmp/kstart.log" 1751#else --- 67 unchanged lines hidden --- |