Forum Replies Created

Viewing 15 posts - 1 through 15 (of 388 total)

  • RE: Generate table definitions from views

    You could also try to use this code. It should generate column definitions for your views. copy/paste them from results and wrap into CREATE TABLE statement.

    select column_name + ' '...

  • RE: Generate table definitions from views

    The quick solution is to use select..into to create tables. Then you have to script the tables and adjust constraints and nullability.

    Regards

    Piotr

  • RE: Where should I local a SQL Express database?

    Are you going to create a new database for each user?

    The installation process can copy database to any location that you want and then you can attach the database using...

  • RE: collation change

    Please have a look at

    select * from information_schema.columns

    Regards

    Piotr

  • RE: collation change

    How about this

    select 'alter table ' +

    quotename(object_schema_name(parent_object_id)) +

    '.' + quotename(object_name(parent_object_id)) +

    ' drop constraint ' + quotename(name)

    from sys.objects where name in

    (select constraint_name from information_schema.check_constraints)

    Regards

    Piotr

  • RE: collation change

    If you are using SSMS 2008 you can try to script the table containint the columns as DROP..CREATE script. SSMS generates separate drop and create statements for all constraints on...

  • RE: collation change

    Judging by the name, 'lmdcol1_ck' is a check constraint. You have to remove constraints and indexes referencing the column before you change its collation. If you have to do...

  • RE: How to gice drop permission for store procedures

    Have you considered DDL triggers? You could have a trigger that would log all DDL changes and could rollback any alterations to table schemas.

    Regards

    Piotr

  • RE: getting xml data

    The only way I see is to write a CLR stored procedure that will go to the url to fetch the XML. But the assembly will have to be configured...

  • RE: SQL 2005 Instance memory usage

    You can use 'max server memory (MB)' setting to limit the amount of the memory used by SQL Server. Use it with care.

    You said the server is 'slow'. What do...

  • RE: SQL Server 2005 Express: Cannot connect to Server Name

    I understand that servername is not your local machine?

    You have to log on to the server and run SQL Server Surface Area Configuration tool. There in Surface Area Configuration for...

  • RE: EXCEPT usage

    Having said that, wouldn't you be looking for something like

    select #tmp.key1, #tmp.key2 FROM #tmp

    inner join

    (

    SELECT key1 FROM #tmp

    EXCEPT

    SELECT key1 FROM #tmp2

    ) q on #tmp.key1 = q.key1

    ?

    Regards

    Piotr

  • RE: Discarding records whith date gaps

    I just wonder, how set based solution would scale for thousands of rows. I have impression that for data islands problem loop based solution might scale better.

    Piotr

  • RE: VLDB Index rebuild best practices on Standard Edition server

    Steve's idea of increasing fill factor is quite interesting and it may decrease the frequency of index rebuilds. Maybe there is a way to analyze if the clustered index required...

  • RE: What would cause the default table locking to change?

    It could be that an index was dropped at some stage or the amount of data changed execution plan and another index is used/not used. Lock escalations could probably lead...

Viewing 15 posts - 1 through 15 (of 388 total)