I used a temporary table in a stored procedure.Whenever this stored procedure is executed with the desired output it is giving the warning message-
Warning: The table '#TEMPTBLPERSON' has been created but its maximum row size (10930) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.
Now my question is how can I avoid of displaying this warning message
in the stored procedure without altering the temporary table ?Originally posted by subhasishray
I used a temporary table in a stored procedure.Whenever this stored procedure is executed with the desired output it is giving the warning message-
Warning: The table '#TEMPTBLPERSON' has been created but its maximum row size (10930) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.
Now my question is how can I avoid of displaying this warning message
in the stored procedure without altering the temporary table ?
The best way is to reduce the data size of the table to less than 8060 bytes.
other way .. i believe might be to set the option
set ansi_warnings off|||I wrote clearly I don't want to reduce the length of the table.
set ansi_warnings_off|on is not giving desired output.
Subhasish|||Originally posted by subhasishray
I wrote clearly I don't want to reduce the length of the table.
set ansi_warnings_off|on is not giving desired output.
Subhasish
Clearly ... you are not paying heed to the warning message .. An insert into your table will fail in case the data is more than 8060 bytes . You should take that case into consideration.
Am searching for the other answer .. will get back as soon as i find it|||There is no "other" answer, you've said it all. the only other thing to do would be to split the table into 2 with 1-to-1 relationship.|||I was searching for a server property where i could control the severity level of warnings and errors as is availible in osql with the -m flag.|||Originally posted by subhasishray
I wrote clearly I don't want to reduce the length of the table.
set ansi_warnings_off|on is not giving desired output.
Subhasish
Whether you know it or not...that comes across with some attitude..
If you can't be flexible...then I don't know who will...
good luck...
Showing posts with label whenever. Show all posts
Showing posts with label whenever. Show all posts
Friday, March 30, 2012
Wednesday, March 21, 2012
Restoring only .MDF file
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I res
tore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.Katrhik
Regardless of recovery model of you SQL Server you will have log file.
if you detached your database and removed the log file so use
This example detaches pubs and then attaches one file from pubs to the
current server.
EXEC sp_detach_db @.dbname = 'pubs'
EXEC sp_attach_single_file_db @.dbname = 'pubs',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf'Note : you will have log file created by sql
server with (if i remmember well) size of 2MB.
"Karthik" <anonymous@.discussions.microsoft.com> wrote in message
news:AA2705B7-F22A-4BB8-B9CD-6064D554721B@.microsoft.com...
restore the database via EM I get both the MDF and the LDF file.
Glen Victor
-- Karthik wrote: --
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I res
tore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.sql
I have a backup of a database which is around 1.5 GB in size. Whenever I res
tore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.Katrhik
Regardless of recovery model of you SQL Server you will have log file.
if you detached your database and removed the log file so use
This example detaches pubs and then attaches one file from pubs to the
current server.
EXEC sp_detach_db @.dbname = 'pubs'
EXEC sp_attach_single_file_db @.dbname = 'pubs',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf'Note : you will have log file created by sql
server with (if i remmember well) size of 2MB.
"Karthik" <anonymous@.discussions.microsoft.com> wrote in message
news:AA2705B7-F22A-4BB8-B9CD-6064D554721B@.microsoft.com...
quote:
> Hi,
> I have a backup of a database which is around 1.5 GB in size. Whenever I
restore the database via EM I get both the MDF and the LDF file.
quote:|||Try simply attaching the MDF and a blank LDF files
> Because of this I need a tremendous amount of space in the hard disk.
> Is there anyway, wherein I can only restore the MDF file?
> Regards,
> Karthik.
Glen Victor
-- Karthik wrote: --
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I res
tore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.sql
Restoring only .MDF file
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I restore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.Katrhik
Regardless of recovery model of you SQL Server you will have log file.
if you detached your database and removed the log file so use
This example detaches pubs and then attaches one file from pubs to the
current server.
EXEC sp_detach_db @.dbname = 'pubs'
EXEC sp_attach_single_file_db @.dbname = 'pubs',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf'Note : you will have log file created by sql
server with (if i remmember well) size of 2MB.
"Karthik" <anonymous@.discussions.microsoft.com> wrote in message
news:AA2705B7-F22A-4BB8-B9CD-6064D554721B@.microsoft.com...
> Hi,
> I have a backup of a database which is around 1.5 GB in size. Whenever I
restore the database via EM I get both the MDF and the LDF file.
> Because of this I need a tremendous amount of space in the hard disk.
> Is there anyway, wherein I can only restore the MDF file?
> Regards,
> Karthik.|||Try simply attaching the MDF and a blank LDF files
Glen Victor
-- Karthik wrote: --
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I restore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.
I have a backup of a database which is around 1.5 GB in size. Whenever I restore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.Katrhik
Regardless of recovery model of you SQL Server you will have log file.
if you detached your database and removed the log file so use
This example detaches pubs and then attaches one file from pubs to the
current server.
EXEC sp_detach_db @.dbname = 'pubs'
EXEC sp_attach_single_file_db @.dbname = 'pubs',
@.physname = 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\pubs.mdf'Note : you will have log file created by sql
server with (if i remmember well) size of 2MB.
"Karthik" <anonymous@.discussions.microsoft.com> wrote in message
news:AA2705B7-F22A-4BB8-B9CD-6064D554721B@.microsoft.com...
> Hi,
> I have a backup of a database which is around 1.5 GB in size. Whenever I
restore the database via EM I get both the MDF and the LDF file.
> Because of this I need a tremendous amount of space in the hard disk.
> Is there anyway, wherein I can only restore the MDF file?
> Regards,
> Karthik.|||Try simply attaching the MDF and a blank LDF files
Glen Victor
-- Karthik wrote: --
Hi,
I have a backup of a database which is around 1.5 GB in size. Whenever I restore the database via EM I get both the MDF and the LDF file.
Because of this I need a tremendous amount of space in the hard disk.
Is there anyway, wherein I can only restore the MDF file?
Regards,
Karthik.
Subscribe to:
Posts (Atom)