Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
NotebookEnjoyer
Advocate II
Advocate II

Cannot detach data item from notebook

Hi, the title is pretty much self-explanatory. The "Remove" option is greyed out. What is going on?

NotebookEnjoyer_0-1771509916203.png

2 ACCEPTED SOLUTIONS
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @NotebookEnjoyer 

 

What you're experiencing is how Fabric Notebooks are designed to behave!

 

In a Fabric notebook, only ONE Warehouse can be the “primary” Warehouse. The first attached Warehouse becomes permanently bound. That primary Warehouse can never be removed. Any additional Warehouses are secondary and can be removed. You can try this with the other Warehouse you have attached. 

 

It seems the one you tried to remove is the first Warehouse you attached to your notebook. 

 

Fabric internally assigns the first Warehouse as Notebook SQL execution context. So it follows this rule

First Warehouse = permanent

Subsequent Warehouses = optional

 

If you want to “change” the primary Warehouse:

  1. Create a new notebook
  2. Attach the desired Warehouse first
  3. Copy notebook content
  4. Delete the old notebook

This is the only supported way to change the primary Warehouse.

 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

View solution in original post

Hi, same problem, the solution that i found was deleting all sources from the OneLake source and then adding them again.

 

RamiroD_1-1774621455991.png

View solution in original post

7 REPLIES 7
deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @NotebookEnjoyer 

 

The workaround mentioned by @Srisakthi is valid, however I don't think that applies to your case. I looked closely at your screenshot to identify the type of data item you're dealing with - in your case it is a Warehouse, although you've named it BC_140_TEST_Lakehouse.

 

The "Set as default lakehouse" option will show on a Lakehouse, not on a Warehouse item! The first Warehouse you add to your Notebook is permanent - you can't delete that, for reasons I mentioned in my first response to you. 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Hi @deborshi_nag ,

 

You are right , we cannot do it on "Warehouse". But once we attach a lakehouse to notebook(which is already attached with warehouse first) in my case it allows to remove warehouse. Fabric automatically assign lakehouse as default.

Srisakthi_0-1771584478515.png

 

Thanks,

Srisakthi

 

Srisakthi
Super User
Super User

Hi @NotebookEnjoyer ,

 

If you want to remove the lakehouse , choose some other lakehouse as Default and then try removing the lakehouse, it will get removed.

Step 1: In this sample i have two lakehouses attached to my notebook, the first one with pin symbol is default,so you cannot remove it.

Srisakthi_0-1771562440519.png

Step2: Set the second lakehouse as default,

Srisakthi_1-1771562531530.png

Step 3: Now you will be able to see the option for the lakehouse which you want to remove as it becomes not default

Srisakthi_2-1771562592945.png

 

 

 

Thanks,

Srisakthi

Srisakthi
Super User
Super User

Hi @NotebookEnjoyer ,

 

If you want to remove the lakehouse , choose some other lakehouse as Default and then try removing the lakehouse, it will get removed.

Step 1: In this sample i have two lakehouses attached to my notebook, the first one with pin symbol is default,so you cannot remove it.

Srisakthi_0-1771562440519.png

Step2: Set the second lakehouse as default,

Srisakthi_1-1771562531530.png

Step 3: Now you will be able to see the option for the lakehouse which you want to remove as it becomes not default

Srisakthi_2-1771562592945.png

 

 

 

Thanks,

Srisakthi

Hi, same problem, the solution that i found was deleting all sources from the OneLake source and then adding them again.

 

RamiroD_1-1774621455991.png

Amazing, it works.

deborshi_nag
Resident Rockstar
Resident Rockstar

Hello @NotebookEnjoyer 

 

What you're experiencing is how Fabric Notebooks are designed to behave!

 

In a Fabric notebook, only ONE Warehouse can be the “primary” Warehouse. The first attached Warehouse becomes permanently bound. That primary Warehouse can never be removed. Any additional Warehouses are secondary and can be removed. You can try this with the other Warehouse you have attached. 

 

It seems the one you tried to remove is the first Warehouse you attached to your notebook. 

 

Fabric internally assigns the first Warehouse as Notebook SQL execution context. So it follows this rule

First Warehouse = permanent

Subsequent Warehouses = optional

 

If you want to “change” the primary Warehouse:

  1. Create a new notebook
  2. Attach the desired Warehouse first
  3. Copy notebook content
  4. Delete the old notebook

This is the only supported way to change the primary Warehouse.

 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.