tag:blogger.com,1999:blog-6082652835152798567.post5099318670464286489..comments2024-03-28T00:58:12.736-07:00Comments on Sql server, .net and c# video tutorial: Creating, altering and dropping a database - Part 2Unknownnoreply@blogger.comBlogger15125tag:blogger.com,1999:blog-6082652835152798567.post-45088097701223170592023-09-13T18:53:48.793-07:002023-09-13T18:53:48.793-07:00trying to drop a database but it failed. I tried t...trying to drop a database but it failed. I tried the command shown below (change to a single user ) but I got an error message which is : User does not have permission to alter database. Anyone can help ? <br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-50724342213436400102023-05-04T12:50:50.910-07:002023-05-04T12:50:50.910-07:00May be your table "tblPerson" GenderId c...May be your table "tblPerson" GenderId column has value other than value present in the table "tblGender" Id column. i.e., If GenderId column has a value "99" prior to foreign key constraint is a valid case. But if you try to add foreign key constraint GenderId column must have a value of the table "tblGender" Id column or NULLGopinoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-21871182370799305362023-03-26T11:23:21.591-07:002023-03-26T11:23:21.591-07:00If the .ldf file is deleted, it means that all the...If the .ldf file is deleted, it means that all the transaction log data is lost, and it will not be possible to use it for recovering the database. In such a scenario, you will have to resort to other backup and restore options to recover your data.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-27623241660631142522022-07-01T10:59:09.763-07:002022-07-01T10:59:09.763-07:00Change the database recovery mode to simple if you...Change the database recovery mode to simple if you don't need to restore the data to point in time. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-75125065500459002902022-01-09T03:32:16.893-08:002022-01-09T03:32:16.893-08:00Avoid using sp_renameDB to rename the Database, as...Avoid using sp_renameDB to rename the Database, as it is soon going to be removed from future version of MS SQL SERVER. Refer: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-renamedb-transact-sql?view=sql-server-ver15Vishal Jhaverihttps://www.blogger.com/profile/16667637235924050709noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-79149635094738946102021-07-02T23:13:10.807-07:002021-07-02T23:13:10.807-07:00Msg 547, Level 16, State 0, Line 1
The ALTER TABLE...Msg 547, Level 16, State 0, Line 1<br />The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "tblPerson_GenderID_FK". The conflict occurred in database "Sample3", table "dbo.tblGender", column 'ID'.Anonymoushttps://www.blogger.com/profile/07819908738785534294noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-36888082716064033382021-06-24T23:41:33.281-07:002021-06-24T23:41:33.281-07:00Hi Venkat,
Will it be possible to share .bak file ...Hi Venkat,<br />Will it be possible to share .bak file which you are using for training.<br />It would be helpful for tariningAnonymoushttps://www.blogger.com/profile/01774062924855208578noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-52760068284344314212021-06-08T01:25:54.532-07:002021-06-08T01:25:54.532-07:00Dear Venkat Sir,
When I executed following query,...Dear Venkat Sir,<br /><br />When I executed following query,<br /><br />Alter table tblPerson <br />add constraint tblPerson_GenderId_FK FOREIGN KEY (GenderId) references tblGender(ID)<br /><br />Getting below error,<br /><br />Msg 547, Level 16, State 0, Line 1<br />The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "tblPerson_GenderId_FK". The conflict occurred in database "sample", table "dbo.tblGender", column 'ID'Sureshhttps://www.blogger.com/profile/03916836024660373290noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-44895423452650382002020-07-21T00:14:04.023-07:002020-07-21T00:14:04.023-07:00Hi Venkat,
In this blog, as per you said if we de...Hi Venkat,<br /><br />In this blog, as per you said if we delete the database both .mdf and .ldf will be deleted but if we rename the database, Will the actual database name in file path be changed?<br /><br />I found in my case that if I rename the database, the change in database name is not reflecting in the actual file path, so what's the reason behind it?<br /><br />ThanksSagar Patelhttps://www.blogger.com/profile/18263032363523333812noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-69960745426426525932019-12-26T01:47:42.251-08:002019-12-26T01:47:42.251-08:00Hi sir
Is there any chance to create the Files wit...Hi sir<br />Is there any chance to create the Files with QueryTrinathhttps://www.blogger.com/profile/12390021052017207315noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-46869217563425090282019-05-16T12:20:46.443-07:002019-05-16T12:20:46.443-07:00Simple take log backup of database and perform DBC...Simple take log backup of database and perform DBCC Shrink file operation on it. <br /><br />Anonymoushttps://www.blogger.com/profile/11426996186451633044noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-57857881298071606022018-11-25T18:52:57.683-08:002018-11-25T18:52:57.683-08:00hi Mr. venkat,
i need to take sql sever course wi...hi Mr. venkat,<br /><br />i need to take sql sever course with you<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-13271556245283567112018-01-06T07:41:58.305-08:002018-01-06T07:41:58.305-08:00if we drop the database .ldf file will be deleted....if we drop the database .ldf file will be deleted.then how it is used to recover the database?Anonymoushttps://www.blogger.com/profile/12807529667386926528noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-48915276651063719882016-04-02T04:59:35.025-07:002016-04-02T04:59:35.025-07:00Hi Venkat,
If the size of the .LDF file is gettin...Hi Venkat,<br /><br />If the size of the .LDF file is getting increased in GBs so how to decrease the size of it. In my case the size is increased about 48GB. I have tried with shrink option but it is not working.<br /><br />Thanks.Anonymoushttps://www.blogger.com/profile/04300575700482638694noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-27167470822072350432015-06-22T00:38:15.799-07:002015-06-22T00:38:15.799-07:00Hi Venkat,
Is it possible to add sample links of...Hi Venkat, <br /><br />Is it possible to add sample links of scriptlets or snippets of databases and tables as a part of your download. <br /><br />Additionally, TSQL based programming functions and procedures tutorials will be a good start for beginners.<br /><br />thanksAnonymousnoreply@blogger.com