Posts

Showing posts with the label SQL

Error Importing Azure bacpac file to local Db error incorrect syntax near EXTERNAL

This article concerns the following Stack Overflow question:  Error Importing Azure bacpac file to local db error incorrect syntax near EXTERNAL which also encountered. In my issues, I was dealing with a 5Gb file and could not edit the needed files.  TLDR:  Rather than using the accepted solution from the Stack Overflow link, I had to go through creating a new database on azure and removed the external authentication provider manually. I was able to export the database in the Azure portal which forced me to use then download it again in a blog so I could import locally. Notes I did run into this issue,  Is there a way to successfully import a bacpac that exceeds 4GB in which I need to change the Collation?  What I did was moved the file locally to the server, from there I was able to get around the limit. At least that's what I remember at the time of writing I had always completed this project but forgot to document it but I believe that is what I did. Se...

SQL Backup Database with Network folder

The time has come where I've been forced to work with SQL like a dba, and for once the pieces are falling in place.  https://stackoverflow.com/questions/3942207/how-can-i-backup-a-remote-sql-server-database-to-a-local-drive https://stackoverflow.com/questions/16491/restore-database-backup-over-the-network#:~:text=On%20the%20Server%20that%20you,bak%22 https://stackoverflow.com/questions/10204480/sql-server-the-backup-set-holds-a-backup-of-a-database-other-than-the-existing https://dba.stackexchange.com/questions/28082/restore-backup-fails-file-db-cannot-be-restored-to-mdf-use-with-mov Generating a script took too long and wasnt helpful for what I needed since I'd still need to move it onto the server. We're talking about 200gb and plus... and to make matters worse time is important. Since the backups are created nightly on the server and I just need to restore the backup on another server it seems kinda of a waste to not be able to use it. https://stackoverflow.com/questions...

Sql Cheatsheet

After my first job I realized the importance of learning a bit about it all. None should be in the dark when it comes to their website. I might not be a master of relational databases but give me a mongodb or reddis and even a firebase database any day. Still some projects are dependent on mysql and etc so I have enough info to help me move forward. Nothing I had more than a dba or team who locks me out. Throw exception from SQL Server function to stored procedure - Stack Overflow HOW TO: Return Errors and Warnings from a SQL Server Stored Procedure in ADO.NET RAISERROR (Transact-SQL) SQL server management studio local database connection error in windows 7 Visual Studio Database Guide - Home How to: Use Source Control with SQL Server Management Studio mysql - Sending multiple data parameters with jQuery AJAX sql server - Inserting multiple rows in a single SQL query? LuaSQL: Database connectivity for the Lua programming language DECLARE @local_variable (Transact-SQL) Pa...

Coursera: Introduction to Databases Part II

    Continuing from my previous article  this post is a collection of my notes, and my study of SQL databasing. Relational Algebra Tuple - Wikipedia sql - What does the term "Tuple" Mean in Relational Databases? - Stack Overflow sql - Clear explanation of the "theta join" in relational algebra? - Stack Overflow Two selection operators in a row can always be replaced by a single selection operator whose condition is the "and" of the two selection conditions. If there are two projection operators in a row, the attribute list of the second (outer) projection must be a subset of the attribute list of the first (inner) projection. Thus, the first projection can be removed without changing the result of the expression. SQL Join Inner Join on  Condition Natural Join Inner Join Using (attrs) Aggregation Aggregate Functions (Transact-SQL) Aggregate function - Wikipedia, the free encyclopedia SQL Functions Null Values  in relational databas...

Using Entity Framework and a Storage Procedure with Parameters

    So I was stuck sometime ago on a problem I had where I was using my sql store procedure with the Entity Framework. Eventually found what I needed and the purpose of this article is just to write out a small example. I've come up with  multiple  ways to achieve the same thing now but this is the most basic form of it. public IList<KeyValuePair> GetIds (string id) { using (var db = DBFactory. GetDB ()) { return db.Database.SqlQuery<KeyValuePair>( "EXEC db.MyDatabase @id", new SqlParameter("id", id)); } } Resources How to pass parameters to DbSet.SqlQuery Method in Entity Framework How to use DbContext.Database.SqlQuery (sql, params) with stored procedure? EF Code First CTP5 The data reader has more than one field. Multiple fields are not valid for EDM primitive types KeyValuePair(TKey, TValue) Structure (System.Collections.Generic)

Coursera: Introduction to Databases Part 1

     I ntroduction to Databa ses is  taught by Jennifer Widom and hosted by Coursera as a self paced class.  As someone  who  mainly does front-end developing I feel this class should be very helpful for me to add some new set of skill to my array. I also think this class will help better   prepare me  later down the road  for my plans to take the  SQL certifications . This is article is part of a series of other articles that will be on the class , but this article  particularly  is about XML, DTD and Json.     When I first started this article it was a single  entity  but as I got through more of the class the article was a little more  too  much for me to maintain as well as keep track of since I went out of order with what the had class. I think the topic that most interested me for this class was learning about triggers. However so far this article is about nothing new but I felt it wa...

Popular posts from this blog

Aspetcore: NLog with Postgresql

Mongodb Cheatsheet

Installing Windows on Acer chromebook 15 cb3-532