|
|
It could be a dumb question, and tried to search for it and found nothing.
I been using mysql for years(not that to long) but i never had tried mysql transactions. Now my question is, what would happen if i issue an insert or delete statement from multiple clients using transactions? does it would lock the table and prevent other client to perform there query? what would happen if other client issue a transaction query while the other client still have unfinished transaction?
I appreciate for any help will come.
P.S. most likely i will use insert using a file or csv it could be a big chunk of data or just a small one.
|
|
|
|
|
|
Hi All,
I have two database servers, one Dev and another one Test, I made lots of changes on Dev hance I tried to restore the backup of Dev Database on Test Server with same name everything same. Now with the same Credentials Login and Password my web application is failing to access the database on Test, by saying failing to access the Database.
Can anybody please help me in getting out of this situation. All I did was, Dev and Test are two different physical servers, took backup of Dev and restored it on the test, now Login fails.
Any help a link code snippet or even a suggestion helps a lot. Thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
After restoring a database I run this script to drop and add the expected users. It assumes the users are already created on the new server. The underlying ID for the user name will be different on each server.
Declare @Usr varchar(50),
@SQL as varchar(5000)
Declare csrPV Cursor Fast_Forward For
Select name
From sysusers
Where issqluser = 1
and hasdbaccess = 1
AND name NOT IN ('dbo','IBMSQLDBA')
OPEN csrPV
FETCH NEXT FROM csrPV INTO @Usr
WHILE @@FETCH_STATUS = 0
BEGIN
Set @SQL = 'DROP USER [' + @Usr + ']'
Print @SQL
exec (@SQL)
Set @SQL = 'CREATE USER [' + @Usr + '] FOR LOGIN [' + @Usr + '] WITH DEFAULT_SCHEMA=[dbo]'
print @SQL
exec (@SQL)
Set @sql = 'ALTER LOGIN [' + @Usr + '] ENABLE'
exec (@SQL)
EXEC sp_addrolemember N'db_owner', @Usr
FETCH NEXT FROM csrPV INTO @Usr
END
CLOSE csrPV
DEALLOCATE csrPV
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes it did work thank you very much
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
i need a simple data warehouse for a Library
|
|
|
|
|
I'd recommend a database, not a data warehouse. Sql Server Express would be an obvious choice to get started.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Personal library?
What is the volume of data?
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
for a public but i need only simple example
|
|
|
|
|
|
|
I just finished reading a book on deductive databases, which outlined the basics about Datalog and deductive databases (Deductive Databases and their Applications by M. Colomb, if anybody is interested). Now I wish to actually try using this acquired knowledge, and so here is the question.
What program do you advise using for somebody looking to work with Datalog for the first time (prefferably available for free for educational purposes)? I have been looking into it and thus far haven't found any software with it's own GUI and a good guide for newbies. (Most of them such as IRIS seem to be Java plugins, and I don't know how to make it work).
Have a good one.
modified 14-Jan-16 6:44am.
|
|
|
|
|
What does the book suggest?
|
|
|
|
|
The book doesn't seem to suggest much of anything in terms of actual software to work with. It seems to be mostly about explaining Datalog on theoretical level (how the horn clause works within a database set-at-a-time environment and other concepts about it's inner workings) rather than outlining how to work with it on a specific platform.
Truth be told, as I am searching around, it seems there are no real Datalog focused platforms, just interpreters invoked as coding language libraries (for example IRIS for Java). The thing is, I have no idea how to make IRIS and it's libraries work. :/ Guess I will have to experiment around...
|
|
|
|
|
|
Doing it already. Hoping someone shows up who has screwed around with this before. Makes the search go faster.
|
|
|
|
|
can any one help me on database alphabet mangement project in C
|
|
|
|
|
Help you how? If you mean can someone write the code for you then I am afraid you have come to the wrong place.
|
|
|
|
|
If you ask a question we sure can.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi everyone,
First of all sorry for any mistake I might give as English it is not my natural language.
My issues is: I built a query where I had to join 8 tables. The query should only be returning 4 rows but instead it is returning 8 rows as one of the tables I'm using in the join's has a field type to identify , for example if it is source and destination(0 or 1). The final result should return only one row with either with source and destination information base on the type. Two different columns (source,destination) but same row.
Any ideas how to solve this?
I appreciate any help.
Many thanks.
|
|
|
|
|
My English is bad and I'm English but my mind reading is atrocious. - Show the SQL
|
|
|
|
|
Hi Michael,
Thanks for replying.
Please find below a sample of the SQL. It is not the real script but reflects the scenario I tried to describe.
"select shipId,number,reference,[weight],SA.typeOfAddress,addressLine as Source, addressLine as Destination
FROM Shipments AS S INNER JOIN ShipmentAddresses AS SA ON SA.shipmentId = S.shipId
INNER JOIN Addresses as A ON A.addressId = SA.addressId"
This query is returning 2 rows:
shipId | number | reference | weight | typeAddress| Source | Destination |
1 1 ref1 12 0 London Road London Road
1 1 ref1 12 1 LiverPool Lliverpool
I would like a single row:
shipId | number | reference | weight | Source | Destination |
1 1 ref1 12 London Road LiverPool
Note: the type of address in the first example of results was just to indicate that 0 is source and 1 is destination.
Many thanks for the help.
|
|
|
|
|
Try something like this:
SELECT
S.shipId,
S.number,
S.reference,
S.[weight],
SA.addressLine As Source,
DA.addressLine As Destination
FROM
Shipments As S
INNER JOIN ShipmentAddresses As SSA
ON SSA.shipmentId = S.shipId And SSA.typeOfAddress = 0
INNER JOIN Addresses As SA
ON SA.addressId = SSA.addressId
INNER JOIN ShipmentAddresses As DSA
ON DSA.shipmentId = S.shipId And DSA.typeOfAddress = 1
INNER JOIN Addresses As DA
ON DA.addressId = DSA.addressId
;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
Sorry the delay in answering.
the strategy you described above worked perfectly on my real production scenario.
Many thanks.
|
|
|
|