I've been stress-testing SSQ queue by pumping a lot of data to it. For the most part, the queue is cleared out fairly quickly using the activation stored procedure. However, for a second time now, I encountered a strange problem. For some reason, one message got stucked in the queue and would not dequeue. The status of the queue is turned OFF somehow. So I ran:
ALTER QUEUE [dbo].[TestQueue] WITH STATUS = ON;
to turn the queue status back on, but it would not turn ON. The last time I had this problem, I ended up dropping and recreating everything.
Has anyone experienced this strange behavior? Please help.
Hello, I have a report that enables drilldown to another report through the hyperlink jump to report option in the navigation properties of the cell. The thing is I need the report to only export what the users see on the screen, which means that if the report's cell is not expanded to another report then only the current report needs to be exported. The export option will currently export all data down to last drilldown. Any suggestions?
I'm writing some generalized stored procedures for use form managed code. The following stored proc works great:
CREATE PROCEDURE fnd_Send ( @Message VARCHAR(5000), @Contract SYSNAME, @MessageType SYSNAME, @FromService SYSNAME, @ToService VARCHAR(100), @Encrypted Bit ) AS BEGIN DECLARE @Handle UNIQUEIDENTIFIER;
BEGIN DIALOG CONVERSATION @Handle FROM SERVICE @FromService TO SERVICE @ToService ON CONTRACT @Contract WITH ENCRYPTION = OFF;
SEND ON CONVERSATION @Handle MESSAGE TYPE @MessageType(@Message);
Notice the use of SYSNAME parameters €“ translating the parameter into an object name - allows it to work in the BEGIN DIALOG statement when an system object is needed. Works create and cues up generic messages.
The following will not compile:
CREATE PROCEDURE fnd_Receive ( @Queue SYSNAME, @Message VARCHAR(5000) out, @MessageType SYSNAME out ) AS BEGIN DECLARE @Handle UNIQUEIDENTIFIER;
RECEIVE TOP (1) @Handle = conversation_handle, @MessageType = message_type_name, @Message = message_body FROM @Queue; END GO
It won€™t let me use the SYSNAME field @Queue in the FROM clause. I€™m getting an unfriendly:
Msg 102, Level 15, State 1, Procedure fnd_Receive, Line 15 Incorrect syntax near '@Queue'.
It looks like maybe I can€™t bind a variable in the FROM clause €“ perhaps like you cannot in a SELECT statement. I can fall back to dynamic SQL in the stored proc or in the managed code; I was hoping not to.
Can anyone shed any light on this? Also, are there any other techniques I'm missing to avoid falling back to a dynamic SQL statement.
Hello, This is info that I am still not certain about and I just need to make sure, my gut feeling is correct:
A. When a procedure is triggered upon reception of a message in a queue, what happens when the procedure fails and rolls back? 1. Message is left on the Queue. 2. is the worker procedure triggered again for the same message by the queue? 3. I am hoping the Queue keeps on triggering workers until it is empty.
My scenario is that my queue reader procedure only reads one message at a time, thus I do not loop to receive many messages.
B. For my scenario messages are independent and ordering does not matter. Thus I want to ensure my Queue reader procedures execute simultaneously. Is reading the Top message in one reader somehow blocking the queue for any other reader procedures? I.e. if I have BEGIN TRANSACTION when reading messages of the Queue, is that effectively going prevent many reader procedures working simultaneously. Again, I want to ensure that Service broker is effectively spawning procedures that work simultaneously.
This may sound silly, but I'm calculating how much someone owes over time verses how much they have paid for that period. So if they owe more than they have paid the result is an under payment amount like -$100. Then I need to add the -$100 to the new payment due, let's say $100. So the total Due is $200. But if I add -100 to 100 that equals 0. Any suggestions?
Hello,In SQL Server 2005 Enterprise, I can change the CPU affinity viaManagement Studio. Is there a way that I can change these settings viat-sql?I wish to use all my cpu's at night when my data warehouse builds andthen durning the day reduce the number of cpus for SQL so that theapplication can get more time.TIARob
Ever since installing SQL Server 2005 Express Edition the XP Task Manager shows €œsqlservr.exe€? running normally, as a €œNETWORK SERVICE€? consuming 26MB of memory. This is true even after a cold reboot. I€™d like to turn SQL off since I am not currently planning on using it. I tried detaching a couple of projects I had started, as part of tutorials, but that did not make a difference.
So how do I turn SQL Server 2005 Express Edition off without removing it from the system, which I do not want to do?
Can anyone help me with this problem. I have old data that I need to insert into a new table. I need to keep the old identity values and then turn them on again for the new data.
I am running sqlserver 2000 Enterprise edition on Windows NT 4.0 service pak 6. When ever I run a long query, the transaction log seems to fill up. How do you turn this transaction log off? Please let me know ASAP.
I am looking for a smart solution without hardcoding the column names (e.g. CASE WHEN ResourceID = '200012' THEN Time END as ['200012'], etc...), as there can be up to 15 different resources involved; usually they aren't but I want to keep the result as slim as possible without tons of columns containing nulls.
I have a nvarchar(256) column and when I am using C# code to add data to it. When I enter data over 256 characters long, it automatically truncates. When I try to do this is the Query Editor, it will not allow me to and terminates with the error "Binary data or string would be truncated"
Is there a way to turn this automatic truncating off?
I have one data flow task which creating a database table (tempTable) and other task will migrate data from other database into this table. Now I add third task which will read the data from this tempTable. If tempTable is not in the database, then validation will failed. Is there a way to turn off validation at runtime. In my case, my package running every night. I would like to delete this tempTable at end of package run. Now I have to pre create this temp table, and run package and leave the temptable around for the next run to pass validation problem.
How do I return a list of sold CD's, showing the last once (least sold) first? Below sql, ordered by DESC, returns a CD-list from 1, 2, 3 ... 49, 50, 51. (but I would like the turn it like this)
Least sold cd
51 Martin 50 Elvis 49 Krall
SELECT top 10 SUM(Cd.Price) AS Sales, Artist.Name FROM Cd INNER JOIN purchase ON Cd.Cd_id = purchase.Cd_id INNER JOIN Cd_artist ON Cd.Cd_id = Cd_artist.Cd_id INNER JOIN Artist ON Cd_artist.Artist_id = Artist.Artist_id GROUP BY Artist.Name ORDER BY SUM(Cd.price) DESC(Due to "=RowNumber(Nothing)" numbers are return instead of salesfigures.)
I have around 1200 databases and some of them may be required to turn off one table pk's identity. And they might be turned on later with a different seed and incrment. But I don't find in alter table t-sql to turn them off or on or change the seed/increment value. I need to turn off/on via t-sql without drop/add the pk field. thanks David
How, using SQL, do I turn off the identity property in the table? I need a script to run against a number of db to permanently remove the identity property from the tables without needing to use Enterprise Manager.
I apologize in advance for bugging you all with a basic question, but I can't get it answered anywhere else.
I've been planning on learning MS SQL for a while and recently obtained SQL 2000 software. However, before I got the software I got several books on SQL 7. My question is this, are the differences between SQL 2000 and SQL 7 so great that I wouldn't be able to use the SQL 7 books with the v2000 software?
I'm nesting a bunch queries, the parent being a select, and the children being inserts. I'd like to retain the auto generated IDs from the original table, and insert them into the new tables (into identity fields). I believe that there is a command that I can use to temporarily turn identity auto numbering off for the current query - can anyone help me with this?
" I WAS SHOCKED WHEN I SAW HOW MUCH MONEY CAME FLOODING INTO MY PAYPAL ACCOUNT." Dear Friend,
This is a new program as you will see. It can be for the U.S. or the U.K. This is a fantastic opportunity, try it for yourself!! EVERYTHING DONE ONLINE ! ! With just £5 or $10 and a Paypal PREMIER or BUSINESS account, you could make $$Thousands$$ in 2 SIMPLE STEPS ! !
READ THIS VERY CAREFULLY THEN READ IT AGAIN. THIS IS FAST, THIS IS NOT THE ONE YOU WILL BE WAITING TO WORK.
GUARANTEED - you will have $10,000 in two weeks. Only $10, a Paypal PREMIER or BUSINESS account and 30 min are all that is needed to get this going.
GIFTING MADE EASY, PLEASE READ ON TO FIND OUT HOW
If you want to make a few thousand dollars real quick, then please take a moment to read and understand the MLM program I'm sharing with you. NO IT'S NOT what you think. YOU DON'T have to send $10 to five or six people to buy a report, receipt or get on their mailing list. Nor will you need to invest more money later to get things going. THIS IS THE FASTEST, EASIEST PROGRAM EVER, you will be able to complete it in LESS THAN 30 MINUTES and you will never forget the day you first viewed this online.
If you're already running a home business, you can easily do this one along with it. If not, this is the FASTEST and EASIEST way to earn serious money online that you've ever seen so far in the history of the Internet! This program works no matter what country you are in, or what currency you use. It doesn't matter how old or how young you are. And you certainly won't need any special knowledge or talent. You won't need to run a website, or make phone calls, or make photocopies, or send out letters through the mail, or pay for advertising, etc. The only things you will need are:
* An email address * A Premier or Business PayPal account with at least $10 deposited in it * 30 minutes of your time
ONLY 2 SIMPLE AND EASY STEPS ! !
If you are doing other programs, by all means stay with them. The more the merrier, BUT PLEASE READ ON!! First of all, there are only TWO POSITIONS, not four, five or six like many other programs. This program is more realistic and much, MUCH FASTER. Because it is so easy, the response rate for this program is VERY HIGH and VERY FAST, and you will receive your reward in FOURTEEN DAYS. That's only TWO WEEKS - not one or two months. Just in time for next months BILLS.
TRUE STORY --> Grace Kelly tells how she ran this gifting summation four times last year. The first time, she received $6,000 in cash in two weeks and then $14,000 in cash the next three times.
When this program is continued, as it should be, EVERYONE PROFITS!! DON'T BE AFRAID to send gifts to strangers. It will come back to you ten folds. A person can give you up to $10,000 per year and you don't have to report it to the IRS.
THIS CAN AND WILL WORK FOR YOU! HERE ARE THE DETAILS:
Post this letter in 50 message boards, chat rooms, or newsgroup. You don't need to post 200 like other programs or email 100 people just to get started. Even if you are already in a program like the send twenty dollars to six people. CONTINUE IT and stay with it, THOSE DO PAY OUT, but do yourself a favor, DO THIS ONE TODAY as well, RIGHT NOW!!! It is simple and takes a very small investment, only $10 and a Paypal PREMIER or BUSINESS account. iT WORKS AND IS DONE IN 2 SIMPLE AND EASY STEPS ! ! This program WILL PAY FASTER before the other programs you are working on even trickle in!! Just give one person $10. THAT'S IT!! Follow the simple instructions and in two weeks, you should have $10,000 because most PEOPLE WILL RESPOND due to the LOW ONE TIME INVESTMENT, SPEED AND HIGH PROFIT POTENTIAL.PLUS, since its done all ONLINE, there is no time wasted mailing out letters and the such ! ! We are not even figuring a 50% response! So let's all keep it going and help each other in these tough times. We all owe money to bill collectors, and creditors. But, with this, if people take the time to help each other, the good fortune will follow. SO, Take the measly minutes this SIMPLE and REWARDING program offers and give the gift that gives back TODAY ! !.
Simply send a $10 gift to the person at POSITION #1, if your birthday is BETWEEN JAN 1 THRU JUNE 30, OR, if your birthday is BETWEEN JULY 1 THRU DEC 31, send the gift to the person at POSITION # 2.
HERE'S WHAT YOU NEED TO DO. . .
STEP 1
Ok, if you're not already a PayPal user, the very first thing you need to do is use the PayPal link below and SIGN UP. It takes just two minutes!
Here's the URL:
https://www.paypal.com/us/mrb/pal=AQH5ZY3CXRHZN
Be sure to use this link so you can sign up for a free PREMIER or BUSINESS account. You'll need to have a PREMIER or BUSINESS account (and not a PERSONAL account) otherwise you won't be able to receive credit card payments from other people.
STEP 2
It is an undeniable law of the universe that we must first give in order to receive. So the first thing to do when you have your Premier/Business PayPal account is to IMMEDIATELY send a $10 payment from your PayPal account to the email address in the position (1 or 2 - depending on your birthday in the timeline), along with a note saying: "HERE IS A $10 GIFT FOR YOU." Be certain to add this note, as this is what KEEPS THIS PROGRAM LEGAL. Instructions on how to send a payment are under "SEND MONEY" at the Paypal Site. It's so Easy!!
When you send your $10 payment to the first address in the list, do it with a great big smile on your face because "as you sow, so shall you reap!"
After you have transferred a $10 payment to the email address, something very eerie happens. It gives you an indescribable, overwhelming sense of certainty, belief and conviction in the system. You've just proved to yourself that, because you have done it, there must be a great number of other people ready to do exactly the same. Thus you have now seen for yourself, first hand, that this business actually works!
REMOVE the email address you are replacing (the one you sent $10 to), and REPLACE it with your own email address.
REMEMBER: Use the same EMAIL ADDRESS that is used with YOUR Paypal account ! !
Paste your newly typed email address over the old one and then post to 50 Message Boards, Chat Rooms, or Newsgroups. DON'T MULL OVER IT, JUST 30 MIN OF YOUR TIME, THAT'S IT THERE IS NO MORE TO DO!!
ACT FAST AND GET THE GIFT. HONESTLY AND INTEGRITY MAKE THIS PLAN WORK!! DO UNTO OTHERS AS YOU WOULD HAVE THEM DO UNTO YOU .
POSITION#1 --- iexpoi@yahoo.com
POSITION#2 --- bumpsie@comcast.net YOUR NAME COULD CYCLE FOR A LONG TIME ! ! THIS MAKES IT THE GIFT THAT KEEPS ON GIVING.
This is excellent seed money to start or expand a business, buy you dream home, car, and pay off what ever bills you may have. Good luck and God Bless. Play fairly, Good fortune will follow.
WHY THIS PROGRAM WORKS:
!! HONESTY AND INTEGRITY !!
Straight to the point, the reason this program is SO SUCCESSFUL is beacuse when you follow these instructions EXACTLY = GIVE A $10 GIFT and POST this in 50 different message boards, there are only TWO outcomes.
(1) A persons birthday will fall on the same half as yours, therefore, YOU GET THE $10 . .
OR,
(2) a persons birthday will fall on the other half of the timeline, therefore, YOU STAY IN YOUR POSITION and get posted in 50 other MESSAGE BOARDS, etc . .
BOTTOMLINE: Either you get the $10 or your name gets passed on for other people to give YOU $10 or pass YOUR name on to other people that will. It makes you think though, the more you POST YOUR OWN POSTS, the BETTER the results ! !
4 FACTORS THAT MAKE THIS PROGRAM SO SUCCESSFUL. . .
* EXTREMELY FAST RESPONSE
* EXTREMELY HIGH RESPONSE RATE
* UNLIMITED PROFIT POTENTIAL
* QUICK, SIMPLE AND CHEAP TO GET STARTED
So there it is. You now have the knowledge that will enable you to make over $10,000 within the next two weeks. The only thing that can hold you back now is a lack of faith or a lack of self-belief. However, any doubts you may currently have will disappear within a few days of putting this plan into practice. Trust me on this! You certainly won't regret it.
SOME NOTES FROM PAYPAL WHICH YOU MAY FIND USEFUL
PayPal lets you pay anyone with an email address and is the world's Number 1 online payment service. PayPal is accepted on over 3 million eBay auctions as well as a countless number of online shops. You can also use PayPal to pay your friends - for example, it's a convenient way to split the phone bill with your room-mate, send cash to your kids in college, or send cash to someone in another country. Better yet, you can also earn a referral bonus of up to $100 each time someone signs up for a PayPal account using your referral URL!
When you send money through PayPal, you can fund your payments with your credit card or cheque account. You won't have to worry about your privacy, because PayPal keeps your accounting information safe and secure. Making a purchase with PayPal is far more secure than mailing a cheque or giving your credit card number to a stranger. That's why over 9 MILLION people from around the world use PayPal to move money. Signing up for a PayPal account is free, easy, and it takes only a couple of minutes.
Thank you, and good luck in your ventures
Best Regards
P.S. Does this sound too good? Well maybe to some skeptics it is. But it actually works, and is worth the 30 minutes of your time now. So, just make a nice cup of tea and get started on it now. After all, you can't lose, but you stand to gain more in the next few weeks than many people earn in a year!
I added Validate Subscriptions to my publication using the procedure outlined in BOL. Procedure is listed below. I want to stop the validation for this publication. I do not want to validate any longer. How can I stop this process? To validate transactional data using SQL Server Enterprise Manager
At the Distributor, expand Replication Monitor, expand Publishers, and then expand a specific Publisher.
Right-click a transactional publication, and then click Validate subscriptions.
Choose whether you want to validate all subscriptions or just specific subscriptions, and if you want to validate specific subscriptions, select those in the text box.
To choose the type of validation, click Validation Options.
Choose whether you want to compute a fast rowcount based on cached table information, compute an actual row count by querying the tables directly, or compute a fast row count and if differences are found, compute an actual row count.
You can also choose to enable Compare checksums to validate data, a binary checksum (if the Subscriber is running SQL Server 2000), and you can choose to stop the Distribution Agent after the validation has completed.
Hi. I setup a group on report service and give this group "Brower, My reports, report builder" permision, but I can't found report builder on client. does anybody can help?
Is it possible to turn off transaction logging when making a table schema change? For example, when expanding a varchar field from 10 to 40 characters? This is occurring on a hosted site for a table with about 150,000 records. The db size is 200 Mb. If I try this normally with transaction logging enabled, I get the dreaded log file is full message, even if I first truncate it. I was thinking about doing the following instead:
taking the db offline creating a backup disabling logging change the schema re-enable logging put db back online If a problem occurs during the schema change, I would just restore from the backup. Please let me know the following:
Is it possible to turn of the transaction logging for the schema change? Do you see any problems with the above. Alternatives? One alternative is to look into increasing the db size. A second is to add a new field (named temp) to the table, copy the old field to the new field, delete the old field, add another field (with the original field name) with the new schema, copy the temp field to the new field, and finally delete the temp field. This should require less space in the transaction log. Unfortnately, it could possibly affect some linked Access databases with the new field order. Thanks in advance.
I presently have Error Logging turned on for the SQL Executive, but I no longer want it. When I open up the "Configure SQL Executive" window under the Server menu, the "Error Log File" field is dimmed and there is no option to turn it off.
Is there anyway I can turn off delete in SQL server? I want to prevent anyone inadvertently deleting rows in tables. I thought worse case I could have triggers on tables to perform roll back.
To get deadlock victim alert do we need to turn on deadlock trace flags or if I create an alert and if there's any deadlock incident happen, it will throw alert (if no deadlock flag is set)?
I've a table with an ID column, it is an auto increment id column that increases by 1.
ID -- 9724 9725
When my webhost restarts SQL, or some other random act of God, this ID jumps by 1000. Today it leapt from 9725 to 10725, which just doesn't work for me. It results in my having to upload the last known good copy of the database.
My host says they can't change the 1000 row buffer, MS apparently doesn't deem this an issue, and I'm quite frustrated. I used to be able to modify certain settings in SQL since I was using an SQL 2008 database under SQL Management Console but since my host upgraded to 2012, and I'm running XP, there is no forward compatibility and many options are no longer possible (eg. modifying a column, now it has to be done via clicking query and entering a SQL command rather than just right clicking on the column)
So long story made short... is there a way to modify my table (named "places") to turn OFF the autoincrement Id and perform a simple means to figure out the next possible value?
example: id, place, locstion, gps, v2, v3, v4, comment ================================================ 9720, Bill's House, Toronto, 43.4453, y, n, c, This was a good place to eat 9721, Dime a Dozen, Cambridge, 42.4453, n, e, d, A good place to take photos
I'd have to pull the highest value of ID (+1 to it) and then do a standard INSERT into places (id, place, location, gps, v2, v3, v4, comment) values (9722, etc...)I guess my concern is if the autoidentity is turned off, will SQL allow a new value to be entered via INSERT? I'm also using the @@identity to find the last known ID when I want to direct the user to the entry that they've just created and I don't know what that # is just yet. Would the @@identity still work?
I've been trying to return hex data in a way that can be concatenated. I need the actual hex info (e.g. 0x6E3C070) as displayed since it contains info about the path to a file. So I can turn it into D:6E3C 7 to get the path to the file. In searching around I have come across a way to do this but can't figure out how to get it to run through a column and either display or insert into a table multiple results.
-Here's the user function that converts an integer into a hex string-
CREATE FUNCTION udf_hex_string (@i int) RETURNS varchar(30) AS BEGIN DECLARE @vb varbinary(8) SET @vb = CONVERT(varbinary(8),@i) DECLARE @hx varchar(30) EXEC master..xp_varbintohexstr @vb, @hx OUT RETURN @hx END GO
--'PageStoreId' contains the data that needs to be converted into the editable hex string --'HexString' is where I'd like it to go so I can parse it later.
--I can run the below select and get the hex string. But am stuck on how to run a select or update that would run through the 'XPages.PagestoreId' column and insert the hex string into the 'XPages.Hexstring' column. 'XPages.PagestoreId' could have 100's of entries that need to be converted and placed in the relevant the 'XPages.Hexstring' column.
Hi everyone. I've just installed sql server 2005 (evaluation) and i need to turn the option of using sp_send_dbmail on. I tried books on line but didnt manage to understand how it is done. Thanks