Link to home
Start Free TrialLog in
Avatar of marrowyung
marrowyung

asked on

Column, parameter, or variable #1: Cannot find data type dbo.booking_key.

hi,

right now moved to a new MSSQL  test server, but when I do this:

IF Object_id('tempdb..#datasource') IS NOT NULL
DROP TABLE #datasource;
CREATE TABLE #datasource
(
booking_key [dbo].[booking_key] 
);

Open in new window


it said :

Msg 2715, Level 16, State 7, Line 5
Column, parameter, or variable #1: Cannot find data type dbo.booking_key.

that type dbo.booking_key really exists.

any reason for that?
Avatar of marrowyung
marrowyung

ASKER

type must be in tempdb?
ASKER CERTIFIED SOLUTION
Avatar of Arifhusen Ansari
Arifhusen Ansari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
tks.
tks and even I google it
hi,

one thing, if I restart that SQL server, do I need to rebuild all customized data type again ?
Yes. Any type created in the Temp db will be vanished once you restart your server.
then how can we make it all appear again once SQL server restarted?

create that in model DB ?
Yes you can do that. But that type will be created for all new data base you will created after that.
yes! I think about that too. so other than that, no other method but just  keep creating each time we restart the SQL server?