Obsolete Objects
Apr 23, 2008
Hello,
I need to find all of the SQL Server objects, (tables, procs, functions, etc.) that my application is NOT using, so they can be removed from the system. Does anyone know how to accomplish this?
Thank you,
Dave
View 2 Replies
ADVERTISEMENT
Oct 17, 2002
Hi everybody,
We have merge replication between two servers with Sql Server 2000 Service Pack 2, and the Merge agent display the follow message :
The snapshot for this publication has become obsolete. The snapshot agent needs to be run again before the subscription can be synchronized.
But i have changes at the suscriber, How can I do to Merge the last changes if the merge agentes is stopped.
I appreciate any help.
thanks
View 1 Replies
View Related
Jan 7, 2005
:mad: It seems that the SQLmaint is going to obsolete in SQL 2005, what happen to my "sophisticated" SQLmaint scripts!!!! Any help or comment?
View 8 Replies
View Related
Feb 4, 2005
When I find that a column should no longer be used because of design changes. ( Moved column to other table to correct design normalization etc.)
I added a check to make sure the column must be NULL.
The following list the obsolete columns
SELECT col.TABLE_NAME + '.' + col.COLUMN_NAME AS FULL_COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS col
JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu
ON col.COLUMN_NAME = ccu.COLUMN_NAME AND col.TABLE_SCHEMA = ccu.TABLE_SCHEMA AND col.TABLE_NAME = ccu.TABLE_NAME
JOIN INFORMATION_SCHEMA.CHECK_CONSTRAINTS cc
ON ccu.CONSTRAINT_SCHEMA = cc.CONSTRAINT_SCHEMA AND ccu.CONSTRAINT_NAME = cc.CONSTRAINT_NAME
WHERE IS_NULLABLE = 'YES' AND cc.CHECK_CLAUSE = '([' + col.COLUMN_NAME + '] IS NULL)'
ORDER BY col.TABLE_NAME, col.COLUMN_NAME
In the past columns could not be set to null.
This script list those columns that I need to add null checks to.
SELECT col.TABLE_NAME + '.' + col.COLUMN_NAME AS FULL_COLUMN_NAME, cc.CHECK_CLAUSE
FROM INFORMATION_SCHEMA.COLUMNS col
JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu
ON col.COLUMN_NAME = ccu.COLUMN_NAME AND col.TABLE_SCHEMA = ccu.TABLE_SCHEMA AND col.TABLE_NAME = ccu.TABLE_NAME
JOIN INFORMATION_SCHEMA.CHECK_CONSTRAINTS cc
ON ccu.CONSTRAINT_SCHEMA = cc.CONSTRAINT_SCHEMA AND ccu.CONSTRAINT_NAME = cc.CONSTRAINT_NAME
WHERE cc.CHECK_CLAUSE LIKE '([[]' + col.COLUMN_NAME + '] =%' AND
NOT cc.CHECK_CLAUSE LIKE '% OR %' AND
NOT cc.CHECK_CLAUSE LIKE '% AND %' AND
NOT cc.CHECK_CLAUSE LIKE '% IS %' AND
NOT cc.CHECK_CLAUSE LIKE '% IN %'
ORDER BY col.TABLE_NAME, col.COLUMN_NAME
Tim S
View 2 Replies
View Related
Jun 1, 2007
I recently had a problem with one of my publications that I haven't been able to figure out. Hopefully someone can help me with it.
I got this error last week: You must rerun snapshot because current snapshot files are obsolete. I assume this means the subscription needed to be re-initialized. Is this correct?
If so, I don't understand why. The publication was not changed. The subscription did not expire. The subscription was not marked for reinitialization.
Here are the specifics of my installation:
Merge publication with 1 pull subscription.
Subscriptions set to expire after 14 days.
Merge agent runs every day, every 5 minutes between 12:00:00A & 11:59:59P.
Snapshot agent was run once when publication was created and then disabled.
Publisher SQL ver: 2000 sp3
Publisher Win ver: 2003 sp1
Subscriber SQL ver: 2000 sp3
Subscriber Win ver: 2003 sp1
The subscription was successfully replicating every 5 minutes. The data for 12:35 shows the first problem. Here's the agent history at the time:
runstatus
start_time
comments
error_id
1
5/23/07 12:25
Initializing
0
3
5/23/07 12:25
Connecting to Publisher 'AASTAUSSQL01'
0
3
5/23/07 12:25
Uploaded 4 data changes (3 inserts, 1 updates, 0 deletes, 0 conflicts).
0
3
5/23/07 12:25
Downloaded 7 data changes (2 inserts, 5 updates, 0 deletes, 0 conflicts).
0
2
5/23/07 12:25
Merged 11 data changes (5 inserts, 6 updates, 0 deletes, 0 resolved conflicts).
0
1
5/23/07 12:30
Initializing
0
3
5/23/07 12:30
Connecting to Publisher 'AASTAUSSQL01'
0
3
5/23/07 12:30
Uploaded 4 data changes (3 inserts, 1 updates, 0 deletes, 0 conflicts).
0
3
5/23/07 12:30
Downloaded 20 data changes (14 inserts, 6 updates, 0 deletes, 0 conflicts).
0
2
5/23/07 12:30
Merged 24 data changes (17 inserts, 7 updates, 0 deletes, 0 resolved conflicts).
0
1
5/23/07 12:35
Initializing
0
3
5/23/07 12:35
Connecting to Publisher 'AASTAUSSQL01'
0
2
5/23/07 12:35
You must rerun snapshot because current snapshot files are obsolete.
2
1
5/23/07 12:40
Initializing
0
3
5/23/07 12:40
Connecting to Publisher 'AASTAUSSQL01'
0
2
5/23/07 12:40
You must rerun snapshot because current snapshot files are obsolete.
3
1
5/23/07 12:45
Initializing
0
3
5/23/07 12:45
Connecting to Publisher 'AASTAUSSQL01'
0
2
5/23/07 12:45
You must rerun snapshot because current snapshot files are obsolete.
4
Any help with this would be greatly appreciated.
Thanks!
View 11 Replies
View Related
Nov 21, 2006
Hi,
I am in need of some help with this error - I am seeing on my PDA units. Here is my scenario:
I have 5 PDA units that use merge replication with SQL 2005. These PDA units replicate fine. But when I try to sync a 6th or 7th PDA unit, I see the following error:
Source : Microsoft SQL Server 2005 Mobile Edition - The snapshot for this publication has become obsolete. The snapshot agent needs to be run again before the subscription can be synchronized. -2147198698
I know that if I regenerate a new snapshot, I will be able to sync fine. But here are my concerns and questions:
What happens to the first 5 PDAs when I regenerate the a new snapshot.
Will they be able to sync without losing the data?
Does generating a new snapshot, relinitialize all the subscriptions?
Am I missing the whole picture with generating a new snapshot?
Thanks,
P
View 4 Replies
View Related
Mar 22, 2004
Client issues query which sends out individual requests to the 2 OLAP servers that are load balanced. The client evaluates the versions of the returned record sets to ensure the consist data being returned for one single query. Otherwise, this error will be seen:
The cube has been updated by the server the data is now obsolete.
These servers sit behind a cisco 11506 CSS with load balancing based on balance type: least busy server, also persistence based on cookies.
My developer says this worked fine for a long time then just 'started happening'.
any suggestions are appreciated.
View 2 Replies
View Related
Dec 27, 2006
please help newbieI need to create a lot of objects the same type (let's say: schemas)I wish to use paramerized block in loop to do so.- how to put names of my objects to such control-flow?belss you for help
View 5 Replies
View Related
Nov 20, 2013
passing serialised objects to a stored procedure for the purpose of data inserts. I see this as being a way to handle multiple row inserts efficiently.
However, in my limited use of XML data I am not so sure how to link the data when I have a dependency on another "object" within the serialised XML.
Below is a code snippet showing what I have so far.
The first insert statement works fine - but how to retrieve the identifier created by the DB - I want to use an SQL statement that finds the record in the table based on the XML representation (of the PluginInfo), allowing me to insert the ConfigurationInfo with the correct reference to the PluginInfo
DECLARE @Config NVARCHAR(MAX)
DECLARE @Handle AS INT
DECLARE @TransactionCount AS INT
SELECT @Config = '
<ConfigurationDirectory >
<ConfigurationInfo groupKey="Notifications" sectionKey="App.Customization.PluginInfo"
[code]....
View 1 Replies
View Related
Aug 27, 2001
Hi, there,
I use VB to make an dll file and register on my local PC, then use sp_OACreate to create OLE object on local SQL server, it works fine. But when I register that dll on other SQL server, it dosen't work, anybody have idea about this? Thank you.
Tony
View 1 Replies
View Related
Jul 17, 2000
I see these type of objects in Books on Online. I was just wondering
if anyone knows how to use these objects, seems to have lot of good
information. Could these objects be called in VB?
--------------------------------
CreateDate Property (SQL-DMO)
The CreateDate property indicates the date and time the referenced SQLServer object was created.
Applies To
Database Object Table Object
DBObject Object TransactionLog Object
Default Object Trigger Object
Rule Object View Object
StoredProcedure Object
Syntax
object.CreateDate
Part Description
object Expression that evaluates to an object in the Applies To list
Remarks
The string returned is formatted by using the locale setting of the workstation.
Data Type
String
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetCreateDate(SQLDMO_LPBSTR pRetVal);
--------------------------------------------------------
View 1 Replies
View Related
Sep 21, 2007
Anyone know how to grant a user to see all data in sys.objects view?
Thanks.
View 1 Replies
View Related
Sep 21, 2007
Anyone know how to grant a user (who is not a sa) to see all data in sys.objects view?
Thanks.
View 1 Replies
View Related
Jan 25, 2007
Hi everyone,
Primary platform is Framework 2.0 under 32-bit
Production platform will be Framework 2.0 under 64-bit.
I'm concerned about what object should I use in order to launch DTS 2000/7.0 from our .Net service.
Currently it tested fine from a 32-bit environment (sql server 2005 as backend).
Reference: "Microsoft DTSPackage Object Library"
Physical file: dtspkg.dll
My wonder, is there any limitation when it's gonna to work on 64-bit?
Generally speaking, any limitation/issue/drawback for COM objects under 64 bit??
In my project properties appears Any CPU, x86, x64. I've got now Any CPU.
Thanks for your advices,
View 13 Replies
View Related
Apr 4, 2007
I know it's "best practice" to dispose ado.net objects, but does it make a big difference if just the connection is closed? In other words, is the code below good enough or should the DataAdapter & Command be explicitly closed?using (SqlConneciton cn = new SqlConnection(connstr)){ SqlDataAdapter da = new SqlDataAdapter(sql,cn);DataSet ds = new DataSet();da.Fill(ds); SqlCommand cmd = new SqlCommand(someOtherSql,cn);cmd.ExecuteNonQuery(); }
View 2 Replies
View Related
Jun 16, 2008
Hi,
I am a Database called "Cache" user and in it and when creating a new table I can create a column of type Object.
So basically, I can create an object eg. Address that have the following items StreetNo, StreetName, PCode somewhere in my database; then create a table called eg. Employees that have a column called EmployeeAddress of type Address (as my Address Object). Can this be done in SQL Server!?
Thanks.
View 4 Replies
View Related
Mar 21, 2006
Hello people :-)I'm doing some development work with Visual Studio 2005 and SQLServer 2000. My SQL DB is running on a Windows 2000 Server box in the office, and I'm doing the development on my XPPro workstation. Now I've been trying to connect to the Win2000 box though VS and although I can see the server and the DB when I hit ok I get this error"The SQL server specified by these connection propertise does not support managed objects"What the heck does that mean?any help would be great :-)
View 1 Replies
View Related
Feb 22, 2001
I am currently writing a VB app based around a SQLserver2000 database. I have used stored procedures wherever possible to select/update/delete data. I am planning to distribute this app and wonder whether there are any tricks out there for encrypting/setting security so that even the SA account would be unable to read my stored procedures, but obviously be able to execute them?
There are two scenarios - one is where I want to let someone borrow a laptop just for a few days for a demo. Presumably I just give them an unprivileged user account without interactive logon possibilities, by which I mean Enterprise Manager and the other SQLserver Client tools [can I do this?] and control all access from the app.
The other scenario is when the app is purchased and I no longer have control of the SQL Server nor the SA account.
Any pointers would certainly be very useful indeed. Thanks.
View 1 Replies
View Related
Jan 2, 2002
Hi all, I know we can use DTS package to export or import objects from one db to another. Now I need to write a procedure that will perform similar functionality. Any thoughts on this? Thank you!
View 2 Replies
View Related
Jul 26, 2000
Hi,
I am in the process of upgrading database in sql server 6.5 to 7.0.
For that i am following one computer upgrade.
For creating dev environment in my computer i am using Transfer/Objects in 6.5
for transferring database from remote(production) computer to my computer.
Do i need only to transfer Userdatabase alone or do i need to Transfer Master and other ?
Or Is it better to restore dump ?
Thanks
View 4 Replies
View Related
Aug 1, 2000
Hey guys,
Is there any way to hide a particular object(table,sp,tr etc) from
a particular user?
we are developing softwares for the clients..and Once we install our product we dont want the clients site guys to go and delibrately view the data from sql server but through the front end. Is there anyway that i can do that...?
For Eg..the front end codes are capsulated as DLLs so that no can view the code.. Like that for SQL Server..can we do that kinda stuffs to prevent them?
View 5 Replies
View Related
Aug 14, 2000
Is there a way to schedule the creation of script to create database objects?
I am using DTS to transfer data between two 6.5 servers, but I need a way to
sync the stored procs. I thought I could schedule the creation of a script to create all the
procs and then run it every day.
Thanks
View 1 Replies
View Related
Aug 14, 2000
Is there a way to schedule the creation of script to create database objects?
I am using DTS to transfer data between two 6.5 servers, but I need a way to
sync the stored procs. I thought I could schedule the creation of a script to create all the
procs and then run it every day before everyone needs the systems.
Thanks
View 1 Replies
View Related
Jul 31, 2000
SQL server 6.5 stopped responding. The last error messages in the SQL Server Error Log / NT Event log suggested that I increase the Open Objects / Open Databases values. I rebooted the server, increase the configuration values, and rebooted the server again for the new configuration to take affect. I suspect that the front-end application does not release the objects properly when it should; therefore increasing Open Objects / Databases configuration values will only be a temporary fix until they reach the new maximum in some time. However to prove that I need to be able to determine how many open objects / databases are on the server at a point of time. Is there a procedure or a method to determine how many open objects / dtabases are on server?
Any comments or suggestions are greatly appreciated.
Thank you
Marina Somers
View 1 Replies
View Related
Dec 7, 1999
Is there a way to produce a query to look at when and who changed database objects last?
View 1 Replies
View Related
Mar 5, 2003
Is it possible to copy tables/indexes/data from one db to another (on the same server) while specifying a new owner & w/o logging?
View 11 Replies
View Related
Aug 3, 1998
This should be simple. I am transfering one database from box A to the same database structure on box B. Straight transfer with the transfer utility. All objects, all defaults. The problem is that now, not all the objects are transfering. There are about 20 tables that are not being populated. The table gets dropped and recreated, but not populated. There is plenty of disk space and the log is empty. (or so reported) Why are not all the tables going over. I can manually repopulate the tables and no problems. ANY hints are greatly appreciated.
Thanks,
Peter Cwik
View 3 Replies
View Related
Mar 17, 1999
I am not showing any sql objects when trying to monitor my sql server through perfmon. This is the situation when running NT perfmon or SQL perfmon locally on the server or from a workstation through the network. I have found some tech net articles but they all say that the ojects should exist locally on the server. Any ideas?
Thanks David
View 1 Replies
View Related
Mar 12, 1999
I have a strange situation occuring. Our SQL server (BDC on resource domain) loses rpc connectivity after 90 minutes. After that time we cannot log on to the server. Get "System Cannot Log You on C0000017 error. Technet says this is due to a memory leak. THe only thing running on this server is SQL. Recently I changed security from mixed to standard and back to mixed as a test, bumped user connections from 500 to 1000 and moved two new databases to this server. THe strange thing is that after rebooting and ablitly to log on I see the sqlservr.exe process take up 64 mbs of data. But there does not seem to be any other memory indications.
Any ideas?
View 1 Replies
View Related
Sep 3, 2001
how can i copy a data base created in sql server2000 to another server (sqlserver2000)without replication because they're distant and not connected i have tried the DTS but it does'nt copy stored proc ,views,triggers,diagram,...
help please
View 1 Replies
View Related
Dec 28, 2004
Hello, I'm looking for a sizing Excel (or any other format) file, that permits me evaluate the size of my sql server database, actually I have one excel file for Oracle, where I only put the expected # of rows, the average size of the columns, and other few data, and I can get the size (in Megabytes) of a table or an Index.
Could you provide me something similar??
Thanks !
View 1 Replies
View Related
Mar 30, 2015
I have an upgrade to do from Sql-Server 2005 to Sql Server 2014. how I would do the upgrade! Should I install 2014 on another box or the same box (or do I just upgrade over the 2005 version - which seems risky)? How do I transfer all of the objects from 2005 to 2014? I'm referring to the tables/ sprocs/ views/ etc already on 2005?
View 9 Replies
View Related
May 12, 2008
I want to apply the same query for 250 tables (see below).
It would be very painful to code 250 individual queries.
Is there a way to loop through all 250 tables using "sysobjects WHERE type = 'U'", and applying the below code for each table (users table would remain constant)?
select co.*
from company table_type
where not exists(select * from users u
where (u.users_id = type.rn_create_user) or (u.users_id = type.rn_edit_user)
)
View 11 Replies
View Related