If the stored procedure is prefixed with sp and you don't specify the database in the execute command the server will first search the master database. If it's not found there it will then search your current connection database.
I would say it's good practice to have all user databases SP's...
Make sure the 6.5 server is linked to your 2000 server. The syntax for the sql is:
select * from 65server.65database.dbo.65table
Assuming dbo is the owner of the 6.5 table in this example.
Rick.
Sorry but I'm not familiar with scptsfr.exe. And you can not create scripts dynamically from Enterprise Manager to CREATE and DROP databases.
All I can offer you is that if you look in Books Online under the topic "CREATE DATABASE (T-SQL)" AND "DROP DATABASE (T-SQL)".
The...
I assume you have a script which creates all your tables/constraints/stored procedures etc??
You can add into this script the DROP DATABASE and CREATE DATABASE commands.
Is this what your after or have I missed the point.
Rick.
Only my personal opinion here but I hate it where users all come into SQL with the same username.
I do have one server, which uses some third party software and works in this manner. I have had problems before where I needed to know who was running one particular process and couldn't find out...
If your talking about the system stored procedures which begin with dt??
If so these are created when you first try to view/create/edit database diagrams from within Erntrprise Manager. A dtproperties system table is also created.
Nothing to worry about.
Rick.
In Enterprise Manager navigate to Management then Current Activity and finally Process Info.
Another way is by running the stored procedures sp_who or sp_who2 from a Query Analyser window.
Also you could run the query:
select * from master..sysprocesses
Rick.
Unfortunately the method Jitter describes does not exist in SQL 7.0.
One way is using the ALTER TABLE T-SQL command and adding a FOREIGN KEY constraint from there.
The other method is to create a database diagram add the required tables and then you can use drag and drop on the required...
Please note if you restore master from another server , you will loose references to any current databases you have on your new server.
In general a restore of master is only required if it is corrupt or you are transferring over onto a brand new install.
Normal practice when just restoring...
Yes all you need is those files for each database you need to restore. The databases will be exactly as there were so your diagarms will also be included.
sp_detach_db deletes the database references from the master database but does not delete the physical mdf or ldf files.
Rick.
Have a look at FAQ in this section of the forum and then the following topic "What are SQL Books Online & Where Can I Find Them?" in section 10.
Rick.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.