Forum Replies Created

Viewing 15 posts - 5,821 through 5,835 (of 13,460 total)

  • RE: how to shrink temp db

    tempdb is recreated every time the server is stopped and started.

    the only way to reclaim the space (as far as i know) is to stop and start the service again.

    something...

    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 and binary numbers

    JamesX (3/9/2012)


    I would if i could, but the tables are built by a program that was written from the manufacturs of the mainframe, each night it rebuilds the tables and...

    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: DMV that stores T-SQL Statements that have been executed

    i believe this is only items that have a chached plan that was recently used; if the command is not in this, you'd have to add a trace to capture...

    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: Can anyone tell me free tools for dba?

    Jeff Moden (3/9/2012)


    My favorite of all time free tools... GOOGLE.

    kewl! where can i find that? can you send it to me via email?

    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: Need help to query a non-normalized database

    this one loks so interesting, but I'm not able to take the time to convert the data in the screenshots into tables myself.

    can you post a few sample rows of...

    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: Changing the auto-number/incremented value (not setting it back to 1)

    set the value to 39167687

    the next value inserted will be 39167688.

    proof of concept:

    CREATE TABLE MyTable(ID int identity(1,1) not null primary key,someval varchar(30))

    insert into MyTable SELECT ('normal')

    insert into MyTable SELECT ('normal...

    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: Stored procedure that won't cache

    one piece of it is a catch all query, right?

    And @SyCampusID = Case @SyCampusID When 0 Then 0 Else SyCampus.SyCampusID End

    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: How to write a query to pick up only duplicated records like this?

    to see them all, i'd use row_number:

    select row_number() over (PARTITION BY name, description ORDER BY code, name, description) As RW,

    code, name, description

    FROM YOURTABLE

    from that same query, the ones with...

    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: Programmatically copy stored procedure to another db

    stick with dynamic sql;

    something like this seems to work for me:

    declare

    @isql varchar(max),

    @dbname varchar(64)

    SET @dbname = 'TargetDatabase'

    declare c1 cursor for

    SELECT modz.definition

    FROM sys.sql_modules modz

    LEFT OUTER JOIN sys.objects objz

    ...

    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: to run sp_who2

    to see all users, you need to grant view server state permissions.

    grant VIEW SERVER STATE to TheRightRole;

    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: view which has select * won't pick up the new columns

    also, you'd get an error if you try to use * and also schemabind a view:

    CREATE VIEW v_YOURTABLE

    WITH SCHEMABINDING

    AS

    SELECT * FROM YOURTABLE

    Msg 1054, Level 15, State 6, Procedure...

    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: view which has select * won't pick up the new columns

    yes.

    if the view is not schema bound, if you created the view with select *...that gets compiled to a select featuring the actual columns at the time of creation.

    you can...

    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: NO SQL Server components should be installed on OS drive (C drive)

    Agreeing with Elliot here;

    i've seen numerous posts here requesitng the same thing.

    AFAIK the biniaries that are the core service and stuff must be installed on the %systemdrive%, with no...

    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: StDev for a set of column in each row

    conceptually, i understand now; it'd a STDEV of the 6 values, right?

    if you can provide a set of commands for some sample data

    CREATE TABLE ...

    and also

    INSERT INTO...

    we could show...

    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: StDev for a set of column in each row

    the SQL server function STDEV takes a column name;

    it sounds like you want the STDEV of 6 columns in a specific row, or a

    all values ?

    if it's the 6 columns...

    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 - 5,821 through 5,835 (of 13,460 total)