Tumgik
#T-SQL
tweakingsql · 5 months
Text
Setting References, Adding constraints
We need to set up some items so that eventually this project will actually run. First off, we need to set up a reference to an existing server where the project will be exported when we're finished.
Under the Solution's name, there is a entry for References. Right-click on that, then select Database References. Change the database reference type to System Database, and select the master database.
Tumblr media
Just to be fair, I had trouble with adding the default as below. I kept getting an error SLQ17501, meaning the editor was unable to find the referred to item.
There is an equivalent of SSMS' Crtl+Shift+R, which in the Project menu then Reanalyze Project. And that didn't work. It's supposed to take a little bit like the refresh of the table data into IntelliSense does in SSMS, so I waited. Hours.
Then I deleted the offending item and tried to add it again. Still there.
Then deleted the entire project and started over. At that point, in the error listing, I noticed the project was set for "Build + Intellisense". Clicking the other options confirmed that the problem was in IntelliSense, not the Build.
Next day, I started off with a new and smaller build and planned on using VS to report the issue to Microsoft. And it never came back. Anywhere. Computer Science is in the next classroom, this is working with software, which is a whole different beast. End interruption.
The source table has the one constraint already, which is the clustered primary key. "Clustered" means that the data will be put in the specified order onto the drive. Primary keys have to be non-null and unique, and are often what is used as a foreign key in another table.
This is a table of dates, and there's already date functions and tools built in to SQL. Why add more? Mostly so that we have a simple table to join on for long calculations. You can figure out if a given day is a weekend by looking at the DatePart() function with the first parameter set to DW. But is it a holiday? That is a bit harder to work out. This table does the calculations so they don't have to be repeated endlessly.
First off, let's set the FederalHolidayFlag to default to the character 'N'. We do the right-click on the solution's name, then Add, then New Item. Under Tables and Views we can select a Default Constraint. And it wants a name again.
Tumblr media
And VS is helping where it can.
Tumblr media Tumblr media
There's a related Check Constraint. Everybody is going to have opinions about where each of the files should be one single step, or if all the related steps should stay together. Make a choice that appeals to you, and realize unless you're the project manager it doesn't matter. I want the practice using the different templates.
Tumblr media
The blue squiggle is error SQL70588 - since there's already a data enforcement check on that column, the WITH CHECK part of the statement will be ignored. I'm making a note that the Test Suite needs to look at that.
Document it. Always. Or you will forget.
Why use 'Y' and 'N'? One byte is the smallest column size. The boolean columns do only take up one bit in some byte, but unless you have a lot of booleans (8 or more), it's not much of a savings in space and a tad more work in CPU - probably breaks even in the long run. We could have used 0 and 1 in a tinyint column. It was an aesthetic choice on the part of the Data Architect team.
There are a bunch more constraints we could put in. Which ones matter to you?
0 notes
thedbahub · 6 months
Text
Top Factors That Can Disrupt SQL Server Log Shipping
SQL Server Log Shipping is a powerful tool for maintaining a standby server, but several factors can break the process. Log Backup Chain Breaks Directly taking transaction log backups outside the log shipping configuration can break the log chain. This scenario demands a meticulous approach to restore the sequence. Network Connectivity Issues Network connectivity issues between the primary…
Tumblr media
View On WordPress
0 notes
butlerettes · 2 years
Text
Tumblr media
3 notes · View notes
butlerette · 2 years
Text
Tumblr media
3 notes · View notes
voidofambition · 2 years
Text
Got myself in a mental rut and didn’t do life things that needed to be done, but I finished off whatever required grading for the entirety of Monday (minus 2 code-alongs). I’m gonna be skipping after attendance to do the life things I was supposed to do. And I will need to review the following:
Postgres: Indexing and Index Types
Group By and Order By Clauses
Distinct, Union, Intersect, and Except
Postgres: Functions
Java: File Handling
5 notes · View notes
bramblejammer · 2 months
Text
Tumblr media
Sometimes you have to skip the queue when jam sessions run too long... poor Baby Branch has lost out too many times on his favourite ice cream, so big bro Spruce had to unleash the abs ( https://youtu.be/zwpNYClDhj8?si=Sql.....Vy4U&t=158 ).
273 notes · View notes
willcodehtmlforfood · 1 month
Text
A melós laptopra ugye nincs admin jogom, szóval ilyen huncutsagok mint Logitech egérhez való szoftvert, meg SQL server management studio-t nem lehet csak úgy installalgatni....
Viszont ha kell, kapsz temp admin jogot - már bánom h nem raktam fel valamit a kurwa taskbar bal oldalra tolásához (természetesen a Logitech sw felment, azt majd én eldöntöm h szeretném konfigurálni az ergonomikus kis cuccaimat remote melókába)
Ja adtak monitort (valaki megrendelt egy random 24 collost amazonrol és hozzám szállították ki ..), de a laptopra alapból nem tudok 2 monitort kötni, mert van egy HDMI meg egy usbc/thunderbolt - de ugyanezen keresztül tölt is, és dokkolót persze nem adtak
13 notes · View notes
electropneumatic · 6 months
Text
I'm very good at "professionalism" I was trained from a young age. If I get an interview, I'm getting the job. I sit upright in my chair and wear a collared shirt and my employer thinks, "wow! She has a lot of passion for this role!" Buddy, you don't know the start of it. You don't even know my gender.
I'm OSHA certified. I got my 24-hour GD&T training. They can see this. What they don't see is me waxing poetical about surface finish or some shit on this website. When I was in 6th grade, I was exposed to Autodesk Inventor and it changed me fundamentally as a person. Whenever I look at any consumer good (of which there are a lot) I have to consider how it was made. And where the materials came from and how it got here and really the whole ass process. It's fascinating to me in a way that can be described as "intense". I love looking at large machines and thinking about them and taking pictures of them. There are so many steps and machines and people involved to create anything around you. I think if any person truly understood everything that happened in a single factory they would go insane with the knowledge. But by god am I trying. My uncle works specifically on the printers that print dates onto food. There are hundreds or even thousands of hyperspecific jobs like that everywhere. My employer looks away and I'm creating an unholy abomination of R and HTML, and I'm downloading more libraries so I can change the default CSS colors. I don't know anything about programming but with the power of stack overflow and sheer determination I'm making it happen. Is it very useful? No. But I'm learning a lot and more importantly I don't give a fuck. I'm learning about PLCs. I'm learing about CNC machines. I'm fucking with my laptop. I'm deleting SQL databases. I'm finding electromechanical pinball machines on facebook marketplace. I'm writing G-code by hand. I'm a freight train with no brakes. I'm moving and I'm moving fast. And buddy, you better hope I'm moving in the right direction. I must be, because all of my former employers give me stellar reviews when used as a reference. I'm winning at "career" and also in life.
14 notes · View notes
Text
A cowboy named Bud was overseeing his herd in a remote mountainous pasture in Montana when suddenly a brand-new BMW advanced toward him out of a cloud of dust. The driver, a young man named Cliff in a Brioni® suit, Gucci® shoes, RayBan® sunglasses and YSL® tie, leaned out the window and asked the cowboy, "If I tell you exactly how many cows and calves you have in your herd, will you give me a calf?" Bud looks at the man, who obviously is a yuppie, then looks at his peacefully grazing herd and calmly answers, "Sure, why not?" The yuppie parks his car, whips out his Dell® notebook computer, connects it to his Apple iPhone, and surfs to a NASA page on the Internet, where he calls up a GPS satellite to get an exact fix on his location which he then feeds to another NASA satellite that scans the area in an ultra-high-resolution photo. The young man then opens the digital photo in Adobe Photoshop® and exports it to an image processing facility in Hamburg, Germany .. Within seconds, he receives an email on his Apple iPad® that the image has been processed and the data stored. He then accesses an MS-SQL® database through an ODBC connected Excel® spreadsheet with email on his Galaxy S21® and, after a few minutes, receives a response. Finally, he prints out a full-color, 150-page report on his hi-tech, miniaturized HP LaserJet® printer, turns to the cowboy and says, "You have exactly 1,586 cows and calves." "That's right. Well, I guess you can take one of my calves," says Bud. He watches the young man select one of the animals and looks on with amusement as the young man stuffs it into the trunk of his car. Then Bud says to the young man, "Hey, if I can tell you exactly what your business is, will you give me back my calf?" The young man thinks about it for a second and then says, "Okay, why not?" "You're a Congressman for the U.S. Government", says Bud. "Wow! That's correct," says the yuppie, “but how did you guess that?" "No guessing required." answered the cowboy. "You showed up here even though nobody called you; you want to get paid for an answer I already knew, to a question I never asked. You used millions of dollars worth of equipment trying to show me how much smarter than me you are; and you don't know sh*t about how working people make a living - or about cows, for that matter. This is a herd of sheep” “Now give me back my dog.” AND THAT FOLKS IS WHAT THE PROBLEM IS
34 notes · View notes
pressplaytech · 11 months
Text
Is cPanel on Its Deathbed? A Tale of Technology, Profits, and a Slow-Moving Train Wreck
Ah, cPanel. The go-to control panel for many web hosting services since the dawn of, well, web hosting. Once the epitome of innovation, it’s now akin to a grizzled war veteran, limping along with a cane and wearing an “I Survived Y2K” t-shirt. So what went wrong? Let’s dive into this slow-moving technological telenovela, rife with corporate greed, security loopholes, and a legacy that may be hanging by a thread.
Chapter 1: A Brief, Glorious History (Or How cPanel Shot to Stardom)
Once upon a time, cPanel was the bee’s knees. Launched in 1996, this software was, for a while, the pinnacle of web management systems. It promised simplicity, reliability, and functionality. Oh, the golden years!
Chapter 2: The Tech Stack Tortoise
In the fast-paced world of technology, being stagnant is synonymous with being extinct. While newer tech stacks are integrating AI, machine learning, and all sorts of jazzy things, cPanel seems to be stuck in a time warp. Why? Because the tech stack is more outdated than a pair of bell-bottom trousers. No Docker, no Kubernetes, and don’t even get me started on the lack of robust API support.
Chapter 3: “The Corpulent Corporate”
In 2018, Oakley Capital, a private equity firm, acquired cPanel. For many, this was the beginning of the end. Pricing structures were jumbled, turning into a monetisation extravaganza. It’s like turning your grandma’s humble pie shop into a mass production line for rubbery, soulless pies. They’ve squeezed every ounce of profit from it, often at the expense of the end-users and smaller hosting companies.
Chapter 4: Security—or the Lack Thereof
Ah, the elephant in the room. cPanel has had its fair share of vulnerabilities. Whether it’s SQL injection flaws, privilege escalation, or simple, plain-text passwords (yes, you heard right), cPanel often appears in the headlines for all the wrong reasons. It’s like that dodgy uncle at family reunions who always manages to spill wine on the carpet; you know he’s going to mess up, yet somehow he’s always invited.
Chapter 5: The (Dis)loyal Subjects—The Hosting Companies
Remember those hosting companies that once swore by cPanel? Well, let’s just say some of them have been seen flirting with competitors at the bar. Newer, shinier control panels are coming to market, offering modern tech stacks and, gasp, lower prices! It’s like watching cPanel’s loyal subjects slowly turn their backs, one by one.
Chapter 6: The Alternatives—Not Just a Rebellion, but a Revolution
Plesk, Webmin, DirectAdmin, oh my! New players are rising, offering updated tech stacks, more customizable APIs, and—wait for it—better security protocols. They’re the Han Solos to cPanel’s Jabba the Hutt: faster, sleeker, and without the constant drooling.
Conclusion: The Twilight Years or a Second Wind?
The debate rages on. Is cPanel merely an ageing actor waiting for its swan song, or can it adapt and evolve, perhaps surprising us all? Either way, the story of cPanel serves as a cautionary tale: adapt or die. And for heaven’s sake, update your tech stack before it becomes a relic in a technology museum, right between floppy disks and dial-up modems.
This outline only scratches the surface, but it’s a start. If cPanel wants to avoid becoming the Betamax of web management systems, it better start evolving—stat. Cheers!
13 notes · View notes
Text
Madam President Kamala Harris 2024 US Flag T Shirt
Madam President Kamala Harris 2024 US Flag T Shirt PyCharm comes in two editions. The free and open-source Community Edition is designed for Python development only. The Madam President Kamala Harris 2024 US Flag T Shirt Professional Edition offers support for remote interpreters, frontend technologies including popular JavaScript frameworks, databases (SQL and noSQL), and Python web frameworks such as Django, Flask, and FastAPI. Some people say IDEs have a tough learning curve. It’s true that you will need to devote some time to learning the shortcuts and commands and configuring your environment to get the most from using PyCharm. Be aware, though, that unlike some other IDEs on the market, PyCharm has everything you need to start coding – right out of the box.
Tumblr media
2 notes · View notes
tweakingsql · 5 months
Text
So, I've eliminated a few paths already. One has nice examples that the author says are scripts. They're not Batch commands. If they're PowerShell, I don't have the right module (and it doesn't look right to my untrained eye). So what are they? Another was supposedly learning to use ScriptDOM, but no explanation of what to create is included. Maybe I'm too inexperienced to understand some stuff, but if you don't include at least a file type I'm fairly sure you skipped something.
So I'm trying this. It's worth a shot. First step, have a database project in VS. Uhm... I've never done that. I know why we should. But my work has a history of not requiring programmers to document what we do on production systems. Finally got the server admins doing it a while ago, but folks like me live dangerously. Grumble.
So - step 1, create a database. It's not a listed step, but apparently you don't do the creation in VS. There's no step for it in the template listing at least.
So instead I'm doing https://medium.com/hitachisolutions-braintrust/create-your-first-visual-studio-database-project-e6c22e45145b
Step one: in SSMS run the command:
CREATE DATABASE TCommon
T for temporary, and Common is a database I've already got going. It's for non-secure tools/programs/etc. that any of the other databases should be able to access.
Now to start up VS 2022. We begin a new project and search for database templates.
Tumblr media Tumblr media
Clear the checkbox for putting the solution and project in the same directory, and give an overarching name to the solution. That way you can have multiple database projects worked on inside of one solution.
Next, we import the blank database so we have a test bed based off what is in production. Right click on the solution name, select Import, then Database.
Tumblr media
The import database wizard looks like this after the connection is set.
Tumblr media
Blackburn suggests that you turn off the importation of referenced logins so you don't accidentally alter permissions. Sound strategy.
Then you can click on the "Select Connection" button.
Tumblr media
On my workstation, I have to Show Connection Properties, then change the default for Trust Server Certificate to True for it to make a connection. I'm running a test version of SQL Server and didn't set up the certificates.
Click on Connect. Then on the Import Database window, click Start.
Tumblr media
With a blank database, it's fairly anticlimactic, but there really is a connection now to the database, and the properties are copied to your work area. The summary tells you where the log is stored. Then click "Finish" to continue on.
Next, we'll add some objects in. Right click in the Solution Explorer pane, then click Add, then New Item. Lots of little goodies to play with. Since I've been trying to match a project from another site, I need to create a schema to store the objects in. Schemas are part of Security, and there's my little object. I select the schema, give it a name down below, and click Add.
Tumblr media
Well, not quite what I expected to happen: CREATE SCHEMA [AddSchema_Dim]
Tumblr media
But that's changeable. And in making that change, the solution's object has the name I wanted, and the code has the actual name of the schema I want.
Now, lets add a table.
Tumblr media
If you're like me, you've used a few of these, but not all of them. Time to do research if you're unsure, but I'm going to go with a simple table for this demonstration. Since I know the name of the solution object will take the name I put in the bottom, I'll name this one AddTable_Dim.Date, and know that I need to edit the actual code.
Tumblr media
You have choices. If you're used to creating tables using the upper part of the pane where there is a GUI type of set up, go for that. If you're used to typing things out, go to the lower part. Or mix and match! VS will keep the two in sync.
Tumblr media
Instead of 'ID' we use 'SID' for Surrogate Identifier. The intake process sets up the unique (across a table) SID values and follows rules that help us track issues backwards to the original location where the data came from.
Second, there's a version number in there. We have the same tables across various enclaves (groups of servers), and we keep the versions the same between all but our development enclave. But instead of forcing our developers and end users to keep up, we use views that are in the databases they work from to expose the data. Many times we don't need to change the views at all which is easier on people that don't need to memorize a few hundred tables and variations.
I'm going to cut this off here, and start working on the next post. Back soon!
0 notes
thedbahub · 6 months
Text
Identifying Signs of SQL Server Buffer Pool Pressure
Introduction The SQL Server buffer pool is a critical component that significantly impacts database performance. When the buffer pool is under pressure, it can lead to slower query execution and increased disk I/O. In this article, we’ll explore the top signs of buffer pool pressure and provide practical T-SQL code examples to help you identify and address these issues. Monitoring Page Life…
View On WordPress
0 notes
butlerettes · 2 years
Text
Tumblr media
Warning: There is fluff, more fluff, and some smut followed by some tooth-rotting
Masterlist
New York part four
Chapter 7
The light of the morning was peeking through the hotel curtains. Austin was still sleeping. It was a whirlwind last night. You had, had two glasses of champagne. You know Austin had a glass, but you didn't know if he drank it.  
Getting out of bed, you walk as quietly as you can to the bathroom.  Do you close the bathroom door?  You are just peeing.  He's seen every inch of you.  You decide to close the door so as not to wake him.  The bathroom was charming, elegant, and quaint.  The walls, the sink, and the toilet were white.  The sink had a black vanity.  It is all tied to the gold and white speckled black marble flooring. There was a painting with all the bathroom colors and some blue and grey above the towel rack.  This bathroom had a huge shower.  You and Austin have taken a few together in there.  There is a substantial tub with a black and white vase full of white and sky-blue flowers.  
After finishing, you flush and wash your hands. You stop to listen. It didn't seem like he was awake.  Again, you quietly make your way to the kitchen part of the room, closing the bedroom door behind you.  In the fully stocked kitchen, you rummage for coffee pods to put in the Keruig.  After finding a cup and the pod you wanted, you made coffee.  Taking your cup, you sat at the dining table and opened your laptop.  You took a sip and checked your emails.  You had four emails from your editor and one from the author.  You checked the author’s one first.
The Email:
Dear Ms. Y/LN,
The Cover of the book is fabulous. Thomas has given me the green light to start the second book. Here’s hoping for a best seller. Thank you for your hard work.
Yours Truly,
AN/LN
You felt such joy, and this made you smile. Then, not knowing Austin had been staring at you for a few minutes, he starts, “Good Morning, Beautiful.”  Jumping at his deep husky voice. “Austin Butler, you scared me,” you reply, holding your hand to your heart. “What were you smiling about?” he questioned with a quizzical smile. You were looking him up and down. He was wearing a bathrobe. You knew he had nothing on under it.  He sees your eyes.  "Do you like what you see?" His smile darkens.  Your face erupts with red.  Your body melts into a euphoric puddle when he smiles at you.  You look into his eyes, "It depends on whatcha got under there," you purr.  Parting his lips, he answered, "Come back to bed, and I'll show you."  Austin had told you he liked morning sex better than any.  It started his day off right.
He leaned against the doorway, waiting for you to get up. You slowly got up, showing no underwear. He squinted his eyes and licked his lips.  “I need you now, Y/N,” he demanded.  Your mouth twitches into a grin, and you bite your lower lip.  He clenches his jaw as he takes a step toward you.  You are wearing his t-shirt that he was wearing last night.  To him, you looked incredibly sexy in it.  He took another step forward.  You are now entirely standing.  He is close enough to you that you can feel his breath.  You look down, and his now standing-at-attention manhood is peeking through his robe.  He takes another step looking down at you, and you must step back.  He puts one arm around your waist to keep you from falling.  You hit the table as he puts his other hand on the table.  His eyes darken to a grey color.  His eyes blaze with passion as he lifts you.  He gently puts you on the table.  Moving his face closer toward you, he presses his lips to yours.  Slowly forcing your lips apart, he thrust his tongue inward.  Touching and swirling around each other's tongues, he places his thumb on your clit.  Gently rotating it around.  You gasp at the sensation.  You want to lie down, but his other arm is around you.  Arching your back, he leans with you.  He lifts your shirt and suckles your breast.  He slowly inserts two fingers into your mama's cavern. He is pushing them in briskly, going faster and faster.   Your hips are moving more quickly.  Breathing becomes faster, and Austin won't let you come up for air.   A sound escapes your mouth, Austin still thrashing your tongue, laughs.  He can feel how close you are.  He knows.  You need air.  Coming up for air, you feel all your muscles tighten just before you let go.  Feeling your orgasm, Austin doesn't hesitate, and he pushes his manhood into you.  He makes an animalistic gurgle noise.  You moan and hum as he enters. You are still finishing.   He no longer kisses you. His face is leaning against your shoulder, and his mouth nibbles on it.  You have your hands on his butt, pushing him.  Having wrapped your legs around his, you can feel every inch.  He pounds harder, faster, and deeper.  Groaning from his stomach, he tilts his head back to release his hot liquid. You were squeezing him from the inside. He lets out a small whimper.  He needed that.  Standing there, the two of you lock eyes.  For what seemed like forever, he just stared at you.  Feeling your face flush, “What?” you ask.  
Whispering, “Nothing, I just can’t believe you are mine.”  “Austin, I was going to tell you something.”  “Can it wait? I have a full day planned for us.”  “Yeah, It can wait.”
A few hours later, you and Austin are going to Liberty Island.  You have never been, and Austin thought it might be fun for you two to go.  He brought his camera just in case.  You were on the ferry leaning against the railing.  Austin was behind you, holding the rail in front of you.  Your hair was flying in the wind.  Because of his height, he was towering over you like a mountain towers over the valley.  You felt safe.  "Hey, let me take some pictures." He offered.  "What do I have to do?" You questioned.  "Nothing, just stand there like you are." He answered.  You looked out into the harbor.  Austin starts taking your picture from different angles.  He was serious about photography.  "Look to the side, that's good," he directed.  "I am getting some serious awesome shots."  "Now look over your shoulder to me, yeah, just like that.  My goddess, you look gorgeous.  I can't wait to develop these."  He stood up and gently kissed your cheek.  "Did you just call me a goddess?" You teased. "Yes, you are my goddess," he said, matter of factly. 
Austin made sure your day was complete.  Liberty Island, Ellis Island, Top of the rock (you were so scared, but Austin being there made you feel better), he took pictures of you at Times Square, at lunch, he took you to his favorite sushi restaurant, you went to Central Park, walked around holding hands and finally had dinner at Mulino.  He paid for everything.  You tried to pay once, but he got a little upset.  He kissed your forehead to let you know that it was ok.
Austin was not done spoiling you.  He knew Christmas was your favorite holiday, and since you were here at his request, he took you to see the Christmas tree at Rockefeller center. 
It was the most beautiful tree in the whole world.  As you were looking at the tree, Austin was behind you.  He was on one knee.  "Goddess, I need to ask you something.  Turn around beautiful," his voice shaking as he said it.  You turn around as tears well up in your eyes, "Oh. AUSTIN!!"  "Y/N L/N, I know we have only known each other for a few months, but I feel like I have known you much longer.  I find myself thinking about you all the time.  I physically need you to be mine, that's obvious.  More than that, I need you to be mine in every aspect of my life. Will you do me the honors and be my wife?"  He stood up, holding a ring between his thumb and index finger.  It was a quaint ring, not gaudy.  You liked simple jewelry.  You and Ashley had a conversation about it when you went shopping.  In fact, you had pointed out a ring that you would wear.  It was the ring.  Silver with a small diamond, a peridot stone for Austin, and your birthstone.  It was gorgeous, yet simple.  It was the perfect ring for you.  How did he get it made this quick?  Staring at him, tears running down your cheeks.  Poor Austin looked anxious.  He was waiting to hear a yes, no, maybe, or kick him in the balls.  He wanted an answer.  "This is what I wanted to talk to you about.  I will," you speak in a muffled voice.  He examined your face, "Is that a yes?" he quizzed, bending down to look you in the eye.  You lick your lips, "Yes, Butler, Yes!" You declared.  "Yes?" he inquires as he lifts you off your feet, turning you around.  He kisses you in the most loving way.  "My goddess."  He puts the ring on your finger, and he kisses your hand.
6 notes · View notes
butlerette · 2 years
Text
The way he says "Woah, That's My Mom" Too Cute!!!!
0 notes
voidofambition · 2 years
Text
Barely got through the week’s stuff - next week’s stuff is out but I’ll wait for food to come or at least an hour’s break. I need a proper review of what I just had to go through.
0 notes