Cannot See The Colums In The Design View Of Queries SQL 2000 And MSAccess 2000(adp)

Nov 21, 2006

Cannot see the Colums in the "design view" of Queries. All i see when i want to design a new query is *columns

This happens in only one database, in other databases using same server i can see the colums and can tick them to view then in the query.

In enterprise manager i see all the columns.

Using SQL 2000 and MSAccess 2000

View 1 Replies


ADVERTISEMENT

Msaccess Connection To Sql 2000

Mar 8, 2007



im in the begginging stages of converting an access 2003 backend to SQL 2003sp3.

The access's upgrade wizzard did an ok job getting most of the tables ported over. Now when the frontend relinked the tables to SQL server im assuming i just continue on using them as is. When the wizzard wanted a connection to use i created a new connection and saved it on the server. Im assuming this connection object is what access is using to get to SQL.

Am i assuming correctly ?

The reason i ask is only a few of the linked tables in to sql seem to be editable. some are read only ? (i have primary keys in all my tables.) im just calling a query bound to the linked tables.

Secondly, But could be related.

Now this problem i dont understand. On open of my main form i log who and what pc they are using. in this situation i open a record set, log the data and close it. At first the error was i needed to add dbSeeChanges on my object, ok so i added it as an option.

But i now get an the error message: at rsTran.AddNew "Run Time error: 3027 , Can Not update. Database or Object is read Only ?



here is the code

Set db = CurrentDb
Set rsTran = db.OpenRecordset("tblUserLog", dbOpenDynaset, dbSeeChanges)
struser = Currentuser
strNetwork = atCNames(1)
strPC = atCNames(2)


rsTran.AddNew
rsTran("UserName") = struser
rsTran("MachineName") = strPC
rsTran("EmployeeNum") = strNetwork
rsTran("Notes") = "User Logon"
rsTran.Update


Set db = Nothing
Set rsTran = Nothing

thank for any advice.

jon

View 1 Replies View Related

Err - Export From Sql Server 2000 And MsAccess

Oct 15, 2007

hi,
i export datas from sql server 2000 to Ms Access. but few tables only not expot. and error has come "the microsoft jet data base engine cannot find the input or Query "<t.n>" make sure it exists and that its name is spelled correctly.

but tables are live in sql server 2000.

Please give solution as soon

View 3 Replies View Related

Joined View Does Not Contain All Colums

Jul 20, 2006

The joined view is named "dbo.viewExecView" and is like:

SELECT Bank_No, data_center
FROM [ALPHASQL2000].ev_db.dbo.Bank

The new view that joins to the above view is like:

SELECT bank.BankID, evBank.data_center AS DataCenterID
FROM dbo.Bank AS bank INNER JOIN
dbo.viewExecView_Bank AS evBank ON bank.BankID = evBank.BankID WHERE (bank.InactiveDate IS NULL)

Note: The data_center column (an int) was recently added to the Bank table in the linked ev_db database and it shows up there. It also shows up in the view "dbo.viewExecView". It does not appear in the new view that joins to "dbo.viewExecView". And when I run the 'new' view, I get an Error Message: Invalid column name 'data_center'.

I've tried to simplify this as much as possible while still including the pertinent information. Any help very much appreciated, I am currently stumped.

Regards,

Joe

View 4 Replies View Related

Queries Log On SQL Server 2000 ???

Jan 13, 2008

Is there any log that catches all querys in SQL Server 2000???Full problem (in slanish): http://foro.hackhispano.com/showthread.php?t=28980Thanks

View 2 Replies View Related

Enable Ad Hoc Queries In SQL 2000

Dec 18, 2007



I am trying to enable AD HOC queries in SQL Server 2000. I have tried running the following code:




Code Block
sp_configure 'show advanced options',1
reconfigure with override
go
sp_configure 'Ad Hoc Distributed Queries',1
reconfigure with override
go





but I get the following error message:

'DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Server: Msg 15123, Level 16, State 1, Procedure sp_configure, Line 78
The configuration option 'Ad Hoc Distributed Queries' does not exist, or it may be an advanced option.

Valid configuration options are:'





I am logged in as administrator.

How do I enable AD HOC on this machine?

Thanks

View 1 Replies View Related

WinXP, SQL Server 2000, Queries

May 8, 2006

Hi,Does anyone know if MS SQL Server 2000, will run stability on a WindowsXP based O/S, using one of the new Dual Core chips, or HT chips?Especially given that when you install it you get compatabilitywarnings?ThanksDavid

View 2 Replies View Related

SQL 2000 DISTRUBUTED QUERIES FAIL

Jul 20, 2005

We recently upgraded our SQL 7 servers to 2000, and we have a gooddeal of distributed queries in the form of Stored Procedures that runbetween them throughout the day. After the upgrade, I began gettingthe "CONNECTION BUSY PROCESSING RESULTS FROM ANOTHER COMMAND" error.This is intermittent but is wreaking havoc on our operations. The samequery ran fine on the 7 server setup. I have exhausted all optionsthat I know of. All of the postings I have seen on these boardsrelate to recordsets and ADO and having cursorlocations setincorrectly, our stored procedure simply selects a count(*) from atable on a remote server. Doesn't seem to make sense. Anyone seenthis before or know a remedy? Thanks in advance.Dave

View 1 Replies View Related

Help Wanted Msaccess PIVOT-query --&> MS-SQL View/sp

Jan 18, 2006

Can someone help me parsing this ms-access PIVOT sql-statement to ams-sql-server sql-statement?Many thanks in advanceTRANSFORM Count(KlantenStops.id) AS AantalVanidSELECT KlantenStops.Uitvoerder, KlantenStops.KlantFROM KlantenStopsGROUP BY KlantenStops.Uitvoerder, KlantenStops.KlantPIVOT DatePart("m",leverdatum,1,0) In("1","2","3","4","5","6","7","8","9","10","11","12");

View 3 Replies View Related

MS SQL Server View Linked Into MSAccess Is Not Updateable Recordset

Jul 29, 2004

Hi All,
How can I link a view into MS Access from MS Sql Server, that I can update as a tabble.
Thanks
Laszlo

View 3 Replies View Related

Database Design - Performance SQL Server 2000

Jul 28, 2006

Hi

I have a database that stores all the data in one table that is only the data we are required to store hence it didnt require any other tables

the table has five colunms

Orderid, ordercost, orderdate, ordersystem, orderref

it is used in an web application that seraches for all the rest of the information using an orderid and displays the rest of the details the size of the table currently is about 123000 records that is increasing by 20000 every week.

i have an archive of the same data that has 7,666,000 records that are also going to be placed into the same database.

my question is is that a good idea of doing this?
are there any performance issues that i need to be aware of as currently the application runs quite quick?

View 15 Replies View Related

MSDE And SQL Server 2000 Design Questions...

Jul 20, 2005

Hello gurus:Hopefully someone can shed some light on some questions I have. I amtasked to build an application that will schedule and track tasks. Ifirmly believe in not reinventing the wheel however also feel thatcustomizing is certainly not out of the question.I am looking to build something in ASP (or .NET) that can allow anindividual to work "disconnected" from the network while stillaccessing a database (MSDE?) that will sync with SQL 2000 oncere-connected. I have built multiple db apps that are strictly webbased and consider myself somewhat knowledgeable (read.. dangereous)SQL/ASP dude. I understand that for a stand-alone client app I mayhave to use .NET and load the framewsork on the client in order to runthe dynamic pages for database updates. Here are my questions:1) Is there a way for SQL server to "replicate" its tables into aschema/data recognized by MSDE (i.e. generate the "mother ship" tablesand schema first, then use SQL Server to automatically create (export)the client MSDE tables)2) are there tools to manage MSDE so one can see what the heck is inthere? I understand Enterprise manager will not work in this regard.3) Are there any resources (documents, tutorials etc..) for datareplication (i.e. dbsync from MSDE up to MSSQL and vice-versa)4) Am I wasting my time doing this from scratch because there isalready something out there that does all this that is moderatelypriced and customizable?Thanks for your attention and consideration.Eric B

View 1 Replies View Related

Altering SQL Server 2000 Table Design

Jul 20, 2005

I'm trying to do a simple alteration to the table design of one of ourSQL 2k tables, simply changing an identity row so that its not 'notfor replication', and its taking absolutely ages to do so, and stopsthe sql server from working.Whilst it's attempting the update, no one can access the database, thesqlservr.exe memory usage shoots up and enterprise manager reports anot responding status. Eventually after about 10 minutes, it bombs outreporting,Unable to modify tableCould not allocate space for object 'Tmp_TableName' in database'DBNAME' because the 'PRIMARY' filegroup is full.The table i'm attempting to change has only about 4000 records sothere's not a huge amount of data.Any ideas what's causing this and how i can get around it?A similar thing happens when i attempt to change the length of avarchar too.Thanks in advance for any suggestionsDan Williams.

View 3 Replies View Related

MCSE SQL Server 2000 Design 70-229 Exam

Mar 17, 2008

Hi,


I am studying for the above exam and have got a new laptop with the basic version of Vista pre-installed on it. I've got an evaluation version of SQL Server 2000 I got from a Microsoft event but the basic version of Vista I have, will not let me install it.

Can anyone advise me whether SQL Server Express will be useful in studying for the SQL Server 2000 Design 70-229 Exam?

If not, I see my options as fork out for an older OS licence - XP pro to put on the laptop which would allow me to install the evaluation edition. Not my first choice but it would do...

Thank you,

Mark Smith

View 5 Replies View Related

Access 2000 Queries Performing Slower On More Powerful Server

Jun 27, 2001

Hi,

We have recently upgraded our production server from a dual pentium II 400mhz server with 384Mb of RAM to a triple 700mhz Pentium III system with 2gb of RAM . However, since switching over, all of our Access queries on the SQL7 databases are either running extremely slowly or not at all despite the DSN's being set up correctly . Does anyone have any ideas why, and more importantly, how I can resolve this???

Thanks

Pete Burton
(IT Support)
Durham Aged Mineworkers Homes Association

View 2 Replies View Related

SQL 2000 View

Dec 24, 2007

The table I want to query contains data structure like so

tblText
-------
VisitId(int)CodeId(int) ChrText VarChar()
1 2 'Text Code2'
1 3 'Text Code3'
2 1 'Text Code1'
3 3 '*TextCode3*'
4 1 'Text Code1'
4 4 'Text COde4'

What I want is for my View to Look Like this

VisitId Code1 Code2 Code3 Code4
1 N/A Text Code2 Text Code3 N/A
2 Text Code1 N/A N/A N/A
3 n/a n/a *TextCode3* n/a
4 Text Code1 n/a n/a Text COde4

I am sure I Group by VisitId, but do not know the correct function to construct the rest of the Select Query

Create View vw_tblText
As
Select VisitId,
Case(intCodeId=1 Then chrText Else 'N/A' End) As Code1
Case(intCodeId=2 Then chrText Else 'N/A' End) As Code2
etc..
From tblText
Group by intVisit

Any Ideas much appreciated

View 7 Replies View Related

SQL Server 2000/2005 Tutorial For Complex And Real Life Queries

Dec 13, 2007

I am not very good in queries. Could you please suggest me some web site/Tutorial/Artical where i can get Study Material for complex and real life queries. I know the syntexes, I just need to practice queries to enhance my skills

View 1 Replies View Related

Bad Performance In Queries With Jet4.0 And Linked ODBC-tables To SQL-Server 2000

Jul 20, 2005

I changed from Access97 to AccessXP and I have immense performanceproblems.Details:- Access XP MDB with Jet 4.0 ( no ADP-Project )- Linked Tables to SQL-Server 2000 over ODBCI used the SQL Profile to watch the T-SQL-Command which Access ( whocreates the commands?) creates and noticed:1) some Jet-SQL commands with JOINS and Where-Statements aretranslated very well, using sp_prepexe and sp_execute, including thesimilar SQL-Statement as in JET.2) other Jet-SQL commands with JOINS and Where-Statements aretranslated very bad, because the Join wasn´t sent as a join, Accesscollects the data of the individual tables seperately.Access sends much to much data over the network, it is a disaster!3) in Access97 the same command was interpreted wellCould it be possible the Access uses a wrong protocol-stack, perhapsJet to OLEDB, OLEDB to ODBC, ODBC to SQL-Server orJet to ODBC, ODBC to OLEDB and OLEDB to SQL-Server instead ofJet to ODBC and ODBC direct to SQL-ServerDoes anyone knows anything about:- Command-Interpreter of JetODBC, Parameters, how to influence thecommand-interpreter- Protocol-Stack of a Jet4.0 / ODBC / SQL-Server applicationThanks , Andreas

View 6 Replies View Related

Fatal Error Doing Simple Queries From An Sql 2000 To Sql 2005 Exported Database

Jun 8, 2006

I have been trying to export an sql2000 database to sql2005 with no luck. I continuosly get the error

Msg 0, Level 11, State 0, Line 0

A severe error occurred on the current command. The results, if any, should be discarded.

I have looked upon all support material and have installed the latest sql2005 service pack, but this has not fixed the problem. a simple query as:

select * from [transaction] ta,transactionentry tr

where tr.transactionnumber=ta.transactionnumber and

glacctid=6 and ta.[time]> '3/01/2006'

would produce this fatal error.

the current version I am using is:

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

This problem is happening on some of the most important tables in the database.

the error log contains the following:

2006-06-06 11:43:32.59 spid54 ***Stack Dump being sent to C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0001.txt
2006-06-06 11:43:32.59 spid54 SqlDumpExceptionHandler: Process 54 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2006-06-06 11:43:32.59 spid54 * *******************************************************************************
2006-06-06 11:43:32.59 spid54 *
2006-06-06 11:43:32.59 spid54 * BEGIN STACK DUMP:
2006-06-06 11:43:32.59 spid54 * 06/06/06 11:43:32 spid 54
2006-06-06 11:43:32.59 spid54 *
2006-06-06 11:43:32.59 spid54 *
2006-06-06 11:43:32.59 spid54 * Exception Address = 0136B4F0 Module(sqlservr+0036B4F0)
2006-06-06 11:43:32.59 spid54 * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
2006-06-06 11:43:32.59 spid54 * Access Violation occurred writing address FFFFFFFC
2006-06-06 11:43:32.59 spid54 * Input Buffer 260 bytes -
2006-06-06 11:43:32.59 spid54 * select * from [transaction] tr,transactionentry te where tr.
2006-06-06 11:43:32.59 spid54 * transactionnumber = te.transactionnumber and glacctid = 6
2006-06-06 11:43:32.59 spid54 *
2006-06-06 11:43:32.59 spid54 *
2006-06-06 11:43:32.59 spid54 * MODULE BASE END SIZE
2006-06-06 11:43:32.59 spid54 * sqlservr 01000000 02BA7FFF 01ba8000
2006-06-06 11:43:32.59 spid54 * ntdll 7C800000 7C8BFFFF 000c0000
2006-06-06 11:43:32.59 spid54 * kernel32 77E40000 77F41FFF 00102000
2006-06-06 11:43:32.59 spid54 * MSVCR80 78130000 781CAFFF 0009b000
2006-06-06 11:43:32.59 spid54 * msvcrt 77BA0000 77BF9FFF 0005a000

I have followed instructions on some support issues posted but none have helped. If anyone has any solution to this problem PLEASE HELP!!!!.

Thanks.

View 7 Replies View Related

View Permision Sql 2000

Jan 10, 2006

I created a new user (Joe_Reader) and gave this user the db_datareader Role.I then went and specified what tables and queries would this user see. Thisworks fine. I however keep on creating tables and views on the database andautomatically these objects are viewable by the user. I have to manually goand deny the access for each object I create. Is there a way that I canonly let Jo_Reader see the tables that I originally assigned and that noneof the other queries or views are viewable by himThanks

View 1 Replies View Related

Indexed View In Microsoft SQL 2000

Nov 19, 2004

Just wonder how many of you are using or had used indexed view in SQL 2000? Please, share any details/info.

We are currently using in and having problems as we are getting Errors 644, 'Couldn't find index...' every time we try to update the underlying tables.

View 2 Replies View Related

Create A View In MSSQL 2000

Oct 12, 2005

I have created a view in MS SQL2000 as followed:

Select order_NO, shiptoname, Shiptoaddress, Shiptocity,shiptostate, shiptozip,
EMAILaddress
FROM orders;

my question is: If the email exist in the EMAILaddress column then I need to have a Y show in another column called EMAILflag, if the EMAILaddress does not exist then I would need the EMAILflag to be a N.

Any HELP would be GREAT.
Thank You!!

View 3 Replies View Related

SQL Server 2000 Hangs On A View

Feb 18, 2007

I am working in Powerbuilder and SQL Server 2000. Within the application I dynamically Drop then recreate a view named view_selection_list. When another user accesses any screen using view_selection_list the screen will hang on the statement "If Exists (SELECT name FROM sysobjects WHERE name = 'view_selection_list' AND type = 'V') DROP VIEW view_selection_list".
I also went directly onto the database ran select * from view_selection_list from Query Analyzer. It hangs when the original user creating the view is still active. I know that the issue is locking. I don't know how to fix it.

For example ;
String ls_sql
ls_sql="If Exists ( SELECT name FROM sysobjects WHERE name = 'view_selection_list' AND type = 'V') DROP VIEW view_selection_list "
Execute Immediate :ls_sql;

ls_sql="Create View view_selection_list as "
Case 'State'
ls_sql+=" Select distinct proj_id,'State - '+proj_state title from project where proj_state='"+is_data+"'"

Case 'Project'
ls_sql+=" Select distinct proj_id,'Project - '+proj_nam title from project where proj_id='"+is_data+"'"

Case 'All Active Projects'
ls_sql+=" Select proj_id,'Project -' +proj_nam title from project where proj_status = 4 and signed_acq_agmt = 'Y' "

End Choose

Execute Immediate :ls_sql;

The SQL Server connection in the application is:
SQLCA.DBMS = "OLE DB"
SQLCA.ServerName="acq"
SQLCA.LogPass ="*******"
SQLCA.LogId = "acq"
SQLCA.Lock = "RU"
SQLCA.AutoCommit = False
SQLCA.DBParm = "PROVIDER='SQLOLEDB',DATASOURCE='FSRFIN103'"

Thank You
Stanley

View 11 Replies View Related

Materialized View In Sql Server 2000

Mar 12, 2008

Can some one please help to find out that how can i implement the materialized view in sql server 2000? thanx for consideration.

Rahul Arora
07 Batch
NCCE Israna,


######################
IMPOSSIBLE = I+M+POSSIBLE

View 2 Replies View Related

Is It Possible To Export A View To Excel In MS SQL 2000 ?

Jul 23, 2005

Hi all,In MS SQL Management Console I can right-click on any Table and I havethe option All Tasks > Export Data where I can export the table toExcel. In a View however this isn't there. I have many views I wantto simply export to Excel, but the only way I've found to do it iscreating an ODBC connection to the MS SQL database from MS Access,linking the Views to Access Tables, and exporting from Access. surelythere's someway to export a View to Excel within MS SQL easily likeexporting a table...Thanks ---Alex

View 1 Replies View Related

View Not Working SQLSERVER 2000

Jul 20, 2005

Hi allWe have some tables with a couple of layers of very simple views built ontop. In the table are maybe 6 columns and about 15000 records. The firstview cobines the data in the table with some other data from a lookuptable. The second view does some sorting on the first view using certaindates . They have worked fine for well over a year now.Until this morning that is... the views stopped returning the full set ofresults- even the very simple one that sits just above the table. The viewreturned the core of the data from the main table, but nothing from thelookup table.In order to get them to work we had to delete each view (using access frontend to do this), and then recreate it with exactly the same SQL text. I amguessing this causes SQL Server to recompile it. As soon as view 1 had beenrecreated it worked, but view 2 still failed, again rebuilding view 2 itstarted working.The only thing I can think of is that this morning I added 2 new fields tothe base table, but I'm sure I've done this before without any (noticable)problems.any thoughts as to why it happened would be welcome, I am a bit nervousnow...thanksAndy

View 5 Replies View Related

SQL 2000 Taskpad View/access

Feb 22, 2006

Hi there,

Not sure if this is possible but anyways. Need to restrict access on systems for users

and at the moment they are limited to being server and process administrators only.

This gives them enough room to do what they need to do, however the taskpad view in Enterprise manager only shows them the Log space used, not the datafiles.

The only way to get the TaskPad view to show the datafiles is to add them to the database creators role, which already gives them more permissions than they need.

So, just a shot in the dark but is there someway to get Taskpad view to show all the info there about the database?

View 3 Replies View Related

SQL 2000 View VS. Sproc Show Different Results

May 9, 2005

I have a sproc in my database that when editing in VS 2003 shows different results.
The sproc code is:
ALTER PROCEDURE dbo.VMUsage_GetRaw
@VMBox nvarchar,@StartDate datetime,@EndDate datetime
AS
SET NOCOUNT ON
SELECT      *FROM          VMRawUsageWHERE      (ACCOUNT = @VMBox) AND  (CONVERT(datetime, DATE + ' ' + TIME) > @StartDate) AND  (CONVERT(datetime, DATE + ' ' + TIME) < @EndDate)
When I open the SQL statement in the designer and run (and enter my parameters) I get a recordset returned, but when I just "Run Stored Procedure" and enter the same parameters I get no results.  The same occurs when I run the sproc from my website (no results).
Any ideas what is happening between the two?

View 1 Replies View Related

How To Create Index In The View On MS SQL 2000?--URGENT!!!

Sep 14, 2001

Hi ALL,

How to create index in the view on MS SQL 2000?

Thank you very much!

View 4 Replies View Related

Unable To Update View In Sql Server 2000

Oct 18, 2005

Hi,I have an application that's running fine on development servers (weband database-sql server 2000). I'm updating a record through a thirdparty component but I don't think the component is the problem. What'shappening is that I'm updating fields that are part of view. I'm onlyupdating fields in one table of the view and this works fine in thedevelopment environment.What happens in the production environment when I try to update(using the third party component) I get the following message:"Current recordset does not support updating. This may be a limitationof the provider or of the selected locktype."As an experiment I took the same code but removed the view, leavingonly the table I want to update as the record source. In that case theupdate worked. So it seems that something in the production databasedoesn't like me updating a view. However I can do that in the databasein the development environment.The third party component is dbnetgrid which works fine in thedevelopment environment. I can only conclude it's something about thedatabase that prevents me from updating this same table if it's in aview. I've talked to our DBA but he says there's no difference betweenthe databases. Any ideas would be appreciated.Neil

View 2 Replies View Related

View Ignoring Order By - Used To Work In Sql 2000

Dec 13, 2005

This works fine in  SQL 2000, but not in SQL 2005

View 12 Replies View Related

View SELECT Differences Between SQL 2000 &&amp; 2005

Apr 8, 2008

I have the following a view on a SQL2K box that uses the following SELECT statement:

SELECT



SF.SKU,
SAT.PublicationDate AS SATPubDate,
SAM.PublicationDate AS SAMPubDat
FROM SkuFlags SF
LEFT OUTER JOIN SpringArbor_ttlsparb SAT ON SF.ISBN = SAT.ISBN
LEFT OUTER JOIN SpringArbor_music SAM ON SF.ISBN = SAM.PrimaryKey
WHERE (
(
( SAT.PublicationDate IS NOT NULL ) AND
( SAT.PublicationDate <> '010001' ) AND
( GETDATE() <= DATEADD(day, -1, ( CAST(LEFT(SAT.PublicationDate, 2) + '/01/' + RIGHT(SAT.PublicationDate, 4) AS DATETIME) )))
)
OR (
( SAM.PublicationDate <> '010001' ) AND
( SAM.PublicationDate IS NOT NULL ) AND
( GETDATE() <= DATEADD(day, -1, ( CAST(LEFT(SAM.PublicationDate, 2) + '/01/' + RIGHT(SAM.PublicationDate, 4) AS DATETIME)))
)
)


The view works in SQL2K. When I try to run it under SQL2K5, I get a "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." error. I know what the error is, the SAM.PublicationDate field has NULL values in it (and this is vendor supplied data that is updated frequently, so not dealing with NULL values isn't an option), so during the CAST function it's try to CAST NULL + /01/ + NULL into a DATETIME value and crashing.

My question is why this works in SQL2K and not SQL2K5?

Thanks,
Kevin

View 1 Replies View Related

Unable To Create Indexable View On SQL 2000.

May 1, 2008

Hello,

I have a query that seems to take a while to execute and I'm looking into using an indexed view to see if this helps. I use the script below to create the view but when I query it's indexability using:

(select ObjectProperty(object_id('GetMessageQueueDetails'), 'IsIndexable'))

it always return '0'.

Here is a very cut down version of the view, only selects the uid! from a single table


IF OBJECT_ID ('GetMessageQueueDetails', 'view') IS NOT NULL

DROP VIEW GetMessageQueueDetails ;

GO



IF sessionproperty('ARITHABORT') = 0 SET ARITHABORT ON

IF sessionproperty('CONCAT_NULL_YIELDS_NULL') = 0 SET CONCAT_NULL_YIELDS_NULL ON

IF sessionproperty('QUOTED_IDENTIFIER') = 0 SET QUOTED_IDENTIFIER ON

IF sessionproperty('ANSI_NULLS') = 0 SET ANSI_NULLS ON

IF sessionproperty('ANSI_PADDING') = 0 SET ANSI_PADDING ON

IF sessionproperty('ANSI_WARNINGS') = 0 SET ANSI_WARNINGS ON

IF sessionproperty('NUMERIC_ROUNDABORT') = 1 SET NUMERIC_ROUNDABORT OFF

GO



CREATE VIEW GetMessageQueueDetails

WITH SCHEMABINDING

AS

SELECT Uid

FROM dbo.MyTable

GO

I see from See http://msdn.microsoft.com/en-us/library/aa933148(SQL.80).aspx that the pre-requsites for indexed views are pretty strict, I have been through this list and think I have everything covered, except for :

"The ANSI_NULLS option must have been set to ON for the execution of all CREATE TABLE statements that create tables referenced by the view."

Is there an easy way to find out if ANSI_NULLS was ON or OFF when the table was created. If it was OFF can I do an ALTER TABLE to turn it on and will that make the view indexable? If so how do I do this with out trashing the data in the table?

Or am I doing something else wrong?

Can anybody offer any help?

Thanks

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved