Forum Replies Created

Viewing 15 posts - 46 through 60 (of 64 total)

  • RE: Server is in script upgrade mode. Only administrator can connect at this time

    You get that error when you are installing SQL on another node.

    At the time of installation, SQL is not available for any user to connect.

    Once the installation finishes, SQL is...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Problem with contains search, need help

    Your Query contains the correct syntax, I don't see a logical reason why it is not returning your record.

    I am going to make some assumptions here:

    Assuming that you have created...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Need SQL Script

    Try this one:

    select o.name as sp_name,

    (len(c.text) - len(replace(c.text, char(10),''))) as lines_of_code,

    case when o.xtype = 'P' then 'Stored Procedure'

    when o.xtype in ('FN', 'IF', 'TF') then 'Function'

    end as type_desc

    from sysobjects o

    inner join...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Script to Add User to all Databases

    This script will add the user to each DB, but you must have the Login created first.

    It will add the user as a db_datareader role.

    sp_msforeachdb 'use [?]; CREATE USER [MyDBUser]...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Deleting Inactive login

    Hi,

    First, you must make sure that you have [Login Auditing] turned at least for "Successful logins".

    If you do not, then run the script below to turn it for for "Both...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: best approach to have a job on sql 2005 update sql 2008 server

    Follow these steps and you will accomplish what you need:

    Step 1)

    USE master

    GO

    --Create a Linked server on the SQL 2005 that points to the SQL 2008'

    EXEC master.dbo.sp_addlinkedserver @server = N'SQLSERVER2008',

    ...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Need SQL Script

    If you are using SQL Server 2000 here are some views and tables you can query:

    SELECT * FROM sysindexes

    SELECT * FROM INFORMATION_SCHEMA.tables

    SELECT * FROM INFORMATION_SCHEMA.VIEWS

    You can also use the [sysobjects]...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: How to display the database property

    You should use the sp_helpdb Stored Procedure

    you can pass parameters if you want a specific databases.

    i.e. sp_helpdb 'master'

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: virtual server migration

    We have done that in the past and to be honest, there are a lot of things you have to do.

    I do not remember the exact list of steps, but...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: DB Schema version Info

    You can use the sp_helpdb stored procedure or query the sys.databases system table

    sp_helpdb 'master'

    GO

    SELECT * FROM sys.databases WHERE name ='master'

    GO

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: ISNULL on Empty Set

    IsNull function only replaces data where the value is null, but it does not handle when there is no data.

    For that you need something like this:

    IF NOT EXISTS ( SELECT...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Query AD for Group Membership

    Try this code,

    I use it to list of the members of a specific AD group or distribution list.

    You can modify to display the fields you want.

    EXEC master.dbo.sp_addlinkedserver @server = N'ADSI',

    ...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Need advice on returning data based on specific day and time ranges

    The function "DAY" will return the day of the month, not the weekday. This will not help you determine whether the day is Monday or Thursday, etc.

    You have you use...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: WHERE Clause in Views

    A view is a select statement from one or many tables.

    When you query the view, the SQL Query optimizer chooses the best execution plan based on the least cost.

    So, if...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

  • RE: Moving a standalone database server to a windows 2008 clustered environment

    Hi mashikoo,

    First and foremost, you cannot convert a stand alone instance into a cluster one.

    Here is my recommendation:

    1) Backup your databases and take SQL Server offline

    2) Make sure that you...

    Ysaias Portes | Forward Thinkers Consulting
    sp_SQLFlightRecorder — open-source SQL Server diagnostic recorder | forwardthinkersconsulting.com

Viewing 15 posts - 46 through 60 (of 64 total)