Oracle

Responses

  1. Шинээр

  2. C# дээр Oracle – ын StoredProcedure ажиллуулах…

    public void Execute(string ConnStr, string Query)
    {
    OracleConnection conn = null;
    OracleCommand cmd = null;
    try
    {
    conn = new OracleConnection(ConnStr);
    conn.Open();
    if (conn.State.ToString().Equals(“Open”))
    {
    cmd = new OracleCommand(Query, conn);
    cmd.CommandType = CommandType.StoredProcedure;

    cmd.ExecuteNonQuery();
    conn.Close();
    }
    }
    catch (Exception ex)
    {
    throw ex;
    }
    finally
    {
    cmd = null;
    conn = null;
    }
    }

  3. hi

  4. hi

  5. hi, php code-r oracle ruu yaj holbogdoh ve?
    code-g ni tavij uguuch

  6. за удахгүй тавина аа. удсанд уучлаарай

  7. (string) Connect to the database as this username.
    * password => (string) Password associated with the username.
    * database => Either the name of the local Oracle instance, or the
    * name of the entry in tnsnames.ora to which you want to connect.
    *
    * @todo fix inconsistency between “database” used here and “dbname” use elsewhere
    * @var array
    */
    protected $_config = array(
    ‘dbname’ => null,
    ‘username’ => null,
    ‘password’ => null,
    );

    protected $_execute_mode = OCI_COMMIT_ON_SUCCESS;

    /**
    * Constructor.
    *
    * $config is an array of key/value pairs containing configuration
    * options. These options are common to most adapters:
    *
    * username => (string) Connect to the database as this username.
    * password => (string) Password associated with the username.
    * database => Either the name of the local Oracle instance, or the
    * name of the entry in tnsnames.ora to which you want to connect.
    *
    * @param array $config An array of configuration keys.
    */
    public function __construct($config)
    {
    // make sure the config array exists
    if (! is_array($config)) {
    throw new Zend_Db_Adapter_Exception(‘must pass a config array’);
    }

    // we need at least a dbname
    if (! array_key_exists(‘password’, $config) || ! array_key_exists(‘username’, $config)) {
    throw new Zend_Db_Adapter_Exception(‘config array must have at least a username and a password’);
    }

    // @todo Let this protect backward-compatibility for one release, then remove
    if (array_key_exists(‘database’, $config) || ! array_key_exists(‘dbname’, $config)) {
    $config['dbname'] = $config['database'];
    unset($config['database']);
    trigger_error(“Deprecated config key ‘database’, use ‘dbname’ instead.”, E_USER_NOTICE);
    }

    // keep the config
    $this->_config = array_merge($this->_config, (array) $config);

    // create a profiler object
    $enabled = false;
    if (array_key_exists(‘profiler’, $this->_config)) {
    $enabled = (bool) $this->_config['profiler'];
    unset($this->_config['profiler']);
    }

    $this->_profiler = new Zend_Db_Profiler($enabled);
    }

    /**
    * Creates a connection resource.
    *
    * @return void
    */
    protected function _connect()
    {
    /**
    * @todo should check resource here
    */
    if ($this->_connection) {
    return;
    }

    if (isset($this->_config['dbname'])) {
    $this->_connection = oci_connect($this->_config['username'], $this->_config['password'], $this->_config['dbname']);
    } else {
    $this->_connection = oci_connect($this->_config['username'], $this->_config['password']);
    }

    // check the connection
    if (!$this->_connection) {
    throw new Zend_Db_Adapter_Oracle_Exception(oci_error());
    }
    }

    /**
    * Returns an SQL statement for preparation.
    *
    * @param string $sql The SQL statement with placeholders.
    * @return Zend_Db_Statement_Oracle
    */
    public function prepare($sql)
    {
    $this->_connect();
    $stmt = new Zend_Db_Statement_Oracle($this, $sql);
    $stmt->setFetchMode($this->_fetchMode);
    return $stmt;
    }

    /**
    * Gets the last inserted ID.
    *
    * @param string $tableName name of table associated with sequence
    * @param string $primaryKey not used in this adapter
    * @return integer
    */
    public function lastInsertId($tableName = null, $primaryKey = null)
    {
    if (!$tableName) {
    throw new Zend_Db_Adapter_Exception(“Sequence name must be specified”);
    }
    $this->_connect();
    $data = $this->fetchCol(“SELECT $tableName.currval FROM dual”);
    return $data[0]; //we can’t fail here, right? if the sequence doesn’t exist we should fail earlier.
    }

    /**
    * Returns a list of the tables in the database.
    *
    * @return array
    */
    public function listTables()
    {
    $this->_connect();
    $data = $stmt->fetchCol(‘SELECT table_name FROM all_tables’);
    return $data;
    }

    /**
    * Returns the column descriptions for a table.
    *
    * @return array
    */
    public function describeTable($table)
    {
    $table = strtoupper($table);
    $sql = “SELECT column_name, data_type, data_length, nullable, data_default from all_tab_columns WHERE table_name=’$table’ ORDER BY column_name”;
    $result = $this->query($sql);
    while ($val = $result->fetch()) {
    $descr[$val['column_name']] = array(
    ‘name’ => $val['column_name'],
    ‘notnull’ => (bool)($val['nullable'] === ‘N’), // nullable is N when mandatory
    ‘type’ => $val['data_type'],
    ‘default’ => $val['data_default'],
    ‘length’ => $val['data_length']
    );
    }
    return $descr;
    }

    /**
    * Leave autocommit mode and begin a transaction.
    *
    * @return void
    */
    protected function _beginTransaction()
    {
    $this->_setExecuteMode(OCI_DEFAULT);
    }

    /**
    * Commit a transaction and return to autocommit mode.
    *
    */
    protected function _commit()
    {
    if (!oci_commit($this->_connection)) {
    throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
    }
    $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
    }

    /**
    * Roll back a transaction and return to autocommit mode.
    *
    * @return void
    */
    protected function _rollBack()
    {
    if (!oci_rollback($this->_connection)) {
    throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
    }
    $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
    }

    /**
    * Set the fetch mode.
    *
    * @param int $mode A fetch mode.
    * @return void
    * @todo Support FETCH_CLASS and FETCH_INTO.
    */
    public function setFetchMode($mode)
    {
    switch ($mode) {
    case Zend_Db::FETCH_NUM: // seq array
    case Zend_Db::FETCH_ASSOC: // assoc array
    case Zend_Db::FETCH_BOTH: // seq+assoc array
    case Zend_Db::FETCH_OBJ: // object
    $this->_fetchMode = $mode;
    break;
    default:
    throw new Zend_Db_Adapter_Exception(‘Invalid fetch mode specified’);
    break;
    }
    }

    /**
    * Quote a raw string.
    *
    * @param string $value Raw string
    * @return string Quoted string
    */
    protected function _quote($value)
    {
    //@todo should we throw an exception here?
    return $value;
    }

    /**
    * Quotes an identifier.
    *
    * @param string $ident The identifier.
    * @return string The quoted identifier.
    */
    public function quoteIdentifier($ident)
    {
    //@todo should we throw an exception here?
    return $ident;
    }

    /**
    * Adds an adapter-specific LIMIT clause to the SELECT statement.
    *
    * @return string
    */
    public function limit($sql, $count, $offset)
    {
    /*
    Oracle doesn’t have a LIMIT statement implementation, so we have to “emulate” it using rnum
    */
    $limit_sql = “SELECT
    zsubselect2.*
    FROM
    (
    SELECT
    rownum zrownum,
    zsubselect1.*
    FROM
    (
    “.$sql.”
    )
    zsubselect1
    )
    zsubselect2
    WHERE
    zrownum BETWEEN “.$offset.” AND “.($offset+$count).”
    “;
    return $limit_sql;
    }

    private function _setExecuteMode($mode) {
    switch($mode) {
    case OCI_COMMIT_ON_SUCCESS:
    case OCI_DEFAULT:
    case OCI_DESCRIBE_ONLY:
    $this->_execute_mode = $mode;
    break;
    default:
    throw new Zend_Db_Adapter_Exception(‘wrong execution mode specified’);
    break;
    }
    }

    public function _getExecuteMode() {
    return $this->_execute_mode;
    }
    }

  8. зөвлөхөд: http://www.google.com/codesearch

  9. Ингэхэд Oralce гээд биччихжээ

  10. get post 2-iin yalgaa n yu yum bol oo.
    tegeed bas fetch array -iin talaar delgerengui medeelel baiwal olj ugch tusaach.

  11. oracle ali hir hemjeetei bdg ve. cd-nd bagtah uu

  12. DVD – д багтах байх. 3+ GB байдаг

  13. oracle-iig haanaas oloh ve

  14. http://www.oracle.com татаж авах чөлөөтэй. бас юм аа хийхэд ч чөлөөтэй. гэвч чи өөрийн хийсэн зүйлээрээ ашиг олох тэр үед лиценз авахгүй бол асуудалд орно хэхэ

  15. Oracle Database Software-iig ni tataj avahad boloh u

  16. болно оо

  17. hi.medlegeesee huvaaltsaj baigaad chamd mash ih bayarlalaa.Oracle deer baigaa data gaa mysql ruu horvuuleh gesen yum.delphi deer boloh uu? bolvol yaaj boloh ve? bolohgui bol visual basice deer yaaj bichih be please? tuslaach

  18. шууд database хооронд бол сайн мэдэхгүй юм аа Tool байж магадгүй. Дунд нь жижиг програм бичээд уншаад бичиж болно. маш амархан. Жишээ нь: хамгийн энгийнээр нэг Grid тавиад дүүн дэрээ дата-гаа уншаад нөгөө бааз руугаа бичиж болно…

  19. hi.medlegeesee huwaaltsaj bgad bayarlalaa.oracle 9i her bol.suulgah geed tataj awch bna.barag l 1 odor boloh yum shig bna.oracle deer yaj database uusgedeg yum be.help me.jijig hemjeenii baaz uusgeh gesen yum.yaraltai hariu uguurei.

  20. Oracle сууж байхдаа датабэйс ээ суулгах уу гэж асуудаг. Default – аар нь явуулбал нэг бааз суучихна. Дараа нь суулгаж бас болно. Өөрт нь бэлэн Tool байгаа. Ер нь бага хэмжээний database – д oracle тохиромжгүй санагдсан. mssql – ээс ялгаатай нэг тал нь 1 ширхэг Database үүсгэхэд л санах ой, диск гээд л маш том зай эзэлдэг. сервер биш жирийн бидний pc дээр бол 1 – ээс их бааз бол дийлэхгүй юм шиг надад санагдсан….

  21. яаж бааз үүсгэх вэ гэдэг ээ өөрөө үзчих амархан. суулгаж дууссаны дараа all programs – д чинь ORA-*** иймэрхүү нэртэй файл үүссэн байнаа. Тэндээс уншиж байгаад л Database гэсэн рүү нь ороод явчихна. Харин бүүр эхнээсээ суулгахдаа Client, Server суулгахаа сонгодог юм шүү…

  22. Thanks.suulgah gesen zai hureltsehgui bna geed bhaar ni zarim yumaa ustgaj bna.yamar ch baisan suulgaad neg baaz uusgej uzeh gesen yumaa.

  23. амжилт :P

  24. Suulgachihsan.Toad-iig ni ch bas suulgachihlaa.yamar goy we.heden odor zuuraldwaa.baasaa uusgechihlee.ogogdloo yaj oruuldag bilee.

  25. Ura. Suulgachihsan.Toad-iig ni ch bas suulgachihlaa.yamar goy we.heden odor zuuraldwaa.baasaa uusgechihlee.ogogdloo yaj oruuldag bilee.

  26. PLSQL гэж судлана даа одоо…

  27. hi.PLSQL ene yu yum.yund heregtei bdag yum

  28. PL

  29. Яахав дээ oracle – ийн дэмждэг sql байхгүй юу. insert delete update procedure ect .. бичнэ ш дээ одоо суулгацан хүн чинь…

  30. ok.medeelel ogch baigaad thanks.baazaa uusgeed mongoloor bichih gesen chini baahan үүүүүү bolchih yum.tohirgoog ni yaj oorchloh we.

  31. бааз шинээр үүсгэж байхдаа UTF-8 гэж зааж өгдөг юм.

  32. toad 9.0 oos deesh mongol font tanidag gesen tegeed suulgah geed l bj bn.

  33. TOAD International гэж бий … гэхдээ заавал бааз дээрээ тохиргоо хийнэ бас …
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG – регистерийн
    AMERICAN_AMERICA.AL32UTF8 утга байх ёстой …

  34. ok.utgaa olgochihson.

  35. ok


Leave a response

Your response: