Hello! I am looking for creative ideas to the following situation.
Currently I receive multiple .dbf files coming in from multiple locations at
the end of the day. I then use DTS to bring those files into their
appropriate tables in a sql database.
However, now we would like to get the information real time from these
multiple locations that are on our WAN. So there are multiple remote.db
databases sitting on different workstations on the WAN that we would like to
get data from and pull back to our central MS Sql 2000 database. It can pol
l
every 15 minutes, every time an update hits remote.db, or every
hour...Doesn't matter, we just don't want to wait until the end of the day.
We can easily install an application on the remote workstations that have
remote.db on.
Any high level ideas are appreciated! Using any technologies...
Thanks, AshleyTAshley,
Have you looked in to the Replication capabilities of SQL Server?
Barry|||Why don't you use replication?|||Can I get the data from a Sybase Adaptive SqlAnywhere databases acrosse the
WAN?
Thank you,
"Alexander Kuznetsov" wrote:
> Why don't you use replication?
>|||>> we would like to get the information real time from these
multiple locations that are on our WAN. <<
A 15 minute cycle is not real time. Have you looked at products that
are designed for streaming data? Stonebraker's Streambase, Kx Systems,
etc. are built to handle things like stock market feeds in real time.
Showing posts with label files. Show all posts
Showing posts with label files. Show all posts
Thursday, March 29, 2012
Tuesday, March 27, 2012
Creation of huge logfiles
HELP..
Since lats evening the SQL reporting services are generating huge logfiles
at dir ...\reporting services\Log Files\....
Because of limited space at our C-drive the whole server goes down. Please
does someone know how to configure reporting services to store the log files
at another drive and is it ok to delete the already present logfiles whitout
damaging the system'
ThanksI believe that is a known bug that has been fixed in SP2 or a hotfix from
last fall.
"Ronald de Rosa Spierings" wrote:
> HELP..
> Since lats evening the SQL reporting services are generating huge logfiles
> at dir ...\reporting services\Log Files\....
> Because of limited space at our C-drive the whole server goes down. Please
> does someone know how to configure reporting services to store the log files
> at another drive and is it ok to delete the already present logfiles whitout
> damaging the system'
> Thanks
>
Since lats evening the SQL reporting services are generating huge logfiles
at dir ...\reporting services\Log Files\....
Because of limited space at our C-drive the whole server goes down. Please
does someone know how to configure reporting services to store the log files
at another drive and is it ok to delete the already present logfiles whitout
damaging the system'
ThanksI believe that is a known bug that has been fixed in SP2 or a hotfix from
last fall.
"Ronald de Rosa Spierings" wrote:
> HELP..
> Since lats evening the SQL reporting services are generating huge logfiles
> at dir ...\reporting services\Log Files\....
> Because of limited space at our C-drive the whole server goes down. Please
> does someone know how to configure reporting services to store the log files
> at another drive and is it ok to delete the already present logfiles whitout
> damaging the system'
> Thanks
>
Sunday, March 25, 2012
Creating TXT files
Can I use SQL Server to create a txt file on the c drive. Can sql server do nay kind of file handling. Is there a command that i can use in my background job to automatically create a txt file that will show data from a particular table.
Never done it before .. Any ideas...
Help is appreciated.
ThanksIn the job step, choose type as OS command(CmdExec), in the command box, type:
osql -E -Q"select top 10 * from sysobjects" -o"c:\output.txt"
The output file is a txt format having the 10 rows in sysobjects table.|||or bcp, dts or echo|||I am using BCP and it works just fine. I get a txt file with tab seperated fields. Can i specify the character positions or lengths of each field so that all my fields line up at the same positions.
Help is appreciated.
I created a stored procedure with the below
declare @.filename varchar(50),
@.bcpcommand varchar(2000)
set @.filename = 'c:\report\media.txt'
print @.filename
set @.bcpcommand = 'bcp "select * from table" queryout "'+ @.filename -U -P'
exec master..xp_cmdshell @.bcpCommandsql
Never done it before .. Any ideas...
Help is appreciated.
ThanksIn the job step, choose type as OS command(CmdExec), in the command box, type:
osql -E -Q"select top 10 * from sysobjects" -o"c:\output.txt"
The output file is a txt format having the 10 rows in sysobjects table.|||or bcp, dts or echo|||I am using BCP and it works just fine. I get a txt file with tab seperated fields. Can i specify the character positions or lengths of each field so that all my fields line up at the same positions.
Help is appreciated.
I created a stored procedure with the below
declare @.filename varchar(50),
@.bcpcommand varchar(2000)
set @.filename = 'c:\report\media.txt'
print @.filename
set @.bcpcommand = 'bcp "select * from table" queryout "'+ @.filename -U -P'
exec master..xp_cmdshell @.bcpCommandsql
Thursday, March 22, 2012
creating text files using bcp
I am using BCP and it works just fine. I get a txt file with tab seperated fields. Can i specify the character positions or lengths of each field so that all my fields line up at the same positions.
Help is appreciated.
I created a stored procedure with the below
declare @.filename varchar(50),
@.bcpcommand varchar(2000)
set @.filename = 'c:\report\media.txt'
print @.filename
set @.bcpcommand = 'bcp "select * from table" queryout "'+ @.filename -U -P'
exec master..xp_cmdshell @.bcpCommandYou could format your select as needed.|||Can u elaborate more ...how do i format my sql to seperate the fields.
like i want one field on position 1-10 and the seond from position 11-40 and so on...
Thanks|||Originally posted by hp1000
Can u elaborate more ...how do i format my sql to seperate the fields.
like i want one field on position 1-10 and the seond from position 11-40 and so on...
Thanks
Just create one long field or as many as you need like this:
select field1+replicate(' ',25-datalength(field1)+...
from table|||I am using
set @.bcpcommand = 'bcp "select medium_name + replicate(' ',10-datalength(medium_name)) from database..report_tbl" queryout "'+ @.filename + '" -U sa -P -c'
I get Line 6: Incorrect syntax near '
How can i escape the single quotes
Please help
Thsi method should work for what i want to do .
Thanks|||Originally posted by snail
Just create one long field or as many as you need like this:
select field1+replicate(' ',25-datalength(field1)+...
from table
I am using the above but it does not work with NULL values . How do i make it to work with null values. Help is very much appreciated.
Thanks|||If you attempt to format your fields within BCP...QUERYOUT you may very quickly reach the limitation on the length of the command line (I don't remember what it is, but you can check.)
What you can do instead, is create a stored procedure where you'd format whatever and whichever way you want, and in your BCP specify a call to that procedure along with QUERYOUT.|||Here's how I do it - much easier to read and manage changes.
Much like a structure or type, I create a temporary table in a stored procedure (TABLE vars won't work, as BCP won;t be able to see them), using CHAR data types, one field for each output field. I have a user-defined function for zero-padding, and one for right-justifying (space padding). I populate that table with all my data, then do a BCP statement consisting of SELECT field1 + field2 + field3 etc.
This gives my the spacing I want, and that one create table at the beginning of the procedure allows me to easily control the number spaces each field gets.
I can post a proc if it would be easier to understand.
-b|||My table def looks like this (for an SAP feed):
CREATE TABLE ##sap_table(sales_organization CHAR(4) NOT NULL,
distribution_channel CHAR(2) NOT NULL,
division CHAR(2) NOT NULL,
filler_1 CHAR(2) NOT NULL,
sold_to CHAR(8) NOT NULL,
delivering_plant CHAR(4) NOT NULL,
profit_center CHAR(10) NOT NULL,
material_code CHAR(10) NOT NULL,
pricing_date CHAR(8) NOT NULL,
charge_type CHAR(4) NOT NULL,
order_reason CHAR(3) NOT NULL,
project_number CHAR(24) NOT NULL,
contract_number CHAR(10) NOT NULL,
purchase_order_number CHAR(12) NOT NULL,
internal_sales_reference CHAR(12) NOT NULL,
usage_type CHAR(3) NOT NULL,
usage_detail CHAR(60) NOT NULL,
requestor_name CHAR(40) NOT NULL,
user_number CHAR(10) NOT NULL,
[user_name] CHAR(40) NOT NULL,
comments CHAR(100) NULL,
quantity CHAR(15) NOT NULL,
unit_of_measure CHAR(3) NOT NULL,
currency CHAR(5) NOT NULL,
extended_amount CHAR(15) NOT NULL,
customer_cost_object CHAR(40) NOT NULL,
cco_flag CHAR(3) NOT NULL,
xy_flag CHAR(1) NOT NULL,
filler_2 CHAR(6) NOT NULL )|||If you want fixed width data, why not use a format file?|||Thanks for all ur feedback . I am using coalesce and datalength functions and it did the trick.
I create a view with the fields i want in the format i want and then do the select on the view with my bcp and it writes to the text file just fine.
Thanks a lot,
Help is appreciated.
I created a stored procedure with the below
declare @.filename varchar(50),
@.bcpcommand varchar(2000)
set @.filename = 'c:\report\media.txt'
print @.filename
set @.bcpcommand = 'bcp "select * from table" queryout "'+ @.filename -U -P'
exec master..xp_cmdshell @.bcpCommandYou could format your select as needed.|||Can u elaborate more ...how do i format my sql to seperate the fields.
like i want one field on position 1-10 and the seond from position 11-40 and so on...
Thanks|||Originally posted by hp1000
Can u elaborate more ...how do i format my sql to seperate the fields.
like i want one field on position 1-10 and the seond from position 11-40 and so on...
Thanks
Just create one long field or as many as you need like this:
select field1+replicate(' ',25-datalength(field1)+...
from table|||I am using
set @.bcpcommand = 'bcp "select medium_name + replicate(' ',10-datalength(medium_name)) from database..report_tbl" queryout "'+ @.filename + '" -U sa -P -c'
I get Line 6: Incorrect syntax near '
How can i escape the single quotes
Please help
Thsi method should work for what i want to do .
Thanks|||Originally posted by snail
Just create one long field or as many as you need like this:
select field1+replicate(' ',25-datalength(field1)+...
from table
I am using the above but it does not work with NULL values . How do i make it to work with null values. Help is very much appreciated.
Thanks|||If you attempt to format your fields within BCP...QUERYOUT you may very quickly reach the limitation on the length of the command line (I don't remember what it is, but you can check.)
What you can do instead, is create a stored procedure where you'd format whatever and whichever way you want, and in your BCP specify a call to that procedure along with QUERYOUT.|||Here's how I do it - much easier to read and manage changes.
Much like a structure or type, I create a temporary table in a stored procedure (TABLE vars won't work, as BCP won;t be able to see them), using CHAR data types, one field for each output field. I have a user-defined function for zero-padding, and one for right-justifying (space padding). I populate that table with all my data, then do a BCP statement consisting of SELECT field1 + field2 + field3 etc.
This gives my the spacing I want, and that one create table at the beginning of the procedure allows me to easily control the number spaces each field gets.
I can post a proc if it would be easier to understand.
-b|||My table def looks like this (for an SAP feed):
CREATE TABLE ##sap_table(sales_organization CHAR(4) NOT NULL,
distribution_channel CHAR(2) NOT NULL,
division CHAR(2) NOT NULL,
filler_1 CHAR(2) NOT NULL,
sold_to CHAR(8) NOT NULL,
delivering_plant CHAR(4) NOT NULL,
profit_center CHAR(10) NOT NULL,
material_code CHAR(10) NOT NULL,
pricing_date CHAR(8) NOT NULL,
charge_type CHAR(4) NOT NULL,
order_reason CHAR(3) NOT NULL,
project_number CHAR(24) NOT NULL,
contract_number CHAR(10) NOT NULL,
purchase_order_number CHAR(12) NOT NULL,
internal_sales_reference CHAR(12) NOT NULL,
usage_type CHAR(3) NOT NULL,
usage_detail CHAR(60) NOT NULL,
requestor_name CHAR(40) NOT NULL,
user_number CHAR(10) NOT NULL,
[user_name] CHAR(40) NOT NULL,
comments CHAR(100) NULL,
quantity CHAR(15) NOT NULL,
unit_of_measure CHAR(3) NOT NULL,
currency CHAR(5) NOT NULL,
extended_amount CHAR(15) NOT NULL,
customer_cost_object CHAR(40) NOT NULL,
cco_flag CHAR(3) NOT NULL,
xy_flag CHAR(1) NOT NULL,
filler_2 CHAR(6) NOT NULL )|||If you want fixed width data, why not use a format file?|||Thanks for all ur feedback . I am using coalesce and datalength functions and it did the trick.
I create a view with the fields i want in the format i want and then do the select on the view with my bcp and it writes to the text file just fine.
Thanks a lot,
Thursday, March 8, 2012
Creating RDL files at runtime
I created a CustomerReport.rdl from VS.NET. I previewed the report in
the SQLServer Report Manager and it shows the report. that is perfect.
Now what i did is, I opened the CustomerReport.rdl in Notedpad.
Obviously it shows me the XML format of the report design. I copied
all XML content of the report (Ctrl+A/paste) and copied into a new
notepad window and saved the new file as test.rdl.
Now when I open the test.rdl report from Report Manager, I see that
Iam asked to enter the SQLServer authentication (sa/password). Only
after I do the SQLServer authentication, Iam able to view the report
in the Report Manager. Why does it ask me so.
The thing is Iam playing with the rdl because I need to create reports
on the fly (at runtime) in my project requirement. Please share your
experiences if you've done something simialar.
thanks,
Anand SagarHello,
What kind of datasource are you using ? shared or private to the report ?
In Report Designer or Report Manager, connections to data sources are
managed by ReportDesigner or ReportingServices and credentials are stored
securily in Repository for ReportingServices. Credentials are not part of
RDL and you should not find then in Notepad. If you have a shared Datasource
you can configure it with ReportManager and reference it in your RDL, so you
will not have to authenticate again with Test.rdl
HTH
Jerome Berthaud (MCSD)
http://www.winsight.fr
"Anand Sagar" <anandsagar@.gmail.com> wrote in message
news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> I created a CustomerReport.rdl from VS.NET. I previewed the report in
> the SQLServer Report Manager and it shows the report. that is perfect.
> Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> Obviously it shows me the XML format of the report design. I copied
> all XML content of the report (Ctrl+A/paste) and copied into a new
> notepad window and saved the new file as test.rdl.
>
> Now when I open the test.rdl report from Report Manager, I see that
> Iam asked to enter the SQLServer authentication (sa/password). Only
> after I do the SQLServer authentication, Iam able to view the report
> in the Report Manager. Why does it ask me so.
>
> The thing is Iam playing with the rdl because I need to create reports
> on the fly (at runtime) in my project requirement. Please share your
> experiences if you've done something simialar.
> thanks,
> Anand Sagar|||Hi,
You can test it live on internet and change the parameter
ProductFamily=Food in ProductFamily=Food. Here you will find 4 ways to
start a MS Reporting Services Report as enduser:
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&ProductFamily=Food
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&rs%3aFormat=HTML4.0&ProductFamily=Food&rc%3aToolbar=True&rc%3aJavaScript=True&rc%3aLinkTarget=_top&rc%3aArea=Toolbar
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&ProductFamily=Food&rs%3aFormat=HTML4.0&rc%3aToolbar=True&rc%3aJavaScript=True&rc%3aLinkTarget=_top&rc%3aArea=Report
Any other parameter can be used in an action from MS As 2000. For more
info: www.reportportal.com / www.gmsbv.nl
Regards,
Marco
www.gmsbv.nl - your partner for MS Analyses & Reporting Services in
Europe !
"Jerome BERTHAUD" <jerome.berthaud@.winsight.fr> wrote in message news:<uoKmx5IfEHA.3428@.TK2MSFTNGP11.phx.gbl>...
> Hello,
> What kind of datasource are you using ? shared or private to the report ?
> In Report Designer or Report Manager, connections to data sources are
> managed by ReportDesigner or ReportingServices and credentials are stored
> securily in Repository for ReportingServices. Credentials are not part of
> RDL and you should not find then in Notepad. If you have a shared Datasource
> you can configure it with ReportManager and reference it in your RDL, so you
> will not have to authenticate again with Test.rdl
> HTH
> Jerome Berthaud (MCSD)
> http://www.winsight.fr
>
> "Anand Sagar" <anandsagar@.gmail.com> wrote in message
> news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> > I created a CustomerReport.rdl from VS.NET. I previewed the report in
> > the SQLServer Report Manager and it shows the report. that is perfect.
> >
> > Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> > Obviously it shows me the XML format of the report design. I copied
> > all XML content of the report (Ctrl+A/paste) and copied into a new
> > notepad window and saved the new file as test.rdl.
> >
> >
> > Now when I open the test.rdl report from Report Manager, I see that
> > Iam asked to enter the SQLServer authentication (sa/password). Only
> > after I do the SQLServer authentication, Iam able to view the report
> > in the Report Manager. Why does it ask me so.
> >
> >
> > The thing is Iam playing with the rdl because I need to create reports
> > on the fly (at runtime) in my project requirement. Please share your
> > experiences if you've done something simialar.
> >
> > thanks,
> > Anand Sagar|||One additional comment to Jerome's posting: If you use the managed SQL
provider ("SQL") in the data source, you can use IntegratedSecurity for
testing purposes (and therefore no need for credentials):
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>data source=(local); ... </ConnectString>
</ConnectionProperties>
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jerome BERTHAUD" <jerome.berthaud@.winsight.fr> wrote in message
news:uoKmx5IfEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Hello,
> What kind of datasource are you using ? shared or private to the report ?
> In Report Designer or Report Manager, connections to data sources are
> managed by ReportDesigner or ReportingServices and credentials are stored
> securily in Repository for ReportingServices. Credentials are not part of
> RDL and you should not find then in Notepad. If you have a shared
Datasource
> you can configure it with ReportManager and reference it in your RDL, so
you
> will not have to authenticate again with Test.rdl
> HTH
> Jerome Berthaud (MCSD)
> http://www.winsight.fr
>
> "Anand Sagar" <anandsagar@.gmail.com> wrote in message
> news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> > I created a CustomerReport.rdl from VS.NET. I previewed the report in
> > the SQLServer Report Manager and it shows the report. that is perfect.
> >
> > Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> > Obviously it shows me the XML format of the report design. I copied
> > all XML content of the report (Ctrl+A/paste) and copied into a new
> > notepad window and saved the new file as test.rdl.
> >
> >
> > Now when I open the test.rdl report from Report Manager, I see that
> > Iam asked to enter the SQLServer authentication (sa/password). Only
> > after I do the SQLServer authentication, Iam able to view the report
> > in the Report Manager. Why does it ask me so.
> >
> >
> > The thing is Iam playing with the rdl because I need to create reports
> > on the fly (at runtime) in my project requirement. Please share your
> > experiences if you've done something simialar.
> >
> > thanks,
> > Anand Sagar
>
the SQLServer Report Manager and it shows the report. that is perfect.
Now what i did is, I opened the CustomerReport.rdl in Notedpad.
Obviously it shows me the XML format of the report design. I copied
all XML content of the report (Ctrl+A/paste) and copied into a new
notepad window and saved the new file as test.rdl.
Now when I open the test.rdl report from Report Manager, I see that
Iam asked to enter the SQLServer authentication (sa/password). Only
after I do the SQLServer authentication, Iam able to view the report
in the Report Manager. Why does it ask me so.
The thing is Iam playing with the rdl because I need to create reports
on the fly (at runtime) in my project requirement. Please share your
experiences if you've done something simialar.
thanks,
Anand SagarHello,
What kind of datasource are you using ? shared or private to the report ?
In Report Designer or Report Manager, connections to data sources are
managed by ReportDesigner or ReportingServices and credentials are stored
securily in Repository for ReportingServices. Credentials are not part of
RDL and you should not find then in Notepad. If you have a shared Datasource
you can configure it with ReportManager and reference it in your RDL, so you
will not have to authenticate again with Test.rdl
HTH
Jerome Berthaud (MCSD)
http://www.winsight.fr
"Anand Sagar" <anandsagar@.gmail.com> wrote in message
news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> I created a CustomerReport.rdl from VS.NET. I previewed the report in
> the SQLServer Report Manager and it shows the report. that is perfect.
> Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> Obviously it shows me the XML format of the report design. I copied
> all XML content of the report (Ctrl+A/paste) and copied into a new
> notepad window and saved the new file as test.rdl.
>
> Now when I open the test.rdl report from Report Manager, I see that
> Iam asked to enter the SQLServer authentication (sa/password). Only
> after I do the SQLServer authentication, Iam able to view the report
> in the Report Manager. Why does it ask me so.
>
> The thing is Iam playing with the rdl because I need to create reports
> on the fly (at runtime) in my project requirement. Please share your
> experiences if you've done something simialar.
> thanks,
> Anand Sagar|||Hi,
You can test it live on internet and change the parameter
ProductFamily=Food in ProductFamily=Food. Here you will find 4 ways to
start a MS Reporting Services Report as enduser:
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&ProductFamily=Food
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&rs%3aFormat=HTML4.0&ProductFamily=Food&rc%3aToolbar=True&rc%3aJavaScript=True&rc%3aLinkTarget=_top&rc%3aArea=Toolbar
http://128.171.208.112/ReportServer?%2fFoodmart+Sales&ProductFamily=Food&rs%3aFormat=HTML4.0&rc%3aToolbar=True&rc%3aJavaScript=True&rc%3aLinkTarget=_top&rc%3aArea=Report
Any other parameter can be used in an action from MS As 2000. For more
info: www.reportportal.com / www.gmsbv.nl
Regards,
Marco
www.gmsbv.nl - your partner for MS Analyses & Reporting Services in
Europe !
"Jerome BERTHAUD" <jerome.berthaud@.winsight.fr> wrote in message news:<uoKmx5IfEHA.3428@.TK2MSFTNGP11.phx.gbl>...
> Hello,
> What kind of datasource are you using ? shared or private to the report ?
> In Report Designer or Report Manager, connections to data sources are
> managed by ReportDesigner or ReportingServices and credentials are stored
> securily in Repository for ReportingServices. Credentials are not part of
> RDL and you should not find then in Notepad. If you have a shared Datasource
> you can configure it with ReportManager and reference it in your RDL, so you
> will not have to authenticate again with Test.rdl
> HTH
> Jerome Berthaud (MCSD)
> http://www.winsight.fr
>
> "Anand Sagar" <anandsagar@.gmail.com> wrote in message
> news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> > I created a CustomerReport.rdl from VS.NET. I previewed the report in
> > the SQLServer Report Manager and it shows the report. that is perfect.
> >
> > Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> > Obviously it shows me the XML format of the report design. I copied
> > all XML content of the report (Ctrl+A/paste) and copied into a new
> > notepad window and saved the new file as test.rdl.
> >
> >
> > Now when I open the test.rdl report from Report Manager, I see that
> > Iam asked to enter the SQLServer authentication (sa/password). Only
> > after I do the SQLServer authentication, Iam able to view the report
> > in the Report Manager. Why does it ask me so.
> >
> >
> > The thing is Iam playing with the rdl because I need to create reports
> > on the fly (at runtime) in my project requirement. Please share your
> > experiences if you've done something simialar.
> >
> > thanks,
> > Anand Sagar|||One additional comment to Jerome's posting: If you use the managed SQL
provider ("SQL") in the data source, you can use IntegratedSecurity for
testing purposes (and therefore no need for credentials):
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<IntegratedSecurity>true</IntegratedSecurity>
<ConnectString>data source=(local); ... </ConnectString>
</ConnectionProperties>
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jerome BERTHAUD" <jerome.berthaud@.winsight.fr> wrote in message
news:uoKmx5IfEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Hello,
> What kind of datasource are you using ? shared or private to the report ?
> In Report Designer or Report Manager, connections to data sources are
> managed by ReportDesigner or ReportingServices and credentials are stored
> securily in Repository for ReportingServices. Credentials are not part of
> RDL and you should not find then in Notepad. If you have a shared
Datasource
> you can configure it with ReportManager and reference it in your RDL, so
you
> will not have to authenticate again with Test.rdl
> HTH
> Jerome Berthaud (MCSD)
> http://www.winsight.fr
>
> "Anand Sagar" <anandsagar@.gmail.com> wrote in message
> news:3f76a771.0408070018.29eb85ae@.posting.google.com...
> > I created a CustomerReport.rdl from VS.NET. I previewed the report in
> > the SQLServer Report Manager and it shows the report. that is perfect.
> >
> > Now what i did is, I opened the CustomerReport.rdl in Notedpad.
> > Obviously it shows me the XML format of the report design. I copied
> > all XML content of the report (Ctrl+A/paste) and copied into a new
> > notepad window and saved the new file as test.rdl.
> >
> >
> > Now when I open the test.rdl report from Report Manager, I see that
> > Iam asked to enter the SQLServer authentication (sa/password). Only
> > after I do the SQLServer authentication, Iam able to view the report
> > in the Report Manager. Why does it ask me so.
> >
> >
> > The thing is Iam playing with the rdl because I need to create reports
> > on the fly (at runtime) in my project requirement. Please share your
> > experiences if you've done something simialar.
> >
> > thanks,
> > Anand Sagar
>
Creating RDL Files - Software Requirements
I have a copy of SQL Server Express running, but am not sure how to create
reports. Does this require a full/regular copy of Visual Studio or is there
an 'express' (read:free) solution to create reports.
Thanks,
MatthewThere is another version called SQL Server 2005 Express Edition with
Advanced Services SP1 which comes with everything you need to develop
reports. Note that the data for your reports need to be local (in your SQL
Server Express database is what I believe that means).
Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>I have a copy of SQL Server Express running, but am not sure how to create
> reports. Does this require a full/regular copy of Visual Studio or is
> there
> an 'express' (read:free) solution to create reports.
> Thanks,
> Matthew|||yes, I think. I have that. Here is a select @.@.version to clarify...
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
Service Pack 1)
I have seen references to Business Intelligence Designer. I have the
virtual directory for reports. I can go out to it and there is an option to
upload RDL files; however, I am not sure what tool is necessary to create RDL
files. I know Visual Studio (for pay ones) can do it, but I don't know if
there is a free version. I don't see anything in the SQL MGMT tool or in the
Start Menu which allow me to create reports. I do see the Report SErver
configuration tool... and it shows it to be setup correctly.
Thanks!
Matthew
"Bruce L-C [MVP]" wrote:
> There is another version called SQL Server 2005 Express Edition with
> Advanced Services SP1 which comes with everything you need to develop
> reports. Note that the data for your reports need to be local (in your SQL
> Server Express database is what I believe that means).
> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
> >I have a copy of SQL Server Express running, but am not sure how to create
> > reports. Does this require a full/regular copy of Visual Studio or is
> > there
> > an 'express' (read:free) solution to create reports.
> > Thanks,
> > Matthew
>
>|||I don't know about the setup but it shouldn't be any difference. You need to
install the Business Intelligence tools. It will install a version of VS to
host the report designer. Run setup and see about a choice to install. Once
installed you should be have something in your program files called SQL
Server Business Intelligence Development Studio.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:81305E18-ABEF-449E-AA63-76CEF9583387@.microsoft.com...
> yes, I think. I have that. Here is a select @.@.version to clarify...
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
> Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation
> Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
> Service Pack 1)
> I have seen references to Business Intelligence Designer. I have the
> virtual directory for reports. I can go out to it and there is an option
> to
> upload RDL files; however, I am not sure what tool is necessary to create
> RDL
> files. I know Visual Studio (for pay ones) can do it, but I don't know if
> there is a free version. I don't see anything in the SQL MGMT tool or in
> the
> Start Menu which allow me to create reports. I do see the Report SErver
> configuration tool... and it shows it to be setup correctly.
> Thanks!
> Matthew
>
> "Bruce L-C [MVP]" wrote:
>> There is another version called SQL Server 2005 Express Edition with
>> Advanced Services SP1 which comes with everything you need to develop
>> reports. Note that the data for your reports need to be local (in your
>> SQL
>> Server Express database is what I believe that means).
>> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in
>> message
>> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>> >I have a copy of SQL Server Express running, but am not sure how to
>> >create
>> > reports. Does this require a full/regular copy of Visual Studio or is
>> > there
>> > an 'express' (read:free) solution to create reports.
>> > Thanks,
>> > Matthew
>>
reports. Does this require a full/regular copy of Visual Studio or is there
an 'express' (read:free) solution to create reports.
Thanks,
MatthewThere is another version called SQL Server 2005 Express Edition with
Advanced Services SP1 which comes with everything you need to develop
reports. Note that the data for your reports need to be local (in your SQL
Server Express database is what I believe that means).
Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>I have a copy of SQL Server Express running, but am not sure how to create
> reports. Does this require a full/regular copy of Visual Studio or is
> there
> an 'express' (read:free) solution to create reports.
> Thanks,
> Matthew|||yes, I think. I have that. Here is a select @.@.version to clarify...
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
Service Pack 1)
I have seen references to Business Intelligence Designer. I have the
virtual directory for reports. I can go out to it and there is an option to
upload RDL files; however, I am not sure what tool is necessary to create RDL
files. I know Visual Studio (for pay ones) can do it, but I don't know if
there is a free version. I don't see anything in the SQL MGMT tool or in the
Start Menu which allow me to create reports. I do see the Report SErver
configuration tool... and it shows it to be setup correctly.
Thanks!
Matthew
"Bruce L-C [MVP]" wrote:
> There is another version called SQL Server 2005 Express Edition with
> Advanced Services SP1 which comes with everything you need to develop
> reports. Note that the data for your reports need to be local (in your SQL
> Server Express database is what I believe that means).
> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
> >I have a copy of SQL Server Express running, but am not sure how to create
> > reports. Does this require a full/regular copy of Visual Studio or is
> > there
> > an 'express' (read:free) solution to create reports.
> > Thanks,
> > Matthew
>
>|||I don't know about the setup but it shouldn't be any difference. You need to
install the Business Intelligence tools. It will install a version of VS to
host the report designer. Run setup and see about a choice to install. Once
installed you should be have something in your program files called SQL
Server Business Intelligence Development Studio.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:81305E18-ABEF-449E-AA63-76CEF9583387@.microsoft.com...
> yes, I think. I have that. Here is a select @.@.version to clarify...
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
> Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation
> Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
> Service Pack 1)
> I have seen references to Business Intelligence Designer. I have the
> virtual directory for reports. I can go out to it and there is an option
> to
> upload RDL files; however, I am not sure what tool is necessary to create
> RDL
> files. I know Visual Studio (for pay ones) can do it, but I don't know if
> there is a free version. I don't see anything in the SQL MGMT tool or in
> the
> Start Menu which allow me to create reports. I do see the Report SErver
> configuration tool... and it shows it to be setup correctly.
> Thanks!
> Matthew
>
> "Bruce L-C [MVP]" wrote:
>> There is another version called SQL Server 2005 Express Edition with
>> Advanced Services SP1 which comes with everything you need to develop
>> reports. Note that the data for your reports need to be local (in your
>> SQL
>> Server Express database is what I believe that means).
>> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in
>> message
>> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>> >I have a copy of SQL Server Express running, but am not sure how to
>> >create
>> > reports. Does this require a full/regular copy of Visual Studio or is
>> > there
>> > an 'express' (read:free) solution to create reports.
>> > Thanks,
>> > Matthew
>>
Saturday, February 25, 2012
Creating Multiple Triggers is same sql script
I'm trying to use Query Analyzer to create several triggers on different files in the same sql script file. It appears to only allow me to create one trigger at a time in Query Analyzer. How do you separate multiple create trigger statements? Here what I'm trying to do:
CREATE TRIGGER PO_BOL_DELETE ON dbo.PO_BOL
FOR DELETE
AS
INSERT into PO_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
CREATE TRIGGER RECEIPT_DELETE ON dbo.receipt
FOR DELETE
AS
INSERT into receipt_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GOWell that's the way to do it...(except for the SELECT * bit)
http://weblogs.sqlteam.com/brettk/archive/2004/04/22/1272.aspx
Are you getting an error?
select * is dangerous btw.|||It stops at the second create trigger and indicates create trigger not valid. Should the syntax I have work?|||works for me...
USE Northwind
GO
CREATE TABLE PO_BOL(Col1 int)
CREATE TABLE receipt(Col1 int)
GO
CREATE TRIGGER PO_BOL_DELETE ON dbo.PO_BOL
FOR DELETE
AS
INSERT into PO_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
CREATE TRIGGER RECEIPT_DELETE ON dbo.receipt
FOR DELETE
AS
INSERT into receipt_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
DROP TABLE PO_BOL
DROP TABLE receipt
GO
Couple of things...lose SELECT *, Make sure you supply the column list for the insert...other than that it all looks good|||Thanks for the help! I got it to work..... Thanks again.
Another question:
I'm using VB to open a direct connection to SQL SERVER 2000. The AnsiNPW=off in the connection doesn't work. Any ideas? I had to create my tables in SQL server with SET ANSI_PADDING OFF to get the spaces trimmed.
Any thoughts?
JGS|||I'll tell anone who'll listen that I've forgot all my VB...otherwise they might make me build interfaces...
Just talking about it and I feel all dirty...
How is the table defined?
char or varchar??|||Your on to it! The fields are Varchar. I tried changing the fields to Char but AnsiNPW still doesn't seem to do anything in the connection string. Have you heard of any bug that AnsiNPW doesn't work?
CREATE TRIGGER PO_BOL_DELETE ON dbo.PO_BOL
FOR DELETE
AS
INSERT into PO_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
CREATE TRIGGER RECEIPT_DELETE ON dbo.receipt
FOR DELETE
AS
INSERT into receipt_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GOWell that's the way to do it...(except for the SELECT * bit)
http://weblogs.sqlteam.com/brettk/archive/2004/04/22/1272.aspx
Are you getting an error?
select * is dangerous btw.|||It stops at the second create trigger and indicates create trigger not valid. Should the syntax I have work?|||works for me...
USE Northwind
GO
CREATE TABLE PO_BOL(Col1 int)
CREATE TABLE receipt(Col1 int)
GO
CREATE TRIGGER PO_BOL_DELETE ON dbo.PO_BOL
FOR DELETE
AS
INSERT into PO_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
CREATE TRIGGER RECEIPT_DELETE ON dbo.receipt
FOR DELETE
AS
INSERT into receipt_Back
SELECT *, host_name(), suser_name(), getdate()
FROM deleted
GO
DROP TABLE PO_BOL
DROP TABLE receipt
GO
Couple of things...lose SELECT *, Make sure you supply the column list for the insert...other than that it all looks good|||Thanks for the help! I got it to work..... Thanks again.
Another question:
I'm using VB to open a direct connection to SQL SERVER 2000. The AnsiNPW=off in the connection doesn't work. Any ideas? I had to create my tables in SQL server with SET ANSI_PADDING OFF to get the spaces trimmed.
Any thoughts?
JGS|||I'll tell anone who'll listen that I've forgot all my VB...otherwise they might make me build interfaces...
Just talking about it and I feel all dirty...
How is the table defined?
char or varchar??|||Your on to it! The fields are Varchar. I tried changing the fields to Char but AnsiNPW still doesn't seem to do anything in the connection string. Have you heard of any bug that AnsiNPW doesn't work?
Friday, February 17, 2012
Creating File
Is there a corresponding utility in SQL Server like
UTIL_FILE package in ORacle which can be used to create
text files from Stored procs...Thanks in advance for helpYes, try with
execute xp_cmdshell 'echo blahblahblah > c:\test.txt'
--
Regards,
Tomislav Kralj
tomislav.kralj1@.zg.tel.hr
"Kris" <maran123us@.hotmail.com> wrote in message
news:00a701c34ce1$e1e994c0$a001280a@.phx.gbl...
> Is there a corresponding utility in SQL Server like
> UTIL_FILE package in ORacle which can be used to create
> text files from Stored procs...Thanks in advance for help
UTIL_FILE package in ORacle which can be used to create
text files from Stored procs...Thanks in advance for helpYes, try with
execute xp_cmdshell 'echo blahblahblah > c:\test.txt'
--
Regards,
Tomislav Kralj
tomislav.kralj1@.zg.tel.hr
"Kris" <maran123us@.hotmail.com> wrote in message
news:00a701c34ce1$e1e994c0$a001280a@.phx.gbl...
> Is there a corresponding utility in SQL Server like
> UTIL_FILE package in ORacle which can be used to create
> text files from Stored procs...Thanks in advance for help
Tuesday, February 14, 2012
creating db from mdf and ldf files
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak fi
le. Can I create the database in EM using the two files or is there a script
I can run in QA? Thank youCheck out sp_attach_db in the BOL.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted
me to have the ldf and mdf files on the same drive. So then I used QA and I
got it to work. I started off using sp_attach_db but then I read about using
CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again fo
r your help.
a DB and in the past I have always created a DB by restoring from a .bak fi
le. Can I create the database in EM using the two files or is there a script
I can run in QA? Thank youCheck out sp_attach_db in the BOL.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there
a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted
me to have the ldf and mdf files on the same drive. So then I used QA and I
got it to work. I started off using sp_attach_db but then I read about using
CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again fo
r your help.
creating db from mdf and ldf files
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create a DB and in the past I have always created a DB by restoring from a .bak file. Can I create the database in EM using the two files or is there a script I can run in QA? Thank you
Check out sp_attach_db in the BOL.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.
Check out sp_attach_db in the BOL.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
..bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.
|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help
and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.
creating db from mdf and ldf files
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create a DB and in the past I have always created a DB by restoring from a .bak file. Can I create the database in EM using the two files or is there a script I can run in QA? Thank you.Check out sp_attach_db in the BOL.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
Hi, I have been sent a .mdf and a .ldf file and I need to use them to create
a DB and in the past I have always created a DB by restoring from a .bak
file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Hahnja,
You can attach the mdf and ldf file using sp_attach_db.Refer BooksOnLine for
details.
--
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||you can do both in EM and QA.
in EM first save the files at the desired location, open EM, right click
Databases folder on left pane, click on All Tasks, Attach Database ... then
follow the ziward.
"hahnja peters" <anonymous@.discussions.microsoft.com> wrote in message
news:216ED595-018E-4FEE-9E9D-BA91AA3C7634@.microsoft.com...
> Hi, I have been sent a .mdf and a .ldf file and I need to use them to
create a DB and in the past I have always created a DB by restoring from a
.bak file. Can I create the database in EM using the two files or is there a
script I can run in QA? Thank you.|||Thank you to everyone for your help. I tried to use EM first, but it wanted me to have the ldf and mdf files on the same drive. So then I used QA and I got it to work. I started off using sp_attach_db but then I read about using CREATE DATABASE in MS Help and using FOR ATTACH with it - and that worked perfectly. Thank you again for your help.
Subscribe to:
Posts (Atom)