Showing posts with label unable. Show all posts
Showing posts with label unable. Show all posts

Thursday, March 29, 2012

Creating an Index timing out

I am creating an index on a table wit 35 million records but I get the error

'TT_ObjPerformance' table
- Unable to create index 'IX_TT_ObjPerformance_CACode'.
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

How can I get the index created?

Thanks
SQL Server newbie

From where are you creating the index? via query analyzer/job/some front end( hopefully not)?

Wednesday, March 21, 2012

Creating a snapshot for merge replication

I'm trying to test merge replication, but am unable to create the publication, the snapshot agent keeps failing. The error I get from replication monitor is "Script failed for Table <tablename>"

Our database has quite a few XML datatype columns, when I take out the xml columns the snapshot succeeds OK, but fails with the xml column.

I created a simple table containing a varchar column and xml column. I created this table in our database, and in Adventure Works. Was able to create a publication with this test table in the adventureworks database, but was unable to create publication with this table in our database. The snapshot failed with error "Script failed for table testtable". I removed the xml column on the test table in our database and was able to create the publication successfully. Creating a publication in the adventureworks database with an xml column has no problems, but does in our database.

Anyone have any ideas?

Hi|||

Hi

What is the name of the database you are creating the publication in?

Can you post a script for the xml schema collection you are trying to publish?

Thanks

|||

Hi Katie,

I suspect that the compatibility level of your database is set to <90, and you can find out whether this is the case by executing sp_dbcmptlevel with the name of your database. If the compatibility level of your database is indeed set to < 90, you can use sp_dbcmptlevel again to change it to 90 and see if the snapshot problem goes away.

Hope that helps.

-Raymond

Tuesday, February 14, 2012

create view

I am trying to create view with select stmt and in the where condition is to dynamically select date from one of the table.

But I am unable to do that.

Also,

I tried to create procedure and declare vairables and tried to use

that variable in the where condition of the Select Clause in the Create View

but got an error

Incorrect syntax near the keyword 'VIEW'.

Can I create procedure to create view?

Can I use dynamic variable in the Select ...where..clause of the View?

How do I do?

A repro script would have helped. Take a look at table-valued functions. This might help in your case.