Forum Replies Created

Viewing 15 posts - 691 through 705 (of 907 total)

  • RE: Alert when object is added

    Have you checked out Schema Alert by Lumigent (http://www.lumigent.com

    )? Also you could periodically run the following: against each of your databases

    select * from sysobjects where crdate >...

    Gregory A. Larsen, MVP

  • RE: Linked servers

    This is great it worked.

    This leads me to think (a very dangerous thing to do) that the login you originally mapped your SQL Server Agent account to, might...

    Gregory A. Larsen, MVP

  • RE: Linked servers

    Run sp_helplinkedsrvlogin and review the output. Verify that your server A login, maps to the correct Remote Server login.

    You might try to logon to Server A using your SQL...

    Gregory A. Larsen, MVP

  • RE: Linked servers

    You need to review what logins have you mapped from Server A to Server B. Is the SQL Server Agent login on Server A mapped? I suspect that...

    Gregory A. Larsen, MVP

  • RE: Remote Backup command in SQL Server 7.0

    I'm guessing your server does not have access to the UNC name. Check to make sure the service accounts (MSSQLSERVER and SQL SERVER AGENT) have access to the network...

    Gregory A. Larsen, MVP

  • RE: Time Zone Conversion

    Is this what you are looking for?

    create table mytable (time text, mydate text)

    insert into mytable values('00:10:10','20021007')

    select * from mytable

    DECLARE @TIME CHAR(8)

    declare @MYDATE CHAR(8)

    SELECT @TIME=TIME, @MYDATE = MYDATE FROM MYTABLE

    DECLARE @MY_CENTRAL_TIME...

    Gregory A. Larsen, MVP

  • RE: Remote Backup command in SQL Server 7.0

    I would use a full UNC name. Also you local machine will need access to that UNC name. Here is how to cerate a backup device:

    sp_addumpdevice 'disk','<device name>','\\<machinename>\<directory>\bckup...

    Gregory A. Larsen, MVP

  • RE: Subtracting From Time only

    The dateadd function requires a datetime or smalldatetime date type arguement, and you passed it a text datatype. Try something like this.

    create table mytable (time text)

    insert into mytable values('10:10:10')

    select...

    Gregory A. Larsen, MVP

  • RE: Move large number of indexes to a new file grp.

    I'd write dynamic sql to do this. I would process through SYSINDEXES and use the "PRINT" statement to build the appropriate T-SQL statements to move the indexes.

    Gregory Larsen, DBA

    If...

    Gregory A. Larsen, MVP

  • RE: Unlimited user entered values in spr where clause

    Your product list is a char field. So each value will need quotes around it, so I think I might consider trying this:

    DECLARE @prodlist VARCHAR(8000)

    SET @prodlist = '''EP01'',''EP02'',''EP03'''

    SELECT *...

    Gregory A. Larsen, MVP

  • RE: Tables and Indexes in DataFiles

    Maybe I should have read you post a little closer. I believe you can only identify the filegroup in which the table belongs, and not the individual files within...

    Gregory A. Larsen, MVP

  • RE: Tables and Indexes in DataFiles

    Here is a query that should get you started:

    select i.id,o.name,i.name, filename from sysobjects o

    join sysindexes i on o.id = i.id...

    Gregory A. Larsen, MVP

  • RE: User rights problems

    When users create tables, and are members of the db_owner role, then all tables they create, without specifically specifying the owner, will be created with DBO as the owner.

    Gregory Larsen,...

    Gregory A. Larsen, MVP

  • RE: How to make SQL job step failed

    use the classic divide by zero trick, like so when you want to bomb the code being executed by a TSQL script.

    select 1/0

    This will cause the step to fail....

    Gregory A. Larsen, MVP

  • RE: Multiple input values for a Stored Proceedure

    You are going to have to build you code dynamically. Here are a couple of links that might help:

    http://www.sqlservercentral.com/columnists/rmarda/dynamicsqlversusstaticsqlp1.asp http://www.sqlservercentral.com/columnists/rmarda/whendynamicsqlisuseful.asp

    As validation parms, your could do some thing like...

    Gregory A. Larsen, MVP

Viewing 15 posts - 691 through 705 (of 907 total)