Forum Replies Created

Viewing 15 posts - 11,401 through 11,415 (of 13,460 total)

  • RE: Counting Specific Tables In a Database

    simply run the script. it counts the table rows,even for tables with no indexes or primary keys (heap tables).

    so you could potentially do something like this:

    UPDATE MyDBCount

    SET PrevRowCount...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Counting Specific Tables In a Database

    Michael (3/19/2009)


    There are a few hundred tables and I only need info on about 50.

    Looping through an extra 150 tables (some of which are quite large) would take too long.

    Also,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SQL Error

    SELECT INTO syntax is designed to create a table on the fly.

    i believe a linked server only allows you to add/insert/update into existing objects....not CREATE objects on the fly like...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Counting Specific Tables In a Database

    very easy, just plan it out.

    1. take any of the scripts that count rows from sysindexes. no need to filter which tables at this point.

    2. put the results in a...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Last Store procedures used or executed

    Keep at it Krishna;

    I'd like to see a default Data Manipulation Language (DML) trace automatically running all the time as well as the Data Definition Language(DDL) trace;

    just to be...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Last Store procedures used or executed

    default trace keeps track of when database objects, like tables/views/procs where created/modified or deleted.

    it does not keep track of when they were executed or accessed.

    you must create your own trace...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Verify SQL in stored procedure

    unfortunately you can't call SET PARSENAME inside a procedure...

    so you can't wrap noeld's code and put it inside a proc; maight work as dynamic SQL, but I'd have to test...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Hide Databases in SQL 2005 from other users

    it depends on the application they are connecting to;

    i think if i connect in SSMS, since i can "read" from sysdatabases, i can see all the db's ont he server...but...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Code Formatting

    i noticed if i add an 800 line block, it'll show all 800 lines; i'd rather have a scrollbar for the code in question, if possible.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Code Formatting

    seems to hate less-than and greater-than symbols:

    this line has the ampersand-LT-semicolon:

    salesMonth <=@month and YTD = 0 OR salesMonth = @month and YTD <> 0

    this is as you'd type it

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Code not displayed properly

    testing regular text vs the {code} blocks:

    with ampersand LT semicolon escapes:

    salesMonth <= @month and YTD = 0 OR salesMonth = @month and YTD <> 0

    as typed

    salesMonth 0

    salesMonth ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: speed up execution of a stored procedure

    you are suffering from "parameter sniffing"; you can search here on SSC for the suggested solutions;

    the issue is the default values for your parameters...

    since they are assigned NULL, the compiler...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: what or where is this?

    cool, glad you found it; it's probably nothing more than updating the ArcServe program to have your new sa password, or even better, create a login just for that process.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: what or where is this?

    profiler will not show much more than an attempt to login, so that won't help much.

    i think the key is to nslookup or ping 10.15.101.24

    is that the server itself, or...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Out of date statistics

    ok i put together a script i thought would identify statistics that might need to be updated...

    but when i run the results of the script, a few of the tables...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 11,401 through 11,415 (of 13,460 total)