|
You don't. The trigger has all the data from the insert/update/delete in special tables called inserted and deleted. Google triggers and yuo will find plenty of examples.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi..
can anybody tell me using c#.net to create advanced search like all words, anywords, and exact word, if i have to search in 5-6 tables, means if i give "red" in search text box then how can i search red in 5-6 tables and i dont know which column contains the word red.
|
|
|
|
|
Check this[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Actually , i am making a car website like cars.com, and i have seen in cars.com they allow search on keywords, I too want to implement that feature but how can i, bcoz i have normalized the features of car into 5-6 tables and i want to search it in that 5-6 tables.
|
|
|
|
|
Hi friends..
1. I want to know abot SQL SERVER Security(Logins, Server Roles, Credentials) under particular server.
2. And about security(users, Roles, Schemas) under particular Database.
Plz let me know detailed explanation with example.
Regards
Willington D
D.Willington
|
|
|
|
|
Try BOL or Google, its too big a subject to answer in a forum - there are loads of articles and advice out there.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi
I was searched with google for sql security..., but i didn't get any usefull topics.., they were confused me. Thats y i posted this query.., If u have any articals plz.. let me know the URL.
Regards,
Willington D
D.Willington
|
|
|
|
|
If you cannot find a simple enough article to explain SQL security then perhaps you would be better off employing someone who does understand it to set up the security on your system. The saying 'a little knowledge is a dangerous thing' is very applicable to security.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
To big a topic to give "detailed explanation with example", and well - that would also mean I'd do your work for you.
So I'll simply say that you should read the SQL Server documentation, some books about SQL Server administration (SQL Server 2005 Administrators Companion provides a chapter on it) and "online books" from MSDN.
|
|
|
|
|
Hello Friends
I want Sql Server 2005 to work in a LAN
Please let me know how to configure it
Thanks
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Could you be more specific about what you're struggling with?
If your network is up and running and your software firewalls are on both Server and Clients are set up correctly, you shouldn't be having any trouble.
It's really straight forward in most cases.
|
|
|
|
|
Hi,
am trying to upsize certain tables in MS Database to SQL.I tried the upsizing wizard,but for certain tables its giving me errors like "unable to drop table".
Is their any stored procedures which will help us to upsize the ables to SQL?
|
|
|
|
|
Create the tables in SQL then import the data from the MDB.
If you have multiple tables with constraints, either import the data in the correct order, or temporarili remove the constraints.
|
|
|
|
|
Im using sql2005
Im trying to export my DB to another server
The problem is with dependencies
The Generate Scripts option really sucks, i cant beleive this is the best that a bunch of guys at microsoft can come up with
It scripts SP1, before tables referenced by SP1, and it only gets worst when trying to export the whole DB
What are you guys using to export your DB to a remote server??
Ive tried scriptio already but it doesnt export data and doesnt care at all about dependencies
Ive also tryed microsoft publishing wizard, but its as bad as the Generate Scripts
Please advice, i cant be wasting days just to export my DB
When i was using sql2000, the scripts where generated with only one error in a view referencing a view that hadnt been created yet, but now with sql2005, man...I cant beleive it, errors everywhere
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: The Generate Scripts option really sucks, i cant beleive this is the best that a bunch of guys at microsoft can come up with
No it isn't, so stop bitching about it!
Sorry - I have this thing today where I see a lot of people bitching about Microsoft when the problem lies with their own ignorance.
AlexeiXX3 wrote: What are you guys using to export your DB to a remote server??
Personally, I tend to backup the database, then restore it on the other server. But if you want a scripting option then there is a tool downloadable from the Microsoft website: Microsoft SQL Server Database Publishing Wizard 1.1[^]
AlexeiXX3 wrote: When i was using sql2000, the scripts where generated with only one error in a view referencing a view that hadnt been created yet, but now with sql2005, man...I cant beleive it, errors everywhere
Stop bitching about it! It is really irritating. I almost didn't help you because I was getting so damned pissed off with you. Yes, Microsoft has faults, but this is not one of them. The tool I linked to is really rather good and a heck of a lot better than what you got in SQL Server 2000.
|
|
|
|
|
Thanks for the reply, sorry i bothered you
I wish i could just copy my DB and atach it in the destination server, but i cant
Colin Angus Mackay wrote: Personally, I tend to backup the database, then restore it on the other server. But if you want a scripting option then there is a tool downloadable from the Microsoft website: Microsoft SQL Server Database Publishing Wizard 1.1[^]
I had tryed this tool before, this doesnt care about dependencies, it does script schema, data or both, but the problem is when i try to execute it, i get errors, because of SPs referencing Tables that havent been created or views calling views that havent been created
Sincerely, doesnt this suck?? Didnt the guys who programmed this think about it???
Does a real app have 4 tables and 1 SP and no reference between tables?? I dont think so.
Why didnt at least, the script is generated grouped by object type, NO, IT does mix it all: Tbale, view, sp, table, sp,...
What happens when one has many views and SPs??
Does one have to go one by one adding them?
This is what i think sucks
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: the problem is when i try to execute it, i get errors, because of SPs referencing Tables that havent been created or views calling views that havent been created
But if you try and use these SPs and views anyway they won't work. Why do you have a database that is broken in this way? When you see a dependency that doesn't exist, don't you get some sort of feeling that you want to fix it. I know I do.
AlexeiXX3 wrote: Why didnt at least, the script is generated grouped by object type, NO, IT does mix it all
That is what it says it does. It is operating within its design parameters. It is meant as a way of dumping everything in one script. It makes the descision on how best to do that.
Seriously, the only problem I've ever had with that tool is when I have varbinary(max) columns that contianed a large amount of data. I tracked the problem down to a limitation on SQL as a language rather than the tool.
AlexeiXX3 wrote: doesnt this suck?? Didnt the guys who programmed this think about it???
AlexeiXX3 wrote: This is what i think sucks
You still have a bit of anger going on here. I'm sure the folks that developed it gave it a lot of thought. I've met some of the product groups in Microsoft (although not the SQL guys I admit) and they do genuinely put a lot of effort into what they do. They give things a lot of thought and consideration. There ultimate creation may not be perfect for our particular situation but it does fit with what they've designed it for and they are always striving to improve things. Heck their vision for C# isn't there yet and it is all due to time constraints more than anything else. They have deadlines to work to and they have to get stuff out the door in a certain time frame so they have to make compromises and put stuff off to the next version. I'm sure that happens with the software you write also, it certainly happens with just about everybody I've ever spoken to.
|
|
|
|
|
Colin Angus Mackay wrote: But if you try and use these SPs and views anyway they won't work. Why do you have a database that is broken in this way? When you see a dependency that doesn't exist, don't you get some sort of feeling that you want to fix it. I know I do.
I meant that the generated script by the tool doesnt run smoothly when i execute t on the server, because in the SP there is a referencie to a table or view not yet created
Colin Angus Mackay wrote: You still have a bit of anger going on here
Yes there is
You know.... when one is all frustrated because something doesnt work as expected
I hope, this thing about dependencies gets fixed, I think it could be as easy as one option to disable constraints in the whole DB and then reenabling them (Assuming one will execute the correct script with no errors at all) and we could forget about the creation order
Anyways, thanks for your answers
Alexei Rodriguez
|
|
|
|
|
Hi,
I Have two tables.
Table1 has the following columns:
TableID
FieldID
FieldName
FieldValue
DateAdded
and Table2 has the following Columns
FieldID
TableID
Dataadded
And I want to display Each FieldName as a Column name for Dridview control.How can i form SELECT Statement To Achieve this ?
Thanks in advance
sri
|
|
|
|
|
Don't cross post - I just answered this in the C# forum.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Since morning I am not able to access my database. It is marked as Suspect. The server was down in the morning and when it was on , I tried to access my database. However, now I am not able to access it. I even tried searching for the .mdf file.the size of .mdf is in MBs. But, I am not able to find it. I've no latest backup of my database. Now, if I dettach the database from the server or run sp_resetStatus commnad then, the database might not get recovered. So, please help. I need to fix it asap so that I could start my work.
|
|
|
|
|
|
Hi all,
I have a database on SQL Server 2005, serving several clients. Some of my queries need more than 20 seconds to finish. Problem occurs when ClientA runs the query, and one second later ClientB runs it as well. Since the query involves some editing, it will lock the table for the duration of the query. So what usually happens is that ClientB will have "query timeout expired" error message because the request cannot be completed within the default 30 second query timeout.
a. Is there any way to know whether a table/record is being locked, and by which computer?
b. Can I change the default 30 seconds query timeout by code?
Thanks a lot for any pointer.
|
|
|
|
|
A. not easily - I would look at your workflow and query and try to isolate the part where the updates to the tables are done and split them into a seperate process from the rest of the query.
B. Change the command timeout or the connection timeout.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You probably need to split your query down to isolate the actual updates, then the problem will be reduced. Take locks late and release early is the best advice I can give.
You can increase the timeout on the command or connection.
Bob
Ashfield Consultants Ltd
|
|
|
|