I have the following schema:
Database: test.
Table: per_login_user, Field: username (PK), password
Database: wavinet.
Table: login_user, Field: username (PK), password
What I want to do is to create a trigger. Whenever a password field on table per_login_user in database test get updated, the same value will be copied to field...
Lets say i installed two named SQL Server 2008 instances e.g. A and B, will i have two services of each type e.g. two analysis service, two reporting service and so on, one service for A and the other for B? If yes, then it is known a service listens on a port number, how two same services going to listen on the port?
I hope this is cle...
I make a query that return to me the count of Stored Procedure that created everyday as follow
SELECT convert(varchar, crdate, 103) as Date,Count(*) as Counter
FROM sysobjects
WHERE (xtype = 'p') AND (name NOT LIKE 'dt%')
Group by convert(varchar, crdate, 103)
and its already work but dates appear in string format that i can't...
Why did they never let us do this sort of thing:
Create Proc RunParameterisedSelect
@tableName varchar(100),
@columnName varchar(100),
@value varchar(100)
as
select * from @tableName
where @columnName = @value
You can use @value as a parameter, obviously, and you can achieve the whole thing with dynamic SQL, but creating i...
Did anyone create a Document Management System using SQL SERVER's Filestream?
By this I mean: if an application makes intensive use of documents is filestream a good option, or in those cases it would be better to go for another solution?
I understand this depends on many factors, but in general my guess is that if "<5%" than server lo...
I am doing investigation on filestream (asking on stackoverflow while reading whitepapers and google searching), in my current screnario documents are managed in this way:
1) I have a DB table where I keep the document id and the doc path (like \fileserver\DocumentRepository\file000000001.pdf)
2) I have a document folder (\fileserver\D...
Hello,
are there free, recommendable Tools for data modeling?
ERM/ORM Diagrams
Creating database models (SQL SERVER
2005)
As Simple to use as Visio(no license
here)
Code generation is only a nice to
have (VB.Net)
...
I need to execute the procedure deleteQuestion for each element that was returned by this select query:
select id from questions where Stuff = @Stuff
execute deleteQuestion id
something like:
execute deleteQuestion each(select id fom questions where Stuff = @Stuff)
anybody knows how ?
...
Much of my sql code is generated (from POD). Now i have issue where table user_data has a FK to ref_status which points back to two different user_data. My code does the following
begins a transaction
looks at user_data (and adds it to a list)
sees ref_status then repeats #2 with it
executes the create table ref_status code
Then i g...
What does the SQL Profiler logs contain?
Suppose that I am using SQL Server 2000 and do some transaction using VC++/ODBC connection. If a CDBException is thrown, will the profiler log contain information about why it is thrown?
Thanks.
...
Hi all. I am not an expert on SQl Server. Is this a valid pattern for handling errors in a batch of SELECT, INSERT...in SQl SERVER ? (I use v.2008)
BEGIN TRANSACTION
BEGIN TRY
-- statement 1
-- statement 2
-- statement 3
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END ...
Hello All - Is there a way to set consecutive failed login attempts to a specific number like 3 or 4 times (for SQL Server Logins)? If this count is crossed the expectation is to lock the account...
Apprecaite your help.
Thanks
...
I've just started using a VS2010 database project to manage the release of an update to an existing database.
I want the deployment option to generate a script that will contain the commands to change my existing database rather than create an entirely new one.
E.g I have 10 existing tables - one of which I drop in the new version and ...
Hi Anybody have an idea about Table fragmentation in SQL Server(not Index fragmentation).We have a table ,this is the main table and its not storing any data permently,dat come here and goes out continusly. there is no index on this because only insert and delete staements are running frequently. recently We face a huge delay for the res...
What is the best way to design the Domain objects which can have multi-lingual fields. An example can be a Product class with Description being multi-lingual.
I have found few links but could not decide which one is the best way.
http://fabiomaulo.blogspot.com/2009/06/localized-property-with-nhibernate.html
(This stores all localised ...
We have a VS 2010 solution that includes a few class library projects, a SQL Server 2008 database project and a Wix setup project. We are trying to get to a point where the following happens in the order specified:
Build the class library projects and the database project
Deploy the database project to generate the deploy .sql script
B...
Normally, I would use a PHP webservice to do this, but since the front-end is hosted on a linux box, I need another way to do this (so I don't have to go through the trouble of installing FreeTDS, etc. I will if I have to).
Is there a better way to do this? I'm not a web guy, but I'm trying my best.
...
I saw some topics about this, but the problem is that the solutions required a "switch case"... Like this
I have a table with a lot of columns, is there a way to do a dynamic sort without the switch?
...
From here
ALTER TABLE ORDERS
ADD FOREIGN KEY (customer_sid) REFERENCES CUSTOMER(SID);
How do i add several keys with SQL Server? is it something like the below? (I cant test ATM and unfortunately i have no way to test queries unless i run it through code)
ALTER TABLE ORDERS
ADD FOREIGN KEY (customer_sid) REFERENCES CUSTOMER(SID),
A...
Hi all
Here is my situation:
I use the SqlCommond to update some records in the SQL Server in a ASP.NET web site. Users can choose which records they want to update. Sometimes they may choose 40 or 60 records to update at a time.Is there any good way to do it? I do not want to do like it
foreach(string ID in List)
{
Update here
}
...