Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 13,469 total)

  • RE: Please define SERVERPROPERTY('ComputerNamePhysicalNetBIOS')!!

    does this query from technet, which purportedly gets cluster information by reading the registry and other items via TSQL help?

    COLLECT CLUSTER INFORMATION USING TSQL

    i see it identifies node names and...

  • RE: Running Client-side Profiler trace or Server-side trace?

    profiler is resource intensive, no matter the SQL version.

    consider this:

    there is nothing a slow, resource intensive profiler trace can do that a server side trace cannot do.

    EVERY client side trace...

  • RE: Domain Group Login Fails

    that error is normal, because you cannot execute as the context of a windows group, only as a windows user, who happens to be in that group.

  • RE: Create new role

    balasach82 (1/2/2014)


    I have to create a new role which should have "Select" permission on all tables created by other users and

    2.should have ability to create tables and have access to...

  • RE: Stored Procedure Logging

    can you add CLR procedures?

    writing to a file is very, very easy if you add some CLR's;

    i've got a simple example out on codeplex that i wrote as a proof...

  • RE: Exporting Data directly into Excel from SQL makes it too big to handle

    SSMS has an option to save a query results directly to file, without displaying it(Control + Shift + F, then execute the query);

    that's an option you might want to...

  • RE: Generate Table Scripts

    there are a lot of options for scripting that can be enabled/disabled;

    take a look in your Tools>>Options (in 2012 SSMS, it's Tools>>Options>>SQL Server Object Explorer>>Scripting

    and check your setting for "Script...

  • RE: Can't rename a object that belongs to non-dbo schema

    SQL Guy 1 (12/31/2013)


    I need to rename a foreign key. It is on a table which is not dbo.

    Here is what I run:

    exec sp_rename

    @objname ='schema_name.table_name.FK_old_name',

    @newname ='FK_new_name',

    @objtype ='Object'

    I get...

  • RE: Maintanance

    and with all those headaches for migrating SSIS maintenance plans, is there anything that the maintenance plans do that that the scripts from ola hallengren[/url] doesn't do from a TSQL...

  • RE: Restore 2008R2Express DB to 2012Express DB

    i think both the 2008R2 and the 2012 are on the same server, right?

    when you try to restore that 2008R2 backup, it's remembering where it's mdf and ldf files were...

  • RE: When i run setup of sql server 2008 R2 on windows 7 it shows error "Windows is unable to start correctly 0Xc0000005"

    not quite enough information; are you saying the installer fails, and never installs SQL server, or are you saying AFTER you installed, the service won't start?

    if the installer successfully installed...

  • RE: Unable to convert character to datetime

    Rando (12/30/2013)


    That's where I run into the syntax error;

    Msg 241, Level 16, State 1, Line 1

    Syntax error converting datetime from character string.

    can you do a select to find non-convertable date...

  • RE: Unable to convert character to datetime

    if you explicitly convert it to datetime, your previous code would work:

    WITH SampleData AS(

    SELECT CAST( '2013-12-30 12:09:00.123' AS CHAR(24)) AS CounterDateTime

    )

    SELECT

    CONVERT(VARCHAR(10),convert(datetime,CounterDateTime),101) as Date,

    CONVERT(VARCHAR(5), convert(datetime,CounterDateTime), 108) + ' ' +...

  • RE: Unable to convert character to datetime

    additionally, your "time column" comes out bad because you are converting a varchar(24) to a varchar(5); effectively the same as a LEFT function.

    you get the '2013-' portion of the string,...

  • RE: Unable to convert character to datetime

    Rando (12/30/2013)


    I'm unable to convert a character field to datetime in TSQL.

    Column:

    CounterDateTime (char24), not null)

    Column Example Value:

    2013-12-30 12:09:00.123

    Code:

    SELECT

    CONVERT(VARCHAR(10),CONVERT(varchar,CounterDateTime),101) as Date,

    CONVERT(VARCHAR(5), CounterDateTime, 108) + ' ' + SUBSTRING(CONVERT(VARCHAR(19), CounterDateTime, 100),18,2)...

Viewing 15 posts - 2,701 through 2,715 (of 13,469 total)