Forum Replies Created

Viewing 15 posts - 676 through 690 (of 907 total)

  • RE: Integrity Checks

    does you xp_sqlmaint call have a -rpt option? If so the file identified should hopefully give you some indication why the job failed. This file by default is...

  • RE: Trigger Count

    I'd use the XTYPE column in the SYSOBJECTS table, in each database. Like this

    master..sp_msforeachdb [select '?', count(*) from ?..sysobjects where xtype = 'TR']

    Gregory Larsen, DBA

    If you looking for SQL...

  • RE: Create a New Sql Server from another

    One option would be to set up a maintenance plan. The other option would be to write a script that contains a series of "backup database" commands one for...

  • RE: how do I create a table in a file group

    Try:

    Create table <table name> (....) on <filegroup>

    Hope this helps.

    Gregory Larsen, DBA

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

  • RE: Error Handling

    Have you tried to use @@ERROR

    Something like....

    insert into ......

    if @@ERROR <> 0

    print 'error in insert, continue'

    Haven't tested this, but seems like it might work.

    Gregory Larsen, DBA

    If you...

  • RE: Create a New Sql Server from another

    Another way is to do a full database backup on the source server, and a database restore on the target server. Remember to add all the logins, on the...

  • RE: Create a New Sql Server from another

    sp_detach_db, copy database files, and sp_attach_db

    Gregory Larsen, DBA

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

  • RE: select sequential number

    You could try something like this:

    use Northwind

    go

    select count(*)generated_id,a.ProductID,a.ProductName,a.SupplierID,a.CategoryID,a.QuantityPerUnit,a.UnitPrice,

    a.UnitsInStock,a.UnitsOnOrder,a.ReorderLevel,a.Discontinued

    from products a , products b

    where

    cast(100+a.ProductID as char)+a.ProductName+cast(a.SupplierID as char)+

    cast(a.CategoryID as char)+a.QuantityPerUnit+cast(a.UnitPrice as char)+

    cast(a.UnitsInStock as char)+cast(a.UnitsOnOrder as char)+cast(a.ReorderLevel as...

  • RE: Need to seperate fname and lname

    Something like

    select substring(name,1,charindex(' ',name)), substring(name,charindex(' ',name) + 1,len(name))

    Gregory Larsen, DBA

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

  • RE: executing script from file and redirecting to file

    Very close, try lower case -i, and lower case -o like this:

    isql -Sdevserver -Usa -P123YY -iC:\test.sql -oC:\a.out

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website...

  • RE: Linked servers

    I think the profiler test is a good idea. Also do you see any errors in log? Also you might try to determine if you are getting...

  • RE: Columns updated history

    Here is an example that might help you use the COLUMNS_UPDATED() bitwise function to determine the columns update.

    set nocount on

    create table my_table (a int, b int, c int, d int,...

  • RE: Renaming SQL server.

    Kind of thought PING had to do with name resolution, outside of SQLSERVER, like by a DNS server, or WINS server. Therefore I would guess you DNS server still...

  • RE: Database Set to Simple

    It is my understanding that SIMPLE still logs transaction, but it it will truncate the log when the log is 70% full or the number of log records reaches the...

  • RE: Database problem!

    What do you mean you can't open the table? What is the specific error you get when you try to truncate the table? If a select, insert, and...

Viewing 15 posts - 676 through 690 (of 907 total)