Friday, March 30, 2012
Modify data in SQL Server with access mdb
I'm trying to use access to modify data in SQL Server 2000 tables. Everything is ok on most tables, but only one made me troubles. This one when I'm doing something on it is saying that an other user modify this record and I cannot save this information.
This table has 40 rows and 3 primary key.
I'm the only one to work on this database.
thank you for responseDoes your table have any bit data types which allow null values? Access can't deal with null value data bit columns and if you modify a row with a null value it gives you an error saying it has already been modified by another user.
hope this helps
Originally posted by anakin_ch
hello
I'm trying to use access to modify data in SQL Server 2000 tables. Everything is ok on most tables, but only one made me troubles. This one when I'm doing something on it is saying that an other user modify this record and I cannot save this information.
This table has 40 rows and 3 primary key.
I'm the only one to work on this database.
thank you for response
Modifing XML document is too slow
I need insert many dates from tables to XML file, I use T-SQL, everything is OK, but it works too slow.
Is there another way? Thanks' a lot.
I use such sequence T-SQL:
Declare
@.doc XML,
@.ixml nvarchar(4000)
SELECT @.ixml=(SELECT * FROM SAMPLE "d:SAMPLE" for XML AUTO)
SET @.ixml = 'SET @.Doc.modify(''
declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";
declare namespace d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields";
insert ('+@.ixml+') into (dfs:myFields/dfs:dataFields)[1] '')'
exec sp_ExecuteSql @.STMT = @.ixml, @.PARAMS = N'@.DOC XML OUT', @.DOC = @.DOC OUT
In order for me to help you troubleshoot the performance please explain the shape of your XML data and the scenario you are using XML in.
General notes.
If your scenario is collecting changes made to a set of tables and aggregating them into an XML document you may want to aggregate each change into a smaller XML instance in a dedicated XML column and then aggregate multiple instances into a bigger XML document upon retrieval.
If your scenario is adding data from database tables to an existing document on the client side you may retrieve your data from the server in XML form using FOR XML and then combine the new and the existing XML documents using XSLT.
If you need to add data from database tables to an XML document stored in an XML variable/parameter the most performing will be to compose a new instance, for example:
WITH XMLNAMESPACES(
'http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' AS dfs,
'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)
SELECT @.doc =
(
SELECT
@.doc.query('dfs:myFields/dfs:dataFields/*') AS "dfs:dataFields",
(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "dfs:dataFields"
FOR XML PATH, TYPE, ROOT('dfs:myFields')
);
If reconstruction is too complex you can combine the old and new XML into a single instance, insert the new part into the appropriate place, and then delete the new part:
-- combine the old and the new XML
WITH XMLNAMESPACES(
'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)
SELECT @.doc =
(
SELECT
@.doc,
(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "Wrapper"
FOR XML PATH, TYPE
);
-- insert the new XML fragment into the appropriate place
SET @.doc = @.doc.modify('
declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";
insert /Wrapper/* into (dfs:myFields/dfs:dataFields)[1]
');
-- delete the new XML fragment
SET @.doc = @.doc.modify('delete /Wrapper');
Inserting bigger XML fragments using dynamic query with modify(‘insert…’) method on XML type is not recommended in terms of performance.
Best regards,
Eugene Kogan,
Technical Lead,
SQL Server Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
The code samples were not verified and may contain syntax errors.
Thanks’ a lot.
I use completely another way, simple serializing with some handwriting end tags, time was decreased from 2 minutes 38 seconds to 7 seconds.
Modifing XML document is too slow
I need insert many dates from tables to XML file, I use T-SQL, everything is OK, but it works too slow.
Is there another way? Thanks' a lot.
I use such sequence T-SQL:
Declare
@.doc XML,
@.ixml nvarchar(4000)
SELECT @.ixml=(SELECT * FROM SAMPLE "d:SAMPLE" for XML AUTO)
SET @.ixml = 'SET @.Doc.modify(''
declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";
declare namespace d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields";
insert ('+@.ixml+') into (dfs:myFields/dfs:dataFields)[1] '')'
exec sp_ExecuteSql @.STMT = @.ixml, @.PARAMS = N'@.DOC XML OUT', @.DOC = @.DOC OUT
In order for me to help you troubleshoot the performance please explain the shape of your XML data and the scenario you are using XML in.
General notes.
If your scenario is collecting changes made to a set of tables and aggregating them into an XML document you may want to aggregate each change into a smaller XML instance in a dedicated XML column and then aggregate multiple instances into a bigger XML document upon retrieval.
If your scenario is adding data from database tables to an existing document on the client side you may retrieve your data from the server in XML form using FOR XML and then combine the new and the existing XML documents using XSLT.
If you need to add data from database tables to an XML document stored in an XML variable/parameter the most performing will be to compose a new instance, for example:
WITH XMLNAMESPACES(
'http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' AS dfs,
'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)
SELECT @.doc =
(
SELECT
@.doc.query('dfs:myFields/dfs:dataFields/*') AS "dfs:dataFields",
(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "dfs:dataFields"
FOR XML PATH, TYPE, ROOT('dfs:myFields')
);
If reconstruction is too complex you can combine the old and new XML into a single instance, insert the new part into the appropriate place, and then delete the new part:
-- combine the old and the new XML
WITH XMLNAMESPACES(
'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)
SELECT @.doc =
(
SELECT
@.doc,
(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "Wrapper"
FOR XML PATH, TYPE
);
-- insert the new XML fragment into the appropriate place
SET @.doc = @.doc.modify('
declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";
insert /Wrapper/* into (dfs:myFields/dfs:dataFields)[1]
');
-- delete the new XML fragment
SET @.doc = @.doc.modify('delete /Wrapper');
Inserting bigger XML fragments using dynamic query with modify(‘insert…’) method on XML type is not recommended in terms of performance.
Best regards,
Eugene Kogan,
Technical Lead,
SQL Server Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
The code samples were not verified and may contain syntax errors.
Thanks’ a lot.
I use completely another way, simple serializing with some handwriting end tags, time was decreased from 2 minutes 38 seconds to 7 seconds.
modified replicated table without drop replication first
i set up a merge replication on sql server 2000.
how to modified replicated tables without dropping replication ?
Cheers
Nick
Nick,
sp_repladdcolumn and sp_repldropcolumn can be used.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||As a followup, what if a column is modified? Thanks.
David
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:%23$roTGN%23FHA.3308@.TK2MSFTNGP11.phx.gbl...
> Nick,
> sp_repladdcolumn and sp_repldropcolumn can be used.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||David,
please take a look at this article:
http://www.replicationanswers.com/AddColumn.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks. i read the article but I'm still not clear on how to handle. We
are using 1 Publisher and all anonymous (laptop) subscribers and are using
Merge Subscriptions. We make changes to tables failrly often. The database
is not real large (400MB) so I want to use the easiest possible way. What
do you suggest? Thanks.
David
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OIJ9XJP%23FHA.1988@.TK2MSFTNGP12.phx.gbl...
> David,
> please take a look at this article:
> http://www.replicationanswers.com/AddColumn.asp
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
>
|||David,
if you can afford it, the simplest method is probably to reinitialize.
Either way, you're safest by synchronizing all subscribers before undergoing
these changes.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
sql
Modification date of objects
Is there a way to know whan was the last time i've mofied objects? tables,
views, store procedures ect...?You can determine when they were created (crdate in sysobjects) but not
when they were modified. Use a source control system for that.
David Portas
SQL Server MVP
--|||That information is not available from SQL Server. If you really need it you
can use a product like Lumigent's LogExplorer to trail through your
transaction logs, but the best thing to do is use a Source Control system
like SourceSafe.
Jacco Schalkwijk
SQL Server MVP
"Roy Goldhammer" <roygoldh@.hotmail.com> wrote in message
news:OrVEKZIKFHA.2212@.TK2MSFTNGP12.phx.gbl...
> Hello there
> Is there a way to know whan was the last time i've mofied objects? tables,
> views, store procedures ect...?
>
>|||What is Source Control System?
And how can i get it and use it?
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:uIW6CkIKFHA.576@.TK2MSFTNGP15.phx.gbl...
> That information is not available from SQL Server. If you really need it
you
> can use a product like Lumigent's LogExplorer to trail through your
> transaction logs, but the best thing to do is use a Source Control system
> like SourceSafe.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Roy Goldhammer" <roygoldh@.hotmail.com> wrote in message
> news:OrVEKZIKFHA.2212@.TK2MSFTNGP12.phx.gbl...
tables,
>|||A Source Control program is an application that maintains a code
repository, records changing versions of code and logs who makes
changes and when. You can put into source control any stored procedure
scripts and DDL scripts for your database. Some form of source control
is pretty much essential if you have more than 1 or 2 people cutting
code. Of course, if you give DDL admin rights to your developers then
they still need to be disciplined enough to ensure they put every
change into source control...
SourceSafe is MS's source control offering and it's included with the
Enterprise editions of VisualStudio, or available as a separate
purchase. There are alternative products available though and you can
Google for those.
David Portas
SQL Server MVP
--
Wednesday, March 28, 2012
Model generation (for Report Builder)
order to correctly link some tables but this kills the model generation.
For example, although the job table has a CompanyID column, the job_task
table does not - but I need to be able to lookup a status in CompanyReason
which is indexed on CompanyID and PauseReason (this column is in job_task).
So I added 'theCompanyID' as a Calculated columns to job_task with the
following code:
SELECT TOP 1 j.company_id FROM mh4_job_task jt INNER JOIN mh4_job j on
j.job_id = jt.job_id
Makes sense? But when I create a model with it - this is the error message:
--
An error occurred while executing a command.
Message: Cannot perform an aggregate function on an expression containing an
aggregate or a subquery.
Line 5: Incorrect syntax near ')'.
Command:
SELECT
COUNT([notes]),
COUNT(DISTINCT [notes]),
COUNT((SELECT TOP 1 j.company_id FROM job_task jt INNER JOIN job j on
j.job_id = jt.job_id)),
COUNT(DISTINCT (SELECT TOP 1 j.company_id FROM job_task jt INNER JOIN job j
on j.job_id = jt.job_id)),
COUNT('task_status'),
COUNT(DISTINCT 'task_status')
FROM [dbo].[job_task] t
--
Of course, the error is correct - what I need to know is how to either
bypass the column uniqueness test FOR THIS ONE column or another method to
create the link in the Data Source View.
Thank you,
ScottI would use SSIS to get this set up. I have not done such a thing, but since
SSIS can provide report datasources that's the route I would look at.
"ScottB" <ScottB@.discussions.microsoft.com> wrote in message
news:95A89A5B-F36B-4056-96BF-A748B613CA25@.microsoft.com...
>I have had to add Calculated columns to some tables in my Data Source View
>in
> order to correctly link some tables but this kills the model generation.
> For example, although the job table has a CompanyID column, the job_task
> table does not - but I need to be able to lookup a status in CompanyReason
> which is indexed on CompanyID and PauseReason (this column is in
> job_task).
> So I added 'theCompanyID' as a Calculated columns to job_task with the
> following code:
> SELECT TOP 1 j.company_id FROM mh4_job_task jt INNER JOIN mh4_job j on
> j.job_id = jt.job_id
>
> Makes sense? But when I create a model with it - this is the error
> message:
> --
> An error occurred while executing a command.
> Message: Cannot perform an aggregate function on an expression containing
> an
> aggregate or a subquery.
> Line 5: Incorrect syntax near ')'.
> Command:
> SELECT
> COUNT([notes]),
> COUNT(DISTINCT [notes]),
> COUNT((SELECT TOP 1 j.company_id FROM job_task jt INNER JOIN job j on
> j.job_id = jt.job_id)),
> COUNT(DISTINCT (SELECT TOP 1 j.company_id FROM job_task jt INNER JOIN job
> j
> on j.job_id = jt.job_id)),
> COUNT('task_status'),
> COUNT(DISTINCT 'task_status')
> FROM [dbo].[job_task] t
> --
> Of course, the error is correct - what I need to know is how to either
> bypass the column uniqueness test FOR THIS ONE column or another method to
> create the link in the Data Source View.
> Thank you,
> Scott|||Hi,
I am new to SSIS. I have been searching for some examples to
use Expression Builder in SSIS to use derived columns
transformation...I basically want to add a new column to my data source
on the run and add this column as the 2nd column before loading into
destination. How can I achieve this? Plz help. Is there a link where I
can get examples online'
Model for Report Builder
I'm not sure I understand the limitation you are hitting. Are you seeing problems during model design or in Report Builder after you publish the model?
|||I have one main table with PK and several tables with a FK to the main table. After building my model I am limited to select only from the main table and one other table, the ths most I can grab from is 2 tables.|||I'm not aware of any existing issues like this. Here's a few things you could double check:
- The entities in the model that correspond to the "other" tables all have IsLookup=false and Hidden=false
- The roles in the model from the main entity to the "other" entities all have Cardinality=OptionalMany
- I assume you are using Model Designer to build the model against a SQL database, not generating the model from an Analysis Services cube.
Model for Report Builder
I'm not sure I understand the limitation you are hitting. Are you seeing problems during model design or in Report Builder after you publish the model?
|||I have one main table with PK and several tables with a FK to the main table. After building my model I am limited to select only from the main table and one other table, the ths most I can grab from is 2 tables.|||I'm not aware of any existing issues like this. Here's a few things you could double check:
- The entities in the model that correspond to the "other" tables all have IsLookup=false and Hidden=false
- The roles in the model from the main entity to the "other" entities all have Cardinality=OptionalMany
- I assume you are using Model Designer to build the model against a SQL database, not generating the model from an Analysis Services cube.
sqlModel for Report Builder
I'm not sure I understand the limitation you are hitting. Are you seeing problems during model design or in Report Builder after you publish the model?
|||I have one main table with PK and several tables with a FK to the main table. After building my model I am limited to select only from the main table and one other table, the ths most I can grab from is 2 tables.|||I'm not aware of any existing issues like this. Here's a few things you could double check:
- The entities in the model that correspond to the "other" tables all have IsLookup=false and Hidden=false
- The roles in the model from the main entity to the "other" entities all have Cardinality=OptionalMany
- I assume you are using Model Designer to build the model against a SQL database, not generating the model from an Analysis Services cube.
Model definitions
I've inherited a database from a vendor. This database has primary keys defined but not any foreign keys to other tables. The vendor establishes all their relationships in their code.
I've created a simple model off of the base tables, but can only report on one table at a time which makes perfect sense. What is the best way to create a more usable model?
Create views with foreign keys defined and then use the views as my source for the dsv? or can I define relationships within the model itself? I have not been able to figure out how to add a foreign key in the model Can this be done?
1. Load your model into Model Designer.
2. Edit DSV - manually add foreign keys your tables
3. Regen the model - roles should automatically appear.
Monday, March 19, 2012
Misterious disabling of table FTS
Today two tables in the same database ( which are the only ones with FTS in
that database) had FTS disabled. I know for sure that yesterday both of
them were enabled and working and nothing is showing in the logs about any
change to the status ( apart from the normal automatic PAUSE and RESUME of
indexing for the daily backup. ).
When I manually re-enabled each table the same message was created in the
logs:
"Changing the status to MERGE for the full-text catalog ".
Although everything is working now I am trying to track what could of caused
this.
Apart for purposely setting the table FTS disabled manually, what other
event could have caused the table's FTS become disabled?
Other databases in the same server had FTS on tables that weren't affected.
Thanks for the help.
Francisco
Oops,
Just to add this was on SQL 2005 sp1
Thanks.
"Francisco" <franciscousenet@.gmail.com> wrote in message
news:%23x$Xz7WNHHA.2232@.TK2MSFTNGP02.phx.gbl...
> Hi all,
> Today two tables in the same database ( which are the only ones with FTS
> in that database) had FTS disabled. I know for sure that yesterday both
> of them were enabled and working and nothing is showing in the logs about
> any change to the status ( apart from the normal automatic PAUSE and
> RESUME of indexing for the daily backup. ).
> When I manually re-enabled each table the same message was created in the
> logs:
> "Changing the status to MERGE for the full-text catalog ".
> Although everything is working now I am trying to track what could of
> caused this.
> Apart for purposely setting the table FTS disabled manually, what other
> event could have caused the table's FTS become disabled?
> Other databases in the same server had FTS on tables that weren't
> affected.
> Thanks for the help.
> Francisco
>
>
>
Monday, March 12, 2012
Missing Transactions
I have a server(S1) that has a trans. publication of 4 tables. I have
another server (S2) that has a subscription to the publication on S1. This
works fine.
Now, S2 has a merge publication of the same 4 tables to several remote
locations. I have a filter in the publication on each of the the four tables
that filters on a numeric field (ex. loc = 19). If I reinitialize the
subscription, only the data that meets the filter clause is populated on the
subscriber.
SO here is the problem....When data is inserted into S1, it makes it to S2,
but not to the remote locations.
If I do a validation, on S2, I get the error... Article 'TableName' failed
data validation (rowcount only) this message appears for each table.
If I insert a row manually into one of the tables on S1 & run the
distribution & merge agents manually, the row makes it to the final
destination, well on the one test I did.
TIA,
Larry...
Is there anything logged in your conflict tables? Use the conflict viewer to
tell.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:6EB8F35D-7D55-468D-AEBB-5209D1A406F5@.microsoft.com...
> SQL 2k & Win 2k
> I have a server(S1) that has a trans. publication of 4 tables. I have
> another server (S2) that has a subscription to the publication on S1.
> This
> works fine.
> Now, S2 has a merge publication of the same 4 tables to several remote
> locations. I have a filter in the publication on each of the the four
> tables
> that filters on a numeric field (ex. loc = 19). If I reinitialize the
> subscription, only the data that meets the filter clause is populated on
> the
> subscriber.
> SO here is the problem....When data is inserted into S1, it makes it to
> S2,
> but not to the remote locations.
> If I do a validation, on S2, I get the error... Article 'TableName' failed
> data validation (rowcount only) this message appears for each table.
> If I insert a row manually into one of the tables on S1 & run the
> distribution & merge agents manually, the row makes it to the final
> destination, well on the one test I did.
> TIA,
> Larry...
|||When I 'View Confilcts', there are <no confilict tables>.
Larry...
PS - got my book yesterday...thanks!
"Hilary Cotter" wrote:
> Is there anything logged in your conflict tables? Use the conflict viewer to
> tell.
|||Also, when I look at the 'Merge Agent History', there have been no
transactions replicated today, but I know there has been some data that has
been moved from S1 to S2.
|||I'm drawing a blank on this one. I'd contact PSS on this. Hope you enjoy the
book.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Larry" <Larry@.discussions.microsoft.com> wrote in message
news:7231045F-D1B7-4EF3-9FC1-8A6EF303065D@.microsoft.com...
> Also, when I look at the 'Merge Agent History', there have been no
> transactions replicated today, but I know there has been some data that
> has
> been moved from S1 to S2.
>
missing tables in sysobjects
I'm using "select [name] from sysobjects where OBJECTPROPERTY(id,
N'IsUserTable') = 1" to get all user-defined tables(about 17000
tables)
and found out there are tables missing in sysobjects.
How can I refresh/rebuild sysobjects table?
is there a better way to get a list of user-defined tables?
thanks,second714@.hotmail.com (neo) wrote in message news:<155f8e7d.0401061038.11ea8cc7@.posting.google.com>...
> Hi,
> I'm using "select [name] from sysobjects where OBJECTPROPERTY(id,
> N'IsUserTable') = 1" to get all user-defined tables(about 17000
> tables)
> and found out there are tables missing in sysobjects.
> How can I refresh/rebuild sysobjects table?
> is there a better way to get a list of user-defined tables?
> thanks,
Perhaps what is missing are VIEWS?
Try the following
select * from INFORMATION_SCHEMA.tables
Please let me know how you get on.|||neo (second714@.hotmail.com) writes:
> I'm using "select [name] from sysobjects where OBJECTPROPERTY(id,
> N'IsUserTable') = 1" to get all user-defined tables(about 17000
> tables)
> and found out there are tables missing in sysobjects.
> How can I refresh/rebuild sysobjects table?
> is there a better way to get a list of user-defined tables?
So how to you know they are missing? I'd say that if a table is not in
sysobjects it does not exist...
You can use DBCC CHECKCATALOG to check the system tables for inconsistency.
Mystery Man's suggestion that you might be looking for views seems worth
investigating. I'll add table-valued functions to the list.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
missing tables and stored procedures after restoring database
backup of the data using a t-sql command backup database ... Since this PC
had crashed and has subsequently been rebuilt, I have restored the database
but found that vital tables and stored procedures are missing. The missing
tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
into the database as user sa.
Any help in recovering those missing tables and stored procedures would be
greatly appreciated.
use restore headeronly command on the backup file To check when the
backup was taken looks like you haven't backed up the database when
you created the tables whcih you said you were missing or you have
restored
an earlier backup not the latest once since you are the Sysadmin u can
view all the tables created with any login and if you want to have
information
about the latest backup taken check out the one with
Use Msdb
select *from backupset
order by backup_finish_date desc
|||If they're missing after a restore then they were not there at the time
of the back and are now gone forever (presumedly they were created after
the backup you used to restore the DB). Do you have any later backups?
BTW, every table & proc in a DB has an owner. To be sure you're just
not missing it in whatever client-side tool you're using execute this T-SQL:
select o.[name] as tablename, u.[name] as ownername, type
from dbo.sysobjects as o
inner join dbo.sysusers as u on o.uid = o.uid
order by type, u.[name], o.[name]
Have a look to see if you can see the proc (type P) or the table (type
U) somewhere in the resultset. Also are you sure these "vital" tables &
procs were in the same database and weren't in another database that was
being referenced from your database? For example,
use A
go
select * from B.dbo.MyVitalTable
exec B.dbo.MyVitalProc
If that was true then they wouldn't be included in the backup (and
therefore subsequent restore) of your database.
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Old Paulie wrote:
>I have been running a desktop PC with MSDE 1.0 installed. I had made a
>backup of the data using a t-sql command backup database ... Since this PC
>had crashed and has subsequently been rebuilt, I have restored the database
>but found that vital tables and stored procedures are missing. The missing
>tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
>into the database as user sa.
>Any help in recovering those missing tables and stored procedures would be
>greatly appreciated.
>
|||saradhi,
Thanks for the advice, I have checked the backupset table in the Msdb
database and that only describes one backup taken last year. The backup at
that time probably would not have included these missing tables. I had
however made several backups and their is no proof of these in this table. I
need to obviously review the way I back up since it appears I am doing
something fundamentally wrong. Any advice on backing up for future reference
would be greatly appreciated. Should I be backing up the other databases
that are created upon install of msde, ie Master, Msdb etc ...?
"saradhi" wrote:
> use restore headeronly command on the backup file To check when the
> backup was taken looks like you haven't backed up the database when
> you created the tables whcih you said you were missing or you have
> restored
> an earlier backup not the latest once since you are the Sysadmin u can
> view all the tables created with any login and if you want to have
> information
> about the latest backup taken check out the one with
> Use Msdb
> select *from backupset
> order by backup_finish_date desc
>
|||Hi Mike,
I am quite sure that the vital tables belonged to my database as I had
created no others! I did run your query and did not find and records
relating to the missing tables and stored procedures. From your advice and
'saradhi's', it is obvious now that my backup was flawed and I am doing
something wrong
"Mike Hodgson" wrote:
[vbcol=seagreen]
> If they're missing after a restore then they were not there at the time
> of the back and are now gone forever (presumedly they were created after
> the backup you used to restore the DB). Do you have any later backups?
> BTW, every table & proc in a DB has an owner. To be sure you're just
> not missing it in whatever client-side tool you're using execute this T-SQL:
> select o.[name] as tablename, u.[name] as ownername, type
> from dbo.sysobjects as o
> inner join dbo.sysusers as u on o.uid = o.uid
> order by type, u.[name], o.[name]
> Have a look to see if you can see the proc (type P) or the table (type
> U) somewhere in the resultset. Also are you sure these "vital" tables &
> procs were in the same database and weren't in another database that was
> being referenced from your database? For example,
> use A
> go
> select * from B.dbo.MyVitalTable
> exec B.dbo.MyVitalProc
> If that was true then they wouldn't be included in the backup (and
> therefore subsequent restore) of your database.
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
> Old Paulie wrote:
|||One last chance. Perhaps your backup file has several backups on it, and you restore the first one?
Check using RESTORE HEADERONLY.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...[vbcol=seagreen]
> Hi Mike,
> I am quite sure that the vital tables belonged to my database as I had
> created no others! I did run your query and did not find and records
> relating to the missing tables and stored procedures. From your advice and
> 'saradhi's', it is obvious now that my backup was flawed and I am doing
> something wrong
> "Mike Hodgson" wrote:
|||Tibor,
It turns out that my backup DID include several backup sets and I was
therefore able to restore the most recent backup set to get back all missing
tables and procedures.
THANK YOU VERY MUCH!
"Tibor Karaszi" wrote:
> One last chance. Perhaps your backup file has several backups on it, and you restore the first one?
> Check using RESTORE HEADERONLY.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
> news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...
>
missing tables and stored procedures after restoring database
backup of the data using a t-sql command backup database ... Since this PC
had crashed and has subsequently been rebuilt, I have restored the database
but found that vital tables and stored procedures are missing. The missing
tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
into the database as user sa.
Any help in recovering those missing tables and stored procedures would be
greatly appreciated.use restore headeronly command on the backup file To check when the
backup was taken looks like you haven't backed up the database when
you created the tables whcih you said you were missing or you have
restored
an earlier backup not the latest once since you are the Sysadmin u can
view all the tables created with any login and if you want to have
information
about the latest backup taken check out the one with
Use Msdb
select *from backupset
order by backup_finish_date desc|||If they're missing after a restore then they were not there at the time
of the back and are now gone forever (presumedly they were created after
the backup you used to restore the DB). Do you have any later backups?
BTW, every table & proc in a DB has an owner. To be sure you're just
not missing it in whatever client-side tool you're using execute this T-SQL:
select o.[name] as tablename, u.[name] as ownername, type
from dbo.sysobjects as o
inner join dbo.sysusers as u on o.uid = o.uid
order by type, u.[name], o.[name]
Have a look to see if you can see the proc (type P) or the table (type
U) somewhere in the resultset. Also are you sure these "vital" tables &
procs were in the same database and weren't in another database that was
being referenced from your database? For example,
use A
go
select * from B.dbo.MyVitalTable
exec B.dbo.MyVitalProc
If that was true then they wouldn't be included in the backup (and
therefore subsequent restore) of your database.
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Old Paulie wrote:
>I have been running a desktop PC with MSDE 1.0 installed. I had made a
>backup of the data using a t-sql command backup database ... Since this PC
>had crashed and has subsequently been rebuilt, I have restored the database
>but found that vital tables and stored procedures are missing. The missing
>tables were not allegedly owned by dbo but perhaps had no owner(?) PS I lo
g
>into the database as user sa.
>Any help in recovering those missing tables and stored procedures would be
>greatly appreciated.
>|||saradhi,
Thanks for the advice, I have checked the backupset table in the Msdb
database and that only describes one backup taken last year. The backup at
that time probably would not have included these missing tables. I had
however made several backups and their is no proof of these in this table.
I
need to obviously review the way I back up since it appears I am doing
something fundamentally wrong. Any advice on backing up for future referenc
e
would be greatly appreciated. Should I be backing up the other databases
that are created upon install of msde, ie Master, Msdb etc ...?
"saradhi" wrote:
> use restore headeronly command on the backup file To check when the
> backup was taken looks like you haven't backed up the database when
> you created the tables whcih you said you were missing or you have
> restored
> an earlier backup not the latest once since you are the Sysadmin u can
> view all the tables created with any login and if you want to have
> information
> about the latest backup taken check out the one with
> Use Msdb
> select *from backupset
> order by backup_finish_date desc
>|||Hi Mike,
I am quite sure that the vital tables belonged to my database as I had
created no others! I did run your query and did not find and records
relating to the missing tables and stored procedures. From your advice and
'saradhi's', it is obvious now that my backup was flawed and I am doing
something wrong
"Mike Hodgson" wrote:
[vbcol=seagreen]
> If they're missing after a restore then they were not there at the time
> of the back and are now gone forever (presumedly they were created after
> the backup you used to restore the DB). Do you have any later backups?
> BTW, every table & proc in a DB has an owner. To be sure you're just
> not missing it in whatever client-side tool you're using execute this T-SQ
L:
> select o.[name] as tablename, u.[name] as ownername, type
> from dbo.sysobjects as o
> inner join dbo.sysusers as u on o.uid = o.uid
> order by type, u.[name], o.[name]
> Have a look to see if you can see the proc (type P) or the table (type
> U) somewhere in the resultset. Also are you sure these "vital" tables &
> procs were in the same database and weren't in another database that was
> being referenced from your database? For example,
> use A
> go
> select * from B.dbo.MyVitalTable
> exec B.dbo.MyVitalProc
> If that was true then they wouldn't be included in the backup (and
> therefore subsequent restore) of your database.
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
> Old Paulie wrote:
>|||One last chance. Perhaps your backup file has several backups on it, and you
restore the first one?
Check using RESTORE HEADERONLY.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...[vbcol=seagreen]
> Hi Mike,
> I am quite sure that the vital tables belonged to my database as I had
> created no others! I did run your query and did not find and records
> relating to the missing tables and stored procedures. From your advice an
d
> 'saradhi's', it is obvious now that my backup was flawed and I am doing
> something wrong
> "Mike Hodgson" wrote:
>|||Tibor,
It turns out that my backup DID include several backup sets and I was
therefore able to restore the most recent backup set to get back all missing
tables and procedures.
THANK YOU VERY MUCH!
"Tibor Karaszi" wrote:
> One last chance. Perhaps your backup file has several backups on it, and y
ou restore the first one?
> Check using RESTORE HEADERONLY.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
> news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...
>
missing tables and stored procedures after restoring database
backup of the data using a t-sql command backup database ... Since this PC
had crashed and has subsequently been rebuilt, I have restored the database
but found that vital tables and stored procedures are missing. The missing
tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
into the database as user sa.
Any help in recovering those missing tables and stored procedures would be
greatly appreciated.use restore headeronly command on the backup file To check when the
backup was taken looks like you haven't backed up the database when
you created the tables whcih you said you were missing or you have
restored
an earlier backup not the latest once since you are the Sysadmin u can
view all the tables created with any login and if you want to have
information
about the latest backup taken check out the one with
Use Msdb
select *from backupset
order by backup_finish_date desc|||This is a multi-part message in MIME format.
--080807080807040609090709
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
If they're missing after a restore then they were not there at the time
of the back and are now gone forever (presumedly they were created after
the backup you used to restore the DB). Do you have any later backups?
BTW, every table & proc in a DB has an owner. To be sure you're just
not missing it in whatever client-side tool you're using execute this T-SQL:
select o.[name] as tablename, u.[name] as ownername, type
from dbo.sysobjects as o
inner join dbo.sysusers as u on o.uid = o.uid
order by type, u.[name], o.[name]
Have a look to see if you can see the proc (type P) or the table (type
U) somewhere in the resultset. Also are you sure these "vital" tables &
procs were in the same database and weren't in another database that was
being referenced from your database? For example,
use A
go
select * from B.dbo.MyVitalTable
exec B.dbo.MyVitalProc
If that was true then they wouldn't be included in the backup (and
therefore subsequent restore) of your database.
--
*mike hodgson*
blog: http://sqlnerd.blogspot.com
Old Paulie wrote:
>I have been running a desktop PC with MSDE 1.0 installed. I had made a
>backup of the data using a t-sql command backup database ... Since this PC
>had crashed and has subsequently been rebuilt, I have restored the database
>but found that vital tables and stored procedures are missing. The missing
>tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
>into the database as user sa.
>Any help in recovering those missing tables and stored procedures would be
>greatly appreciated.
>
--080807080807040609090709
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>If they're missing after a restore then they were not there at the
time of the back and are now gone forever (presumedly they were created
after the backup you used to restore the DB). Do you have any later
backups?<br>
<br>
BTW, every table & proc in a DB has an owner. To be sure you're
just not missing it in whatever client-side tool you're using execute
this T-SQL:<br>
</tt>
<blockquote><tt>select o.[name] as tablename, u.[name] as ownername,
type<br>
from dbo.sysobjects as o<br>
   inner join dbo.sysusers as u on o.uid = o.uid<br>
order by type, u.[name], o.[name]<br>
</tt></blockquote>
<tt>Have a look to see if you can see the proc (type P) or the table
(type U) somewhere in the resultset. Also are you sure these "vital"
tables & procs were in the same database and weren't in another
database that was being referenced from your database? For example,<br>
</tt>
<blockquote><tt>use A<br>
go<br>
<br>
select * from B.dbo.MyVitalTable<br>
exec B.dbo.MyVitalProc<br>
</tt></blockquote>
<tt>If that was true then they wouldn't be included in the backup (and
therefore subsequent restore) of your database.</tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2">blog:</font><font face="Tahoma" size="2"> <a
href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Old Paulie wrote:
<blockquote cite="mid99FCEEAA-D592-4D73-AD2D-946AD7C71952@.microsoft.com"
type="cite">
<pre wrap="">I have been running a desktop PC with MSDE 1.0 installed. I had made a
backup of the data using a t-sql command backup database ... Since this PC
had crashed and has subsequently been rebuilt, I have restored the database
but found that vital tables and stored procedures are missing. The missing
tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
into the database as user sa.
Any help in recovering those missing tables and stored procedures would be
greatly appreciated.
</pre>
</blockquote>
</body>
</html>
--080807080807040609090709--|||saradhi,
Thanks for the advice, I have checked the backupset table in the Msdb
database and that only describes one backup taken last year. The backup at
that time probably would not have included these missing tables. I had
however made several backups and their is no proof of these in this table. I
need to obviously review the way I back up since it appears I am doing
something fundamentally wrong. Any advice on backing up for future reference
would be greatly appreciated. Should I be backing up the other databases
that are created upon install of msde, ie Master, Msdb etc ...?
"saradhi" wrote:
> use restore headeronly command on the backup file To check when the
> backup was taken looks like you haven't backed up the database when
> you created the tables whcih you said you were missing or you have
> restored
> an earlier backup not the latest once since you are the Sysadmin u can
> view all the tables created with any login and if you want to have
> information
> about the latest backup taken check out the one with
> Use Msdb
> select *from backupset
> order by backup_finish_date desc
>|||Hi Mike,
I am quite sure that the vital tables belonged to my database as I had
created no others! I did run your query and did not find and records
relating to the missing tables and stored procedures. From your advice and
'saradhi's', it is obvious now that my backup was flawed and I am doing
something wrong:( Thank you for your assistance.
"Mike Hodgson" wrote:
> If they're missing after a restore then they were not there at the time
> of the back and are now gone forever (presumedly they were created after
> the backup you used to restore the DB). Do you have any later backups?
> BTW, every table & proc in a DB has an owner. To be sure you're just
> not missing it in whatever client-side tool you're using execute this T-SQL:
> select o.[name] as tablename, u.[name] as ownername, type
> from dbo.sysobjects as o
> inner join dbo.sysusers as u on o.uid = o.uid
> order by type, u.[name], o.[name]
> Have a look to see if you can see the proc (type P) or the table (type
> U) somewhere in the resultset. Also are you sure these "vital" tables &
> procs were in the same database and weren't in another database that was
> being referenced from your database? For example,
> use A
> go
> select * from B.dbo.MyVitalTable
> exec B.dbo.MyVitalProc
> If that was true then they wouldn't be included in the backup (and
> therefore subsequent restore) of your database.
> --
> *mike hodgson*
> blog: http://sqlnerd.blogspot.com
>
> Old Paulie wrote:
> >I have been running a desktop PC with MSDE 1.0 installed. I had made a
> >backup of the data using a t-sql command backup database ... Since this PC
> >had crashed and has subsequently been rebuilt, I have restored the database
> >but found that vital tables and stored procedures are missing. The missing
> >tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
> >into the database as user sa.
> >
> >Any help in recovering those missing tables and stored procedures would be
> >greatly appreciated|||One last chance. Perhaps your backup file has several backups on it, and you restore the first one?
Check using RESTORE HEADERONLY.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...
> Hi Mike,
> I am quite sure that the vital tables belonged to my database as I had
> created no others! I did run your query and did not find and records
> relating to the missing tables and stored procedures. From your advice and
> 'saradhi's', it is obvious now that my backup was flawed and I am doing
> something wrong:( Thank you for your assistance.
> "Mike Hodgson" wrote:
>> If they're missing after a restore then they were not there at the time
>> of the back and are now gone forever (presumedly they were created after
>> the backup you used to restore the DB). Do you have any later backups?
>> BTW, every table & proc in a DB has an owner. To be sure you're just
>> not missing it in whatever client-side tool you're using execute this T-SQL:
>> select o.[name] as tablename, u.[name] as ownername, type
>> from dbo.sysobjects as o
>> inner join dbo.sysusers as u on o.uid = o.uid
>> order by type, u.[name], o.[name]
>> Have a look to see if you can see the proc (type P) or the table (type
>> U) somewhere in the resultset. Also are you sure these "vital" tables &
>> procs were in the same database and weren't in another database that was
>> being referenced from your database? For example,
>> use A
>> go
>> select * from B.dbo.MyVitalTable
>> exec B.dbo.MyVitalProc
>> If that was true then they wouldn't be included in the backup (and
>> therefore subsequent restore) of your database.
>> --
>> *mike hodgson*
>> blog: http://sqlnerd.blogspot.com
>>
>> Old Paulie wrote:
>> >I have been running a desktop PC with MSDE 1.0 installed. I had made a
>> >backup of the data using a t-sql command backup database ... Since this PC
>> >had crashed and has subsequently been rebuilt, I have restored the database
>> >but found that vital tables and stored procedures are missing. The missing
>> >tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
>> >into the database as user sa.
>> >
>> >Any help in recovering those missing tables and stored procedures would be
>> >greatly appreciated|||Tibor,
It turns out that my backup DID include several backup sets and I was
therefore able to restore the most recent backup set to get back all missing
tables and procedures.
THANK YOU VERY MUCH!
"Tibor Karaszi" wrote:
> One last chance. Perhaps your backup file has several backups on it, and you restore the first one?
> Check using RESTORE HEADERONLY.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Old Paulie" <OldPaulie@.discussions.microsoft.com> wrote in message
> news:BADA21C1-5F74-4E9A-83FD-779132C78585@.microsoft.com...
> > Hi Mike,
> >
> > I am quite sure that the vital tables belonged to my database as I had
> > created no others! I did run your query and did not find and records
> > relating to the missing tables and stored procedures. From your advice and
> > 'saradhi's', it is obvious now that my backup was flawed and I am doing
> > something wrong:( Thank you for your assistance.
> >
> > "Mike Hodgson" wrote:
> >
> >> If they're missing after a restore then they were not there at the time
> >> of the back and are now gone forever (presumedly they were created after
> >> the backup you used to restore the DB). Do you have any later backups?
> >>
> >> BTW, every table & proc in a DB has an owner. To be sure you're just
> >> not missing it in whatever client-side tool you're using execute this T-SQL:
> >>
> >> select o.[name] as tablename, u.[name] as ownername, type
> >> from dbo.sysobjects as o
> >> inner join dbo.sysusers as u on o.uid = o.uid
> >> order by type, u.[name], o.[name]
> >>
> >> Have a look to see if you can see the proc (type P) or the table (type
> >> U) somewhere in the resultset. Also are you sure these "vital" tables &
> >> procs were in the same database and weren't in another database that was
> >> being referenced from your database? For example,
> >>
> >> use A
> >> go
> >>
> >> select * from B.dbo.MyVitalTable
> >> exec B.dbo.MyVitalProc
> >>
> >> If that was true then they wouldn't be included in the backup (and
> >> therefore subsequent restore) of your database.
> >>
> >> --
> >> *mike hodgson*
> >> blog: http://sqlnerd.blogspot.com
> >>
> >>
> >>
> >> Old Paulie wrote:
> >>
> >> >I have been running a desktop PC with MSDE 1.0 installed. I had made a
> >> >backup of the data using a t-sql command backup database ... Since this PC
> >> >had crashed and has subsequently been rebuilt, I have restored the database
> >> >but found that vital tables and stored procedures are missing. The missing
> >> >tables were not allegedly owned by dbo but perhaps had no owner(?) PS I log
> >> >into the database as user sa.
> >> >
> >> >Any help in recovering those missing tables and stored procedures would be
> >> >greatly appreciated
>
missing tables
Originally the database was a access 2000 database. This soon proved not to be up to the task. The server people converted the database to sql 2000 and everything is working on the site. However my backup has a problem. In the manager I can see all the tables that were there before. But when I go to run a query on the database through CF the only tables that it can see are tables that were created after the access conversion. I have gone in and checked permissions and set every table and every column to public and still cannot see the missing tables. Any help?
What is CF?
How did the the server people move the Access tables to SQL Server?
Are you having this problem with the backup that you mention or with the original copy on the server?
Mike
|||CF is Cold Fusion.I have no idea how they converted the Access to SQL
I am only having this problem with the backup.|||
Well, I have no idea how Cold Fusion works, it's always possible that they read the file is some "special" way that is causing this. But there is also the fact that the backup is "sort of" working.
As a first test, it would be worth checking if you can see the tables using some other tool. Try creating linked tables to your database in Access using the Link Table wizard and see if the behavior is any different. If it works in Access, then I'd say pursue the problem with the Cold Fusion people, if it behaves the same in Access, then it we should investigate the backup it self and did into the "sort of" part of the equation.
Mike
|||I had allready thought of that. PHP cannot see the hidden tables either. My access wont let me do linked tables to sql. I only have access 2000 and I guess that it doesnt do that.|||Odd, Access has supported linked tables to SQL since 2.0.
I'm assuming that you can see the tables using SQL tools such as Management Studio, right? Could you check what Schema the tables that you cannot see from other programs belong to?
If you can see tables that are created in SQL, the answer might just be to recreate these tables directly in SQL. You could script out the problem tables, change the names of the original, recreate the tables using the scripts and then move the data. I don't know how many tables we're talking about here, but it's worth looking into if it gets you up and running. (Try it with one table to see if it works.)
Mike
missing tables
Originally the database was a access 2000 database. This soon proved not to be up to the task. The server people converted the database to sql 2000 and everything is working on the site. However my backup has a problem. In the manager I can see all the tables that were there before. But when I go to run a query on the database through CF the only tables that it can see are tables that were created after the access conversion. I have gone in and checked permissions and set every table and every column to public and still cannot see the missing tables. Any help?
What is CF?
How did the the server people move the Access tables to SQL Server?
Are you having this problem with the backup that you mention or with the original copy on the server?
Mike
|||CF is Cold Fusion.I have no idea how they converted the Access to SQL
I am only having this problem with the backup.|||
Well, I have no idea how Cold Fusion works, it's always possible that they read the file is some "special" way that is causing this. But there is also the fact that the backup is "sort of" working.
As a first test, it would be worth checking if you can see the tables using some other tool. Try creating linked tables to your database in Access using the Link Table wizard and see if the behavior is any different. If it works in Access, then I'd say pursue the problem with the Cold Fusion people, if it behaves the same in Access, then it we should investigate the backup it self and did into the "sort of" part of the equation.
Mike
|||I had allready thought of that. PHP cannot see the hidden tables either. My access wont let me do linked tables to sql. I only have access 2000 and I guess that it doesnt do that.|||Odd, Access has supported linked tables to SQL since 2.0.
I'm assuming that you can see the tables using SQL tools such as Management Studio, right? Could you check what Schema the tables that you cannot see from other programs belong to?
If you can see tables that are created in SQL, the answer might just be to recreate these tables directly in SQL. You could script out the problem tables, change the names of the original, recreate the tables using the scripts and then move the data. I don't know how many tables we're talking about here, but it's worth looking into if it gets you up and running. (Try it with one table to see if it works.)
Mike
missing tables
tables in the master database. All the others disappeared. I need them for
running my old stored procedures. Do I have to reinstall 2000 to get back
the functionality?
AntoninWhat we used to call system tables are not implemented as views. Read in Books Online about
"compatibility views".
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Antonin" <antonin@.comphub.com> wrote in message news:uoQXFfwgHHA.1244@.TK2MSFTNGP04.phx.gbl...
>I upgraded SQL Server 2000 with 2005 Developer. Now, I have only 6 system tables in the master
>database. All the others disappeared. I need them for running my old stored procedures. Do I have
>to reinstall 2000 to get back the functionality?
> Antonin
>|||Thanks Tibor,
I can not find any how to fix this:
'Invalid object name 'master.dbo.sysxlogins'
Antonin
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uZKmhnxgHHA.4892@.TK2MSFTNGP03.phx.gbl...
> What we used to call system tables are not implemented as views. Read in
> Books Online about "compatibility views".
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Antonin" <antonin@.comphub.com> wrote in message
> news:uoQXFfwgHHA.1244@.TK2MSFTNGP04.phx.gbl...
>>I upgraded SQL Server 2000 with 2005 Developer. Now, I have only 6 system
>>tables in the master database. All the others disappeared. I need them for
>>running my old stored procedures. Do I have to reinstall 2000 to get back
>>the functionality?
>> Antonin
>|||When you use undocumented features in a product you need to expect things like these. Sysxlogins
wasn't documented.
The old system tables (what was documented) are now called compatibility views. The new views has a
high degree of backwards compatibility, but again for what was documented in the first plans. These
are meant for backwards compatibility and the replacement are the new catalog views.
So, you need to go through your code and find what code uses old undocumented stuff, and fix it
before it will run (well) on 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Antonin" <antonin@.comphub.com> wrote in message news:%23cXL6rygHHA.4992@.TK2MSFTNGP06.phx.gbl...
> Thanks Tibor,
> I can not find any how to fix this:
> 'Invalid object name 'master.dbo.sysxlogins'
> Antonin
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:uZKmhnxgHHA.4892@.TK2MSFTNGP03.phx.gbl...
>> What we used to call system tables are not implemented as views. Read in Books Online about
>> "compatibility views".
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Antonin" <antonin@.comphub.com> wrote in message news:uoQXFfwgHHA.1244@.TK2MSFTNGP04.phx.gbl...
>>I upgraded SQL Server 2000 with 2005 Developer. Now, I have only 6 system tables in the master
>>database. All the others disappeared. I need them for running my old stored procedures. Do I have
>>to reinstall 2000 to get back the functionality?
>> Antonin
>>
>|||> When you use undocumented features in a product you need to expect things
> like these. Sysxlogins wasn't documented.
Sadly, though, Microsoft does talk about it in their documentation. In SQL
Server 2000 Books Online, look at these topics:
Resolving Permission Conflicts
SQL Profiler Data Columns
And in 2005, there is a topic (Breaking Changes to Database Engine Features
in SQL Server 2005, ironically!) that says:
<snip>
You can identify dormant SQL Server 6.5 logins by using the following query:
SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
</snip>
They corrected a similar issue I brought up on connect a while back, where
sp_who2 was mentioned in a single Books Online article. I just entered a
new one for this omission, which will at least correct the 2005 issue.
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245|||I found somewhere that I should use syslogins view in 2005 instead of
sysxlogins. Now I get when running this
SELECT 'ServerRole' = A.name, 'MemberName' = B.name
FROM master.dbo.spt_values A, master.dbo.syslogins B
WHERE A.low = 0
AND A.type = 'SRV'
AND B.srvid IS NULL
AND A.number & B.xstatus = A.number
Server: Msg 207, Level 16, State 1, Line 6
Invalid column name 'srvid'.
Server: Msg 207, Level 16, State 1, Line 7
Invalid column name 'xstatus'.
Where can I find the mappings between sysxlogins and syslogins columns?
Antonin
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%239yaPC1gHHA.4872@.TK2MSFTNGP03.phx.gbl...
>> When you use undocumented features in a product you need to expect things
>> like these. Sysxlogins wasn't documented.
> Sadly, though, Microsoft does talk about it in their documentation. In
> SQL Server 2000 Books Online, look at these topics:
> Resolving Permission Conflicts
> SQL Profiler Data Columns
> And in 2005, there is a topic (Breaking Changes to Database Engine
> Features in SQL Server 2005, ironically!) that says:
> <snip>
> You can identify dormant SQL Server 6.5 logins by using the following
> query:
> SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
> </snip>
> They corrected a similar issue I brought up on connect a while back, where
> sp_who2 was mentioned in a single Books Online article. I just entered a
> new one for this omission, which will at least correct the 2005 issue.
> http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245
>|||"Antonin" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
news:%23Sm1vyVhHHA.1240@.TK2MSFTNGP04.phx.gbl...
>I found somewhere that I should use syslogins view in 2005 instead of
>sysxlogins. Now I get when running this
> SELECT 'ServerRole' = A.name, 'MemberName' = B.name
> FROM master.dbo.spt_values A, master.dbo.syslogins B
> WHERE A.low = 0
> AND A.type = 'SRV'
> AND B.srvid IS NULL
> AND A.number & B.xstatus = A.number
> Server: Msg 207, Level 16, State 1, Line 6
> Invalid column name 'srvid'.
> Server: Msg 207, Level 16, State 1, Line 7
> Invalid column name 'xstatus'.
> Where can I find the mappings between sysxlogins and syslogins columns?
Perhaps you can tell us what you're trying to do and someone can suggest a
better way to do that in SQL 2005.
In general, any time you mess with system tables, you risk running into
issues like this.
> Antonin
>
> "Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in
> message news:%239yaPC1gHHA.4872@.TK2MSFTNGP03.phx.gbl...
>> When you use undocumented features in a product you need to expect
>> things like these. Sysxlogins wasn't documented.
>> Sadly, though, Microsoft does talk about it in their documentation. In
>> SQL Server 2000 Books Online, look at these topics:
>> Resolving Permission Conflicts
>> SQL Profiler Data Columns
>> And in 2005, there is a topic (Breaking Changes to Database Engine
>> Features in SQL Server 2005, ironically!) that says:
>> <snip>
>> You can identify dormant SQL Server 6.5 logins by using the following
>> query:
>> SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
>> </snip>
>> They corrected a similar issue I brought up on connect a while back,
>> where sp_who2 was mentioned in a single Books Online article. I just
>> entered a new one for this omission, which will at least correct the 2005
>> issue.
>> http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245
>
--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html|||Below is the whole code. I inherited this. It runs a security report every
morning at six o'clock. I tried to work out what it is doing by running it.
However, I was not able to do it. I thing that there are some much smarter
guys than I am in this group and for them it would be obvious. I know,
everybody has other things to do than debugging someone else's code.
Nevertheless I would appreciate help. Thank you.
Antonin
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.usp_GenerateSecurityReport
AS
SET NOCOUNT ON
PRINT 'SERVER: ' + CAST(SERVERPROPERTY('servername') AS Varchar) + '\' +
ISNULL(CONVERT(char(20),SERVERPROPERTY('InstanceName')),'DEFAULT')
PRINT ''
PRINT 'Server Role members'
PRINT ''
SELECT 'ServerRole' = A.name, 'MemberName' = B.name
FROM master.dbo.spt_values A, master.dbo.sysxlogins B
WHERE A.low = 0
AND A.type = 'SRV'
AND B.srvid IS NULL
AND A.number & B.xstatus = A.number
PRINT ''
PRINT 'Database Role members'
PRINT ''
DECLARE curSecurity CURSOR FAST_FORWARD FOR
SELECT [name] FROM master..sysdatabases
DECLARE @.vchName varchar(50)
DECLARE @.vchSQL varchar(3000)
OPEN curSecurity
FETCH NEXT FROM curSecurity INTO @.vchName
WHILE @.@.FETCH_STATUS = 0
BEGIN
PRINT 'Database Name: ' + @.vchName
PRINT ''
SET @.vchSQL = 'select substring(r.[name], 1, 30) AS RoleName,
SUBSTRING(u.[name], 1, 50) AS DB_User
from ' + @.vchName + '.dbo.sysusers r
inner join ' + @.vchName + '.dbo.sysmembers m on m.groupuid = r.uid
inner join ' + @.vchName + '.dbo.sysusers u on u.uid = m.memberuid
where r.issqlrole=1
order by 1, 2'
--print @.vchSQL
exec(@.vchSQL)
PRINT ''
FETCH NEXT FROM curSecurity INTO @.vchName
END
CLOSE curSecurity
DEALLOCATE curSecurity
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:Ooy303VhHHA.4300@.TK2MSFTNGP05.phx.gbl...
> "Antonin" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
> news:%23Sm1vyVhHHA.1240@.TK2MSFTNGP04.phx.gbl...
>>I found somewhere that I should use syslogins view in 2005 instead of
>>sysxlogins. Now I get when running this
>> SELECT 'ServerRole' = A.name, 'MemberName' = B.name
>> FROM master.dbo.spt_values A, master.dbo.syslogins B
>> WHERE A.low = 0
>> AND A.type = 'SRV'
>> AND B.srvid IS NULL
>> AND A.number & B.xstatus = A.number
>> Server: Msg 207, Level 16, State 1, Line 6
>> Invalid column name 'srvid'.
>> Server: Msg 207, Level 16, State 1, Line 7
>> Invalid column name 'xstatus'.
>> Where can I find the mappings between sysxlogins and syslogins columns?
> Perhaps you can tell us what you're trying to do and someone can suggest a
> better way to do that in SQL 2005.
> In general, any time you mess with system tables, you risk running into
> issues like this.
>
>> Antonin
>>
>> "Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in
>> message news:%239yaPC1gHHA.4872@.TK2MSFTNGP03.phx.gbl...
>> When you use undocumented features in a product you need to expect
>> things like these. Sysxlogins wasn't documented.
>> Sadly, though, Microsoft does talk about it in their documentation. In
>> SQL Server 2000 Books Online, look at these topics:
>> Resolving Permission Conflicts
>> SQL Profiler Data Columns
>> And in 2005, there is a topic (Breaking Changes to Database Engine
>> Features in SQL Server 2005, ironically!) that says:
>> <snip>
>> You can identify dormant SQL Server 6.5 logins by using the following
>> query:
>> SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
>> </snip>
>> They corrected a similar issue I brought up on connect a while back,
>> where sp_who2 was mentioned in a single Books Online article. I just
>> entered a new one for this omission, which will at least correct the
>> 2005 issue.
>> http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245
>>
> --
> Greg Moore
> SQL Server DBA Consulting Remote and Onsite available!
> Email: sql (at) greenms.com
> http://www.greenms.com/sqlserver.html
>
missing tables
tables in the master database. All the others disappeared. I need them for
running my old stored procedures. Do I have to reinstall 2000 to get back
the functionality?
Antonin
What we used to call system tables are not implemented as views. Read in Books Online about
"compatibility views".
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Antonin" <antonin@.comphub.com> wrote in message news:uoQXFfwgHHA.1244@.TK2MSFTNGP04.phx.gbl...
>I upgraded SQL Server 2000 with 2005 Developer. Now, I have only 6 system tables in the master
>database. All the others disappeared. I need them for running my old stored procedures. Do I have
>to reinstall 2000 to get back the functionality?
> Antonin
>
|||Thanks Tibor,
I can not find any how to fix this:
'Invalid object name 'master.dbo.sysxlogins'
Antonin
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uZKmhnxgHHA.4892@.TK2MSFTNGP03.phx.gbl...
> What we used to call system tables are not implemented as views. Read in
> Books Online about "compatibility views".
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Antonin" <antonin@.comphub.com> wrote in message
> news:uoQXFfwgHHA.1244@.TK2MSFTNGP04.phx.gbl...
>
|||When you use undocumented features in a product you need to expect things like these. Sysxlogins
wasn't documented.
The old system tables (what was documented) are now called compatibility views. The new views has a
high degree of backwards compatibility, but again for what was documented in the first plans. These
are meant for backwards compatibility and the replacement are the new catalog views.
So, you need to go through your code and find what code uses old undocumented stuff, and fix it
before it will run (well) on 2005.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Antonin" <antonin@.comphub.com> wrote in message news:%23cXL6rygHHA.4992@.TK2MSFTNGP06.phx.gbl...
> Thanks Tibor,
> I can not find any how to fix this:
> 'Invalid object name 'master.dbo.sysxlogins'
> Antonin
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:uZKmhnxgHHA.4892@.TK2MSFTNGP03.phx.gbl...
>
|||> When you use undocumented features in a product you need to expect things
> like these. Sysxlogins wasn't documented.
Sadly, though, Microsoft does talk about it in their documentation. In SQL
Server 2000 Books Online, look at these topics:
Resolving Permission Conflicts
SQL Profiler Data Columns
And in 2005, there is a topic (Breaking Changes to Database Engine Features
in SQL Server 2005, ironically!) that says:
<snip>
You can identify dormant SQL Server 6.5 logins by using the following query:
SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
</snip>
They corrected a similar issue I brought up on connect a while back, where
sp_who2 was mentioned in a single Books Online article. I just entered a
new one for this omission, which will at least correct the 2005 issue.
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245
|||I found somewhere that I should use syslogins view in 2005 instead of
sysxlogins. Now I get when running this
SELECT 'ServerRole' = A.name, 'MemberName' = B.name
FROM master.dbo.spt_values A, master.dbo.syslogins B
WHERE A.low = 0
AND A.type = 'SRV'
AND B.srvid IS NULL
AND A.number & B.xstatus = A.number
Server: Msg 207, Level 16, State 1, Line 6
Invalid column name 'srvid'.
Server: Msg 207, Level 16, State 1, Line 7
Invalid column name 'xstatus'.
Where can I find the mappings between sysxlogins and syslogins columns?
Antonin
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%239yaPC1gHHA.4872@.TK2MSFTNGP03.phx.gbl...
> Sadly, though, Microsoft does talk about it in their documentation. In
> SQL Server 2000 Books Online, look at these topics:
> Resolving Permission Conflicts
> SQL Profiler Data Columns
> And in 2005, there is a topic (Breaking Changes to Database Engine
> Features in SQL Server 2005, ironically!) that says:
> <snip>
> You can identify dormant SQL Server 6.5 logins by using the following
> query:
> SELECT * FROM sysxlogins WHERE (xstatus & 2048) = 2048;
> </snip>
> They corrected a similar issue I brought up on connect a while back, where
> sp_who2 was mentioned in a single Books Online article. I just entered a
> new one for this omission, which will at least correct the 2005 issue.
> http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=272245
>
|||"Antonin" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
news:%23Sm1vyVhHHA.1240@.TK2MSFTNGP04.phx.gbl...
>I found somewhere that I should use syslogins view in 2005 instead of
>sysxlogins. Now I get when running this
> SELECT 'ServerRole' = A.name, 'MemberName' = B.name
> FROM master.dbo.spt_values A, master.dbo.syslogins B
> WHERE A.low = 0
> AND A.type = 'SRV'
> AND B.srvid IS NULL
> AND A.number & B.xstatus = A.number
> Server: Msg 207, Level 16, State 1, Line 6
> Invalid column name 'srvid'.
> Server: Msg 207, Level 16, State 1, Line 7
> Invalid column name 'xstatus'.
> Where can I find the mappings between sysxlogins and syslogins columns?
Perhaps you can tell us what you're trying to do and someone can suggest a
better way to do that in SQL 2005.
In general, any time you mess with system tables, you risk running into
issues like this.
> Antonin
>
> "Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in
> message news:%239yaPC1gHHA.4872@.TK2MSFTNGP03.phx.gbl...
>
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html
|||Below is the whole code. I inherited this. It runs a security report every
morning at six o'clock. I tried to work out what it is doing by running it.
However, I was not able to do it. I thing that there are some much smarter
guys than I am in this group and for them it would be obvious. I know,
everybody has other things to do than debugging someone else's code.
Nevertheless I would appreciate help. Thank you.
Antonin
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.usp_GenerateSecurityReport
AS
SET NOCOUNT ON
PRINT 'SERVER: ' + CAST(SERVERPROPERTY('servername') AS Varchar) + '\' +
ISNULL(CONVERT(char(20),SERVERPROPERTY('InstanceNa me')),'DEFAULT')
PRINT ''
PRINT 'Server Role members'
PRINT ''
SELECT 'ServerRole' = A.name, 'MemberName' = B.name
FROM master.dbo.spt_values A, master.dbo.sysxlogins B
WHERE A.low = 0
AND A.type = 'SRV'
AND B.srvid IS NULL
AND A.number & B.xstatus = A.number
PRINT ''
PRINT 'Database Role members'
PRINT ''
DECLARE curSecurity CURSOR FAST_FORWARD FOR
SELECT [name] FROM master..sysdatabases
DECLARE @.vchName varchar(50)
DECLARE @.vchSQL varchar(3000)
OPEN curSecurity
FETCH NEXT FROM curSecurity INTO @.vchName
WHILE @.@.FETCH_STATUS = 0
BEGIN
PRINT 'Database Name: ' + @.vchName
PRINT ''
SET @.vchSQL = 'select substring(r.[name], 1, 30) AS RoleName,
SUBSTRING(u.[name], 1, 50) AS DB_User
from ' + @.vchName + '.dbo.sysusers r
inner join ' + @.vchName + '.dbo.sysmembers m on m.groupuid = r.uid
inner join ' + @.vchName + '.dbo.sysusers u on u.uid = m.memberuid
where r.issqlrole=1
order by 1, 2'
--print @.vchSQL
exec(@.vchSQL)
PRINT ''
FETCH NEXT FROM curSecurity INTO @.vchName
END
CLOSE curSecurity
DEALLOCATE curSecurity
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
"Greg D. Moore (Strider)" <mooregr_deleteth1s@.greenms.com> wrote in message
news:Ooy303VhHHA.4300@.TK2MSFTNGP05.phx.gbl...
> "Antonin" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
> news:%23Sm1vyVhHHA.1240@.TK2MSFTNGP04.phx.gbl...
> Perhaps you can tell us what you're trying to do and someone can suggest a
> better way to do that in SQL 2005.
> In general, any time you mess with system tables, you risk running into
> issues like this.
>
> --
> Greg Moore
> SQL Server DBA Consulting Remote and Onsite available!
> Email: sql (at) greenms.com
> http://www.greenms.com/sqlserver.html
>