Thursday, December 26, 2019
Monday, December 23, 2019
Friday, December 20, 2019
Wednesday, December 18, 2019
Monday, December 16, 2019
Saturday, December 14, 2019
Friday, December 13, 2019
Monday, December 9, 2019
Tuesday, December 3, 2019
Monday, December 2, 2019
Friday, November 29, 2019
Thursday, November 28, 2019
Wednesday, November 27, 2019
Tuesday, November 26, 2019
Monday, November 25, 2019
Monday, November 18, 2019
Friday, November 15, 2019
Thursday, November 14, 2019
Wednesday, November 13, 2019
Monday, November 11, 2019
Friday, November 8, 2019
Thursday, October 31, 2019
Wednesday, October 30, 2019
Monday, September 30, 2019
How to Move SQL Server MDF and LDF Files?
I personally use the following method to move the data and log files for my customers. Let us learn that step by step.
Let us assume that we want to move database SQLAuthority from their D drive to E drive on my machine.
Step 1: Original Location
First, we will get the location of the physical files using the following command.
1
2
3
| SELECT name , physical_name AS CurrentLocation, state_desc FROM sys.master_files WHERE database_id = DB_ID(N 'SQLAuthority' ); |
Step 2: Take Database Offline
You can take the database offline running following command.
1
| ALTER DATABASE SQLAuthority SET OFFLINE; |
Step 3: Move Files – MDF and LDF
Now in this step, you will have to move your database files from the original location to the new location.
Step 4: Change the file location inside SQL Server
Running following command will change the location of the file for SQL Server.
1
2
3
4
5
| ALTER DATABASE SQLAuthority MODIFY FILE ( NAME = SQLAuthority_Data, FILENAME = 'E:\data\SQLAuthority.mdf' ); ALTER DATABASE SQLAuthority MODIFY FILE ( NAME = SQLAuthority_Logs, FILENAME = 'E:\data\SQLAuthority_Logs.ldf' ); GO |
Step 5: Bring Database Online
Now run following command to bring the database online.
1
| ALTER DATABASE SQLAuthority SET ONLINE; |
Step 6: Check the database file location
You can verify your database move by running following command.
Well, that’s it. You do not have use older method of Detach or Attach anymore if you want to move your database.
How to Rename a Column Name or Table Name in SQL
The script for renaming any column :
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'
The script for renaming any object (table, sp etc) :sp_RENAME '[OldTableName]' , '[NewTableName]'
This article demonstrates two examples of renaming database object.
- Renaming database table column to new name.
- Renaming database table to new name.
In both the cases we will first see existing table. Rename the object. Test object again with new name.
1. Renaming database table column to new name.
Example uses AdventureWorks database. A small table with name “Table_First” is created. Table has two fields ID and Name.
Now, to change the Column Name from “Name” to “NameChange” we can use command:
USE AdventureWorks
GOsp_RENAME 'Table_First.Name', 'NameChange' , 'COLUMN'GO
Following Fig. show use of SP_RENAME Command
You can see the column name “Name” is now changed to “NameChange“.
USE AdventureWorks
GOSELECT *FROM Table_First
GO
Following fig. verify that the column name has been changed.
2.Renaming database table to new name.
We can change the table name too with the same command.
sp_RENAME 'Table_First', 'Table_Last'GO
Following fig. Shows how we can change Table Name.
Now, the table name “Table_First” is renamed as “Table_Last”.
“Table_First” will no longer be available in database. We can verify this by running script:
USE AdventureWorks
GOSELECT *FROM Table_First
GO
The Messages shows an error “Invalid object name ‘Table_First’.”
To check that the new renamed table exist in database run script:
USE AdventureWorks
GOSELECT *FROM Table_Last
GO
You can see the same data now available in new table named “Table_Last”
Interesting Stories & Legends About Lord Shiva That Prove He Is The Coolest God Ever
Allowing almost everything which is otherwise considered a taboo in religion, here's a God who apparently makes mistakes fearlessly and deals with them in a surprisingly calm way. Whaaaat?! Definitely, someone who is not a sucker for rules, he is fairly easy to please and breaks all stereotypes of being a God.
Cool, chic (he wears a dreadlock), fun, unpredictable (unlike most Gods), and extremely popular with the young and the old alike, Lord Shiva deals with the cosmos, meditates most of the time, likes to mind his own business, has a crazy mix of anger and calm, and is someone whose stories have managed to appeal to every generation of people.
Here are some fun stories and interesting facts about him
1. Hanuman, son of Anjana and Kesari, is actually an avatar of Lord Shiva
It is believed that Hanuman is the eleventh avatar of Lord Shiva. Several texts present him as an incarnation of the god Shiva. Known for his devotion to Lord Rama, the son of Anjana and Kesari, blessed by the Hindu God of wind, Vayu, Hanuman is celebrated for his devotion to Lord Rama.
2. Ravana, the primary antagonist in the Hindu epic Ramayana, was one of the greatest devotees of Lord Shiva
It is said, when Ravana tried to uproot Mount Kailash, Shiva trapped him beneath Kailash. To redeem himself, Ravana started pleasing Shiva by singing hymns and playing instruments. Eventually, over many years, Shiva freed him from under the mountain and blessed him.
Source: wordpress
3. Even Kamadeva, the Hindu God of love and Cupid's equivalent, could not distract Shiva successfully with his tricks. He had to face the consequence when he tried to
When Devas were waging a war against Tarakasur, they needed Shiva's help but Shiva was busy meditating. So the Devas asked Kamadeva to pierce Shiva with his love arrows. But Shiva, who was in deep meditation, woke up in rage and burned Kamadeva down to ashes with his third eye.
Source: YouTube
4. Lord Shiva's first wife Sati killed herself because she was frustrated with her father who insulted Shiva. Shiva took his revenge and how
As per mythology, Sati, and not Parvati, (as most of us may not know), was the first wife of Shiva and was very fond of him. The daughter of a priest, her father did not approve of the ways of Shiva. When Sati's father decided to perform a sacrifice, he invited everyone except for Shiva. This move to insult Shiva really bothered her and she killed herself in the sacrifice. A furious Shiva killed her father in a rage.
5. The snake around Shiva's neck reinforces a sense of stillness
The mountains, snow and the snake around Lord Shiva's neck is a symbol representing his sense of calmness. Self-contained and content, Shiva is a symbol of calm and peace.
6. Shiva's Trishul or Trident symbolizes the unity of three worlds
The Trident or Trishul of Lord Shiva unites the three worlds a human being is associated with - his inside world, the immediate world around him and the broader world. The trident shows a harmony between the three.
7. Ganja/Cannabis is one of the primary offerings in Shiva's worship
On the auspicious day of Shivaratri, the Shaivites, a sect of followers, consume Bhang (a beverage prepared from cannabis) and smoke weed. Popular among the followers, this is one hell of an offering for a God!
8. Shiva takes the form of Nataraja to suppress Apasmara - the symbol of ignorance
It is believed, the dwarf demon 'Apasmara', who represented ignorance challenged Lord Shiva. It was then that Lord Shiva took the form of Nataraja and performed the famous Tandava or the dance of destruction, eventually crushing the arrogant Apasmara under his right foot. Since Apasmara (ignorance) should not die to preserve the balance between knowledge and ignorance, it is believed that Lord Shiva forever remains in his Nataraja form suppressing Apasmara for eternity. His Nataraja avatar is a message that ignorance can only be overcome by knowledge, music, and dance.
9. Ardhanarishwar is Shiva's androgynous form
Often cited as an example of perfect marriage, Shiva along with his consort Parvati is represented in the Ardhanarishwar form - which is a half male and half female icon. It is believed that this androgynous form shows that the masculine energy (Purusha) and feminine energy (Prakrithi) of the universe in a synthesis.
10. Shiva accepted Nandi, who was offered to Him by other Gods, as his doorkeeper and his vehicle
As the story goes, Surabhi, the mother of all cows started giving birth to a lot of cows, and the cows started flooding Kailash with their milk. Furious at this, Shiva used his third eye and destroyed many of them. To calm him down, the Gods sought to offer Nandi the magnificent bull to Lord Shiva.
11. In stories, Lord Shiva is naked and sports an erect phallus
According to Devdutt Pattanaik, in Epified, Shiva is naked and sports an erect phallus in almost all the stories. It is to save the public from discomfort that he clothes himself in an animal hide. According to Pattanaik, Shiva being content and disconnected from the outside world is aroused not by external stimulation but by perpetual internal bliss.
12. The ash Shiva is smeared with symbolizes permanence and destruction
Like we all know, Shiva is smeared with ash. It is a symbol of destruction as well as permanence for it is created by burning things but cannot be burnt itself. It is a symbol indicating the permanence of the immortal soul, which is released when the matter is destroyed.
13. The three lines of ash on his forehead refers to destruction of the three worlds
Shiva has three lines of ash smeared on his forehead in a horizontal orientation. The lines represent the destruction of the three worlds of Hinduism. It suggests inertia and lack of movement and refers to the merging of the three worlds to become one with the self.
14. Shiva has a blue throat because he drank Halahala poison during the churning of the milky ocean.
The Devas and Asuras started churning the milky ocean in order to obtain Amrit. In the process, they found a fatal poison - the Halahala poison, that had to be sucked out of the ocean. Without thinking of the consequences, Shiva drank all the poison and Parvati pressed his throat in order to stop the poison from spreading to other parts of his body - which is the reason behind his blue throat.
15. The story of the infinite pillar of fire - when Brahma and Vishnu fought over who the real God was, Shiva made it clear who it really was.
In a conflict between Brahma and Vishnu regarding who the real God was, Shiva appeared as an infinite Linga fire-pillar. Determined to find the ends of the pillar, Vishnu as Varaha tried to find the bottom of the Linga while Brahma tried to find its top. Vishnu came back and admitted that the pillar was endless. Brahma, however, lied about the pillar's limits and claimed that he was the true God. Just then, the pillar broke open and Shiva appeared. Accusing Brahma of lying and denying he is a God, he appreciated Vishnu for his honesty and suggested that Vishnu was on his way to becoming a God - in the process stating that he was the one true God. We see what you did there!
16. According to a Hindu legend, Shiva explained the secret of life and eternity in the Amarnath Cave to Parvati
It is believed, this is the cave where Shiva explained the secret of life and eternity to his divine consort, Parvati. Every year, followers and devotees of Lord Shiva pay their visit to the famous Amarnath cave. The cave also houses an ice stalagmite Lingam.
17. Shiva was attracted to Vishnu's female form, Mohini, as a result of which Ayyappa was born
In the Bhagavata Purana, after Vishnu deceived the demons in his female form, Shiva wanted to see the bewildering Mohini again. When Vishnu agreed and revealed his Mohini form, Shiva got lured by Mohini, while the abandoned wife Parvati looked on. Shiva is overcome by Kama (love and desire). His 'unfailing' seed escaped and fell on the ground. From these seeds of Shiva, Ayyappa was born.
18. Shiva calmly trapped Ganga back in his hair because of her arrogance. He let her out but in small streams
As it goes, Bhagiratha asked Brahma to bring the river Ganges down to earth so that he could perform a ceremony for his ancestors. Brahma asked Bhagiratha to propitiate Lord Shiva, for only Shiva could break Ganga's landfall. Ganga arrogantly flew down to earth but Shiva calmly trapped her back in his hair and let her out in small streams. It is said, the touch of Shiva further sanctified Ganga.
19. Lord Shiva punished one crore Gods and Goddesses for not waking up on time and turned them into stone images
As per Hindu mythology, Lord Shiva was on his way to Kashi along with one crore gods and goddesses. He asked all of them to wake up before sunrise the following day, before taking a night's rest in Unakoti, Tripura. But in the morning, no one except Shiva woke up. This made him furious and he set out for Kashi on his own, cursing the others to become stone images.
True or not, the debate will go on. But by far, Shiva is the closest to the most relatable and coolest of all the Hindu Gods, hands down.
Subscribe to:
Posts (Atom)
ಆರ್ಯ ಮತ್ತು ದ್ರಾವಿಡ ನಡುವಿನ ವ್ಯತ್ಯಾಸವೇನು?
ಮೊದಲಿಗೆ ಈ ಪದಗಳ ಪರಿಚಯ ನೋಡೋಣ. ಆರ್ಯ ಅನ್ನೋದು ಉತ್ತಮ/ದೊಡ್ಡವರು ಎಂಬ ಅರ್ಥ ನೀಡುತ್ತದೆ ಅಷ್ಟೇ. ಉತ್ತಮ ಕುಲದಲ್ಲಿ ಹುಟ್ಟಿದವನು, ಯಜಮಾನ, ಹಿಡಿದ ಕೆಲಸವನ್ನು ಬಿಡ...
-
1."ವಿಶ್ವ ಬುಡುಕಟ್ಟು ದಿನ" ಎಂದು ಆಚರಿಸಲಾಗುತ್ತದೆ ? ಅಗಸ್ಟ್ 9 2.ಸಿದ್ದಿ ಜನಾಂಗ ಯಾವ ರಾಜ್ಯದಲ್ಲಿ ಕಂಡುಬರುತ್ತದೆ ? ಕರ್ನಾಟಕ ರಾಜ್ಯದಲ್ಲಿ 🔸ಯಲ್ಲಾಪುರ...
-
1) ಜನಿಸಿದೆಡೆಯಿಂ ಕಡಲವರೆಗಮಡಿಯಡಿ ನೆಲದ । ಗುಣದ ಕೊಳ್ಳುತ ಕೊಡುತ ಪೊನಲು ಮಾರ್ಪಡುಗಂ ॥ ಮನುಜಸಂತಾನದಲಿ ಗುಣದವತರಣವಂತು । ಗುಣಿಪುದೆಂತಾ ತೆರನ - ಮಂಕುತಿಮ್ಮ j...