Forum Replies Created

Viewing 15 posts - 871 through 885 (of 907 total)

  • RE: Create a table script with code

    Personally I would just run profile against my own personal copy of SQL Server, and take the default trace definitions. This should show you what EM does. Just...

  • RE: Create a table script with code

    Oh now I get it. If you start profiler and then you generate a script via EM you might get an idea how EM does it.

    -------------------------

    Gregory Larsen, DBA

    If you...

  • RE: Create a table script with code

    You will want to build a variable that holds your TSQL command and then execute that command. Here are is a really simple examples:

    declare @cmd char(100)

    set @cmd = 'create...

  • RE: Question about Rollup

    What you are getting is a subtotal first for each page within a specific termnum and username, then another sub_total for a each username, and finally a grand total for...

  • RE: Restoring last file with NoRecovery

    Try this out....

    RESTORE DATABASE <yourdatbase> WITH RECOVERY

    -------------------------

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: advanced sorting

    Here is an example that might help. This example brings back the most recient sales record for each store for the sales table in the pubs database:

    use pubs

    select * from...

  • RE: Copy SPs between databases

    I almost always generate the script via EM, occassionally I user QA, on the source server, and then connect to the target server via QA and the generated script.

    -------------------------

    Gregory Larsen,...

  • RE: Cross Tab Query?

    I'm not sure exactly what you want to do, but here is a CROSS-TAB example I have. Now this example does not work when data values are missing for...

  • RE: SQL SERVER 2000 mail

    First you must set up SQL mail or use the CDNTS object to send email.

    Then you would build a SQL Agent job that runs once a day. ...

  • RE: Rows in Table

    Here is a script that returns record counts for every table in every database on your server. From this you should get some idea how to do what you...

  • RE: Starting Performance Monitor via batch

    That is kind of what I figured. Hopefully there will be something, someday.....

    -------------------------

    Greg Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Starting Performance Monitor via batch

    Hummmm......

    What I really want is to start my counter logs everytime the machine reboot, or everytime they stop running.

    Well the scheduling feature help start my counter logs as I described...

  • RE: Line numbers in Query Analyzer

    Hey I like that double click on the error message trick to identify where the sql code starts to go south.....

    -------------------------

    Greg Larsen, DBA

    If you looking for SQL Server Examples check...

  • RE: Can't Backup MSDB!!!

    Does your box where you where performing the restore have access to that network share? Does that backup on the network share exist?

    If so, one option might be to...

  • RE: Line numbers in Query Analyzer

    Guess having line numbers would be nice, but at least there is a way to get line numbers.

    Also remember. If you have a script in QA and it...

Viewing 15 posts - 871 through 885 (of 907 total)