Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: takaoki
  • Content: Threads
  • Order by date
  1. takaoki

    Execution plan weirdness - help

    Hi, I have run create stats for a table in my database. For example: CREATE STATISTICS stats1 ON myTable(FundID) WITH FULLSCAN (I also have a maintenance plan that updates stats with full scan for every table in the database) However, I get warnings in my execution plan that this column...
  2. takaoki

    HELP - what is wrong with this syntax?

    Hi, Keep getting this error msg: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'ON'. Msg 319, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be...
  3. takaoki

    Query plan interpretation - help needed

    Hi, Just wanting some opinions... is it better to eliminate an index SCAN (cost is 98%) with an [index SEEK (cost 15%) + key lookup (cost 15%)]? I accomplished this by adding a DESC index on one of the key lookup date fields. Logical reads also went from 30000+ to 3 by adding the sorted index...
  4. takaoki

    Indexing question

    Hi, When choosing which tables to index (by a DATE field in this case), is it better to select tables based on NUMBER of rows - OR - based on the total SIZE of the table? In this case, I'm not indexing all the tables, just ones most affected by size. This is more a practical question as...
  5. takaoki

    Is there a way to tell who did SQL Server install?

    Hi, Is there a way to find out who did a particular SQL Server installation? Thanks
  6. takaoki

    Help, job is finished, but shows as "executing"

    Help. Does anyone know why a job would finish but still show as "executing" in the "Job Activity Monitor"? The last step of the job is a "restore database" script I created. I see that the database has finished restoring as of 8:30 this morning, but it's now 11:30 and the job is still running...
  7. takaoki

    Help - need a query plan on a table function

    Hi, How can I get or simulate a query plan on a table-valued function? I get this error: Msg 2809, Level 18, State 1, Line 1 The request for procedure 'myFunction' failed because 'myFunction' is a table valued function object. Thanks!
  8. takaoki

    Selecting column names in a query

    Hi, I am using SSIS to run a stored proc. The results of the stored proc are then written to a file. The problem I am having is that I can't figure out a way to get the column names into the file from the SSIS side (another issue). So, I was thinking if I could write the query such that it...
  9. takaoki

    Send a return value from an sp to a job?

    Hello, Is there a way to send a return value from a stored procedure (which is called from a job step) back to the job? Basically, I want to be able to send a "failure" code back to the job from the stored procedure that will fail the job step. Is this possible? Thanks
  10. takaoki

    sqlcmd question

    Hi, Can I use sqlcmd to output to a "comma" (not tab) delimited file? I don't see any options to do this... Thanks
  11. takaoki

    Model database question

    Hi, Why is the Model database in Full recovery mode, and the other system databases are not? Thanks
  12. takaoki

    Backup question

    Hi, I think it is a very bad idea to place backup files in the same drive location as the data files... so why does Microsoft have "data" and "backup" folders in the same place? My question is, does anyone actually do this? Does having a nightly tape backup exclude the need for placing these...
  13. takaoki

    SQL Server 2005 security question

    How can I "lock down" a database? That is, the database has very sensitive information. But anyone who is an admin on the server can potentially add a login and map that login to the database. How do I get around this?? Thanks
  14. takaoki

    Help, can't apply SP2 update 9.00.3152

    Hi, Here's the problem. I have an instance of SQL Server 2005 running version 9.00.3068. I need to apply SP2 cumulative update 4 (version 9.00.3200). However, when I attempt to install it, all the checkboxes are effectively greyed out. I had this problem in the past. The "fix" was to apply an...
  15. takaoki

    Query question

    Hi, I have a question. Are these "equivalent" statements? Note: table "h" is defined futher down in the query, which is not shown here. This is just a snippet of the code. SELECT TOP 1 x.AsOfDate FROM myTable x WHERE x.AsOfDate < h.AsOfDate ORDER BY x.AsOfDate DESC SELECT MAX(x.AsOfDate)...
  16. takaoki

    Query performance inconsistency across servers

    I have 2 servers, presumably identical but I suspect not. One one server, a certain update statement takes about 15 minutes... on the other other server the same update never finishes. It can run for several hours without ever finishing. I ran an execution plan on the query. 35% of the cost is...
  17. takaoki

    Permissions question

    Hello, How do I give a user the very specific ability to GRANT SELECT, UPDATE, INSERT, DELETE a certain table to other users? I don't want to give any broader permissions than that. Thanks

Part and Inventory Search

Back
Top