Forum Replies Created

Viewing 15 posts - 1,156 through 1,170 (of 3,060 total)

  • RE: Does a primary key need to be unique?

    Steve.hitch (2/25/2011)


    I would like a key or index on employee and transaction date. However, the data is not unique, so I can't make them primary keys. If SQL could have...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: DELETE OPENQUERY Error

    abotha-1117340 (2/25/2011)


    I have a situation where I want to delete some records on a Oracle DB from a SQL Server DB via a linked server. The SQL command is called...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: If a database contains Fact and Dimension tables, do we call that database as datawarehouse?

    Rookie R (2/14/2011)


    I am bit confused... I know we develop OLAP using Fact and Dimension tables. Do we call the database that contains Facts and dimension tables as a datawarehouse?...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Data Model for new Financial Product Reproting in data Warehouse

    FACT tables should store data at granular level, aggregations can be done either on-the-fly or in cubes for recurrent ones.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Suggested Index With All fields?

    Stamey (2/21/2011)


    Relational Model.

    Interesting choice for a new Data Warehouse - nothing wrong about it, just interesting.

    In this particular case basic indexing should include...

    1- Unique indexes on all PK constraints on...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Index needed?

    MonsterRocks (2/21/2011)


    I have login table.. which consists the follwing columns

    user_id int autoincrement primary key

    user_name varchar(30) unique key

    password varchar(30)

    :

    while login i checks

    select * from ...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: drop temp table in dynamic SQL

    John.Liu (2/21/2011)


    PaulB-TheOneAndOnly (2/20/2011)


    I usually use syntax below...

    if exists (select * from sys.tables where name like '#mytemptable%')

    temp table is created in TEMPDB, unless you already in the TEMPDB, you have to...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Best way to set up a reporting server

    May I ask how big is the database?

    Also, may we know how much t-log gets generated per minute/hour/day?

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: fastest way to export from Oracle into textfiles

    sqlgreg (2/21/2011)


    Well, I was gonna start a new thread on the linked server issue, but whatever fiddling was done by the admins on the servers over the weekend has apparently...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Help with Stored Procedure

    diamondgm (2/20/2011)


    There will probably be people who object to the use of "WHERE IN (SELECT...)" as opposed to using joins, but I am illustrating a principle and not which manner...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: drop temp table in dynamic SQL

    I usually use syntax below...

    if exists (select * from sys.tables where name like '#mytemptable%')

    drop table #mytemptable

    create table #mytemptable(table definition as needed)

    Please replace "mytemptable" with the appropriate name.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: delete OPENQUERY only successful the second time executed

    Just to rule out most likely suspects please check...

    1- Query is written using four-parts-names.

    2- There is an unique index on target table.

    3- DTC is setup and running.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: Suggested Index With All fields?

    Please allow me to start one step before the indexing strategy.

    What DWH model are you following? is it a Star schema or is it a Relational model?

    For basic indexing,...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: fastest way to export from Oracle into textfiles

    sqlgreg (2/17/2011)


    I'm going to eat them. I find text files to be really delicious, with a bit of hot sauce.. 😛

    Oh yes... I know what you mean, they are delicious...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • RE: fastest way to export from Oracle into textfiles

    This is one of those interesting scenarios where both of us are right.

    I was right when I said "Oracle external tables are read-only -...

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Viewing 15 posts - 1,156 through 1,170 (of 3,060 total)