Forum Replies Created

Viewing 15 posts - 6,796 through 6,810 (of 13,460 total)

  • RE: Restore database

    are you are restoring a backup of the database as a new database?

    I believe it can take time for the operating system to find 120 gig of as-contigous-as-possible space...

    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: Issue with Database Mail

    lets do some basic diagnostics;

    does this return STARTED or something different?

    EXECUTE msdb.dbo.sysmail_help_status_sp --STARTED?

    try stopping and starting the mail service:

    EXECUTE msdb.dbo.sysmail_stop_sp;

    GO

    EXECUTE msdb.dbo.sysmail_start_sp;

    and finally, yes, you probably need to bouhce the SLQ...

    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: Inserting data into a column with different colation

    make sure all your columns are NVARCHAR, and not VARCHAR....that should resolve the conversion issue, i think.

    collation only decides how the strigns are sorted and ordered by...it does not decide...

    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: Create a field incremental counter

    my suggestion: don't store a total in the table. create a view which calculates the total on demand instead...that way it will always be accurate, and you don't need 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: Update fullname column

    if you only want to update where those three fields are not null, then the WHERE statement would be with AND isntead of OR:

    ...

    WHERE A.lastname IS NOT NULL

    ...

    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: Covert auto ID to file name

    here's an example of two different techniques that do the same thing:

    /*ANewIDDiffID

    0000012300000123

    0000005600000056

    0123456801234568

    */

    With MySampleData (TheID)

    AS

    (SELECT 123 UNION ALL

    SELECT 56 UNION ALL

    SELECT 1234568 )

    SELECT

    ...

    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: Update fullname column

    i would simply handle each field with the ISNULL FUNCTION instead:

    UPDATE A

    SET fullname= RTRIM(LTRIM(ISNULL(A.lastname,'')))

    + ',...

    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: Insert data with select statement is very slow.

    did you make any more progress on this?

    I'd love to hear if you added clustered indexes and if they made a difference.

    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: Issue with Database Mail

    (: Hakuna Matata 🙂 (9/7/2011)


    Tried all the 4 options, Everything is working fine. Tried sending a test mail. No entry in the Database Mail logs.

    does this return any results fromt...

    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: Issue with Database Mail

    check your procedure that is supposed to be sending stuff;

    if it has some sort of condition, and the condition is not met, the mail code might not be called at...

    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: Sequence creation

    it's not easy, and it still requires an identity() column to do it;

    I answered a similar post recently here:

    http://www.sqlservercentral.com/Forums/Topic1162428-1292-1.aspx#bm1162458

    check out that post and see if the example there is what...

    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: Convert UTC datetime to LocalTime Zone.

    I think the only way to handle historical data with DST is with a TallyCalendar Table, where you join dates against the it to get the Daylight Savingstime Offset.

    In the...

    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: Insert data with select statement is very slow.

    also the index on [Repl_AxWalton].[WF].[WFInventoryAllocation]: the statsitics on it made it scan a lot more rows: it was estimated @ 215,560 but it actually scanned 431,012,220 rows.

    i'd rebuild the index...

    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: Insert data with select statement is very slow.

    i see lots of issues; many , many of your tables are HEAPs, meaning without a primary key and a nice clustered index to access them, they will slow things...

    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: Convert UTC datetime to LocalTime Zone.

    yeah i should have thought like you did about end-user timezone isntead of server timezone.

    i did a bit of research, and there's a lot of places that are on half...

    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 - 6,796 through 6,810 (of 13,460 total)