|
Please tell me what error you are getting.
|
|
|
|
|
i get a messagebox telling me that i cant erease system objects, im trying to delete sp_who from master database.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
[^]
|
|
|
|
|
You need to perform the entire query with T-SQL as follows:
<br />
use master<br />
go<br />
execute sp_configure 'allow updates',1<br />
go<br />
reconfigure with override<br />
go<br />
drop procedure sp_who<br />
go<br />
execute sp_configure 'allow updates',0<br />
go<br />
reconfigure with override<br />
go<br />
|
|
|
|
|
thanks that worked , thanks for your help.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
[^]
|
|
|
|
|
Is it possible to specify the port of a server in a DSN (when it not 1433, for instance)?
|
|
|
|
|
Yes it is:
connection.ConnectionString="driver={SQL Server};server=myserver;port=5000;uid=myuser;pwd=mypassword;database=mydatabase;"
|
|
|
|
|
Does anybody know of any SQL tools that allow me to formally verify that differently structured SQL statements would result in the same result set?
Thanks,
Ian
--
Ian Darling
|
|
|
|
|
I haven't ever come across any tools like this (so if anyone knows of any tool like this I'd be interested too.)
What you can do is execute the statements into two global temp tables and then compare the temp tables with one of the numerous table diff tools out there.
|
|
|
|
|
Ian Darling wrote:
Does anybody know of any SQL tools that allow me to formally verify that differently structured SQL statements would result in the same result set?
If you are using SQL Server you can use Query Analyzer and dump the results to a file (this is a menu option). Then use WinDiff against another dataset that you have dumped to compare.
-Nick Parker
|
|
|
|
|
That's a good way, but you could also write some SQL to do it:
SELECT * FROM query1name INNER JOIN query2name ON query1name.primarykey < > qurery2name.primarykey;
If you get anything back, you know that they return different results (at least in the current situation).
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
This would only verify that the same primary keys exist but does not necessarily verify that the other fields in the rows are the same.
|
|
|
|
|
But they are returning results from the same table, so if the primary key was the same, then the results would be the same, right?
Maybe I was taking it as a given that this was so - are you talking about comparing results from different tables?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
The following two select statements return different results even though they return the same keys, so the results are different:
select prkey, name, address from mytable
select prkey, name, address, dob from mytable
So, effectively, the resultsets are different.
|
|
|
|
|
You're right.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
what is the syntax for executing oracle queries directly
like what i want to do is , on the click of a button on a form in vb.net , i want to delete the rows in a table
ie the query should be (delete qset )
|
|
|
|
|
how convert a ado connection to a oledbconnection ?
how can i?
|
|
|
|
|
wangzhibin wrote:
how convert a ado connection to a oledbconnection ?
how can i?
Are you using ADO 2.5 or ADO.NET? If you are using .NET, you can use the OleDbConnection class. If you are using ADO 2.5 (pre .NET) then you need to add "Provider=sqloledb;" as part of your connection string to the database.
-Nick Parker
|
|
|
|
|
hello @all,
if i merge one e.g. access data base in a c++ or a java program over ODBC/JDBC, must i have installed then access on the pc?
thank you very much
sunny
|
|
|
|
|
I think you just have to have the Jet database engine. This is installed when access is installed, but you can also redistribute it. I don't know what the licensing is, but you can probably find out on www.microsoft.com.
Do unto others as you would have them do unto you - Jesus
An eye for an eye only makes the whole world blind - Mahatma Gandhi
|
|
|
|
|
Is there a method to detect if a column has a primary key set, using ADO for C++.
Thanks
|
|
|
|
|
I had created a database(SQL Server) few motnhs before but
unfortunately the database is now missing ,i have only the .mdf file of that database(.ldf is also missing),Can someone tell me how to recover the database from the .mdf file.
Thanx
Pradipta
|
|
|
|
|
You should be able to reattach the .mdf file to sql server. You can do this with Enterprise Manager, or the sp_attach_db system stored proc.
You may get a warning about not having the corresponding .ldf.
Without nipples, breasts would be pointless.
|
|
|
|
|
I tried the following
EXEC sp_attach_db @dbname = N'pubs',
@filename1 = N'c:\mssql7\data\pubs.mdf'
But I am getting following error using the above Stored procedure
--------------------------------------------------------
Server: Msg 5105, Level 16, State 4, Line 1
Device activation error. The physical file name 'c:\mssql7\data\pubs.mdf' may be incorrect.
------------------------------------------------------
But the physical path is correct.I also tried with
sp_attach_single_file_db but same error results.
How can i do the same using Enterprise Manager,It will be highly appreciated if u tell me step by step.
|
|
|
|
|
pradipta wrote:
N'c:\mssql7\data\pubs.mdf'
Are you using SQL Server 7? I can explain how I do it with 2000, but I assume it would be similar process.
Open Enterprise Manager.
Expand the tree until you find your database server instance. Expand that.
Right-click on Databases, select All Tasks -> Attach Database.
Browse [...] for your database file.
As for the error you are receiving, I don't know what the problem might be.
Was the file detached from the original database, or just copied? That may cause problems potentially. But I'm no DBA, so I can't say for sure.
Good luck
Without nipples, breasts would be pointless.
|
|
|
|
|
Thanx a lot,Yeah this is working as per my requirement
Thanx again
With Regards
Pradipta
|
|
|
|