Forum Replies Created

Viewing 15 posts - 12,256 through 12,270 (of 13,469 total)

  • RE: batch file for non sql user

    if you are SP2 on your 2005 instance, you could use a logon trigger:

    from some ms technote:

    In SQL Server 2005 Service Pack 2, there is a new feature for Logon

    Triggers....

  • RE: Dynamic SQL to set column default value to Char(1)

    the Y should be surrounded with two single quotes, not a double quote....

    a double quote implies a column name:

    set @sql =

    N'ALTER TABLE ' + @table_name + ' ADD "Testcolumn"...

  • RE: Convert RTF data

    My old link from 2005 is broken.... I'll re-find the solution and update.

    for a single field, this still works fin on my server:

    create function dbo.RTF2TXT(@in varchar(8000)) RETURNS varchar(8000) AS...

  • RE: Working with a TEXT column in a trigger

    does it HAVE to be done instantly in a trigger?

    how about a scheduled job that runs periodically(or is queued based on the trigger you are building)

    in that case, you could...

  • RE: put value into foreign key table

    pointing out the obvious here, but this might help:

    the book must exist first in your dbo.books table.

    after it has been added, you can realte the book to one or more...

  • RE: SQL 2000 Database without name

    --create database [ ] --example where i created a badly named database

    select dbid,'[' + name + ']' from master.dbo.sysdatabases

    results:

    1 [master]

    2 ...

  • RE: SQL 2000 Database without name

    what was the results of the query i posted?

    was it 'No Name Database' literally?

    did you try drop database [No Name Database]?

  • RE: CREATE TABLE is creating System tables

    somebody ran this command:

    --Turn system object marking on

    EXEC master.dbo.sp_MS_upd_sysobj_category 1

    after that is run, all commands that create objects in SQL 2000 are system objects. this is fine if you were...

  • RE: SQL 2000 Database without name

    just tested it:

    create database [ ]

    drop database [ ]

    the above works..

    create database [ ]

    Server: Msg 1038, Level 15, State 3, Line 1

    Cannot use empty object or column names. Use a...

  • RE: SQL 2000 Database without name

    did you try this:

    select'[' + name + ']' from master.dbo.sysdatabases

    and then trying to drop the database in quesiton, including the brackets?

  • RE: Deleting users from sys.sysusers table in MS 2005

    i think your stuck with simply generating the statements as a batch, and then running them:

    like this:

    select'exec sp_dropuser '''+ name + '''' as SQLSTMT, * from sys.sysusers where uid...

  • RE: Proc Plans question

    dunno if this helps; I've used this query in the past:

    select db_name(dbid),object_name(x.objid),* from (

    select * from syscacheobjects) x

    in an article here on SSC, i read that the columns pagesused...

  • RE: Script to list ports

    here you g; this works for both 2000 and 2005, you have to run this in each instance:

    typical results:

    ServerName ...

  • RE: Object

    double check the table...it's problebly owned by a non dbo user...

    so the table is referenced by select * from lesterlogin.lester, and not dbo.lester.

    since sp_help doesn't like the owner name in...

  • RE: how to remove numbers from strings?

    My Dev Server for testing:

    Windows 2000 Advanced Server SP4

    1 Gig ram ...

Viewing 15 posts - 12,256 through 12,270 (of 13,469 total)