Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Sunday, March 25, 2012

Can I export a report as PDF files within a DOS batch file?

Hi,
Is there any command line tool that helps me to export a report into a PDF
file?
I need to do that within a batch file. I am trying to avoid C# coding to do
that.
Any help would be appreciated,
Maxyes, rs.exe should do what you are trying to accomplish.
--
Shaun Beane, MCT, MCDST, MCDBA
dbageek.blogspot.com
"Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
news:eU8dFLcXGHA.3724@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Is there any command line tool that helps me to export a report into a PDF
> file?
> I need to do that within a batch file. I am trying to avoid C# coding to
> do that.
> Any help would be appreciated,
> Max
>|||Great! Do you know any link to a sample that shows me how to export and save
the report into a PDF file?
"Shaun Beane" <shaun.beane@.gmail.nojunk.com> wrote in message
news:OhIWIZcXGHA.4148@.TK2MSFTNGP03.phx.gbl...
> yes, rs.exe should do what you are trying to accomplish.
> --
> Shaun Beane, MCT, MCDST, MCDBA
> dbageek.blogspot.com
> "Maxwell2006" <alanalan@.newsgroup.nospam> wrote in message
> news:eU8dFLcXGHA.3724@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> Is there any command line tool that helps me to export a report into a
>> PDF file?
>> I need to do that within a batch file. I am trying to avoid C# coding to
>> do that.
>> Any help would be appreciated,
>> Max
>>
>|||Hi Maxwell,
You can use the RS.exe Utility to export the report to the PDF file.
RS.exe will read a script file which should be written by VB.NET.
Here is a article posted some sample code, you may try to refer.
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/brow
se_frm/thread/e608c8fecc95d08/8a2dcc6ca82bf3fc?tvc=1&q=RS+utility+export+pdf
&hl=zh-CN#8a2dcc6ca82bf3fc
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Can I edit SDF files without full SQL Server license?

I'm trying to open an SDF file. After many searches on the net, it appears that there are two ways to do this:

Open the file in VS 2005 Open the file in SQL Server Management StudioI don't have, and don't plan to purchase, a license to full SQL Server 2005. I do have Visual Studio 2005 Pro. When I open an SDF file in Visual Studio, I get the following (oh so informative) error:

The operation could not be completed. Unspecified error

Since I don't have full SQL server, I downloaded SQL Server Management Studio Express. There's one major problem: the Server type combo box is disabled in the "Connect to Server" dialog. Try as I might, I can find no mention anywhere as to why this is the case. I'm guessing that functionality isn't supported in the Express version of the tool, but as far as I can tell, nobody thinks it might perhaps be reasonable to document why this combo box is disabled. It certainly doesn't show up in the document that shows up when I click the help button on this dialog.

Could somebody at Microsoft please tell me if it is even possible to edit these files without buying a full SQL Server license? I'm trying to use SQL Server Compact Edition to replace legacy code that uses an MDB file (via ADO) for a desktop application. From everything I have read, this is the officially recommended thing to do. But if I now have to buy a full SQL Server lincense to accomplish what used to be a simple double click on an MDB file, then there's something seriously wrong.

It turns out that my problem was the fact that I didn't have Service Pack 2 installed for SQL Server Management Studio Express, although installing that (along with making sure everything else on my system was up-to-date via Microsoft Update) didn't solve the Visual Studio error. I do have SP 1 installed for VS 2005.
sql

Thursday, March 22, 2012

Can I delete BAK and TRN files?

I have an implementation of SQL Server 2000 with a job to
backup a customer database. The backup works file, but
none of the old backup and transaction files are removed
after each backup, so it is consuming a lot of disk
space. I have BAK and TRN files dating back 3 months.
Before I deleted any of the old files, I wanted to make
sure I am okay to do so. Does anyone know of a problem
with manually most of these files, leaving only the most
recent week or two of backups?
Thanks,
Jason... and if the backups are created by a SQL Server maintenance plan, you can
modify it to have the files older than a specified period removed. It's on
the Complete Backup and Transaction Log Backup tabs respectively, Remove
files older than item.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:0b4a01c3d932$260faea0$a001280a@.phx.gbl...
> As far as whether deleting the old backup files will do
> any damage to the backup setup (e.g. your maintanance
> plans) is concerned, there is no problem. But you do need
> to make sure that if you ever need them, you can get them
> back (e.g. from your tape backup facility).
> Linchi
> >--Original Message--
> >I have an implementation of SQL Server 2000 with a job to
> >backup a customer database. The backup works file, but
> >none of the old backup and transaction files are removed
> >after each backup, so it is consuming a lot of disk
> >space. I have BAK and TRN files dating back 3 months.
> >Before I deleted any of the old files, I wanted to make
> >sure I am okay to do so. Does anyone know of a problem
> >with manually most of these files, leaving only the most
> >recent week or two of backups?
> >
> >Thanks,
> >
> >Jason
> >.
> >sql

Can I delete BAK and TRN files?

I have an implementation of SQL Server 2000 with a job to
backup a customer database. The backup works file, but
none of the old backup and transaction files are removed
after each backup, so it is consuming a lot of disk
space. I have BAK and TRN files dating back 3 months.
Before I deleted any of the old files, I wanted to make
sure I am okay to do so. Does anyone know of a problem
with manually most of these files, leaving only the most
recent week or two of backups?
Thanks,
JasonAs far as whether deleting the old backup files will do
any damage to the backup setup (e.g. your maintanance
plans) is concerned, there is no problem. But you do need
to make sure that if you ever need them, you can get them
back (e.g. from your tape backup facility).
Linchi
quote:

>--Original Message--
>I have an implementation of SQL Server 2000 with a job to
>backup a customer database. The backup works file, but
>none of the old backup and transaction files are removed
>after each backup, so it is consuming a lot of disk
>space. I have BAK and TRN files dating back 3 months.
>Before I deleted any of the old files, I wanted to make
>sure I am okay to do so. Does anyone know of a problem
>with manually most of these files, leaving only the most
>recent week or two of backups?
>Thanks,
>Jason
>.
>
|||... and if the backups are created by a SQL Server maintenance plan, you ca
n
modify it to have the files older than a specified period removed. It's on
the Complete Backup and Transaction Log Backup tabs respectively, Remove
files older than item.
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:0b4a01c3d932$260faea0$a001280a@.phx.gbl...[QUOTE]
> As far as whether deleting the old backup files will do
> any damage to the backup setup (e.g. your maintanance
> plans) is concerned, there is no problem. But you do need
> to make sure that if you ever need them, you can get them
> back (e.g. from your tape backup facility).
> Linchi
>

Can I delete a DB and add it back under same name?

Are there any "cleaning" issues I should know about if I delete a database
in 2005, and then add it back under the same name with a newer .BAK file?
I know how to delete, and how to import a backup, but I don't know if there
are suggested cleaning steps between. Anything I should do?drop database <db>
should delete it from sql catalog and remove the data file from disk.
--
-oj
"HK" <replywithingroup@.notreal.com> wrote in message
news:YBFWf.19819$%d.12971@.tornado.socal.rr.com...
> Are there any "cleaning" issues I should know about if I delete a database
> in 2005, and then add it back under the same name with a newer .BAK file?
> I know how to delete, and how to import a backup, but I don't know if
> there
> are suggested cleaning steps between. Anything I should do?
>|||So no extra cleanup steps needed? I imagine there COULD be weird things
left behind.
"oj" <nospam_ojngo@.home.com> wrote in message
news:u%23lFZ15UGHA.6048@.TK2MSFTNGP11.phx.gbl...
> drop database <db>
> should delete it from sql catalog and remove the data file from disk.
> --
> -oj
>
> "HK" <replywithingroup@.notreal.com> wrote in message
> news:YBFWf.19819$%d.12971@.tornado.socal.rr.com...
> > Are there any "cleaning" issues I should know about if I delete a
database
> > in 2005, and then add it back under the same name with a newer .BAK
file?
> > I know how to delete, and how to import a backup, but I don't know if
> > there
> > are suggested cleaning steps between. Anything I should do?
> >
> >
>|||Just drop the database it will delete related files.
If database is offline only in that case you have to manually delete
files.
Then restore databse.
Regards
Amish Shah|||The only thing I can think of is backup history in the msdb database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"HK" <replywithingroup@.notreal.com> wrote in message
news:0OHWf.17622$w86.15212@.tornado.socal.rr.com...
> So no extra cleanup steps needed? I imagine there COULD be weird things
> left behind.
>
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:u%23lFZ15UGHA.6048@.TK2MSFTNGP11.phx.gbl...
>> drop database <db>
>> should delete it from sql catalog and remove the data file from disk.
>> --
>> -oj
>>
>> "HK" <replywithingroup@.notreal.com> wrote in message
>> news:YBFWf.19819$%d.12971@.tornado.socal.rr.com...
>> > Are there any "cleaning" issues I should know about if I delete a
> database
>> > in 2005, and then add it back under the same name with a newer .BAK
> file?
>> > I know how to delete, and how to import a backup, but I don't know if
>> > there
>> > are suggested cleaning steps between. Anything I should do?
>> >
>> >
>>
>|||when you drop a database through EM it will ask to delete history about
backup and restore.
If you drop database using TSQL you will have to delete history
maually.
Regards
Amish Shah

can i create database using backup file in SQl server 2005 Express edition

hi

i have a database file backup which is having no extension (eg saims) . Can i create a database using this backup in sql server expression edition.

Or else is there any way to get the .mdf file from sql server 2005 full edition??????

Thanx in advance

Hi

Is it possible you don't see the extention mdf just because your folder options in windows xp tell you to "hide extentions of known file types"?

Just create a new database and force it to backup on the file you have.

Hope this helps!

Wim

|||

no actually its a text file which is backup file taken from a sql server 2005 enterprise edition.

So now i want original file (.mdf) from DE since i don't have sql server2005 full version.

I have DE that comes with .net 2005

Can I create a database schema from a DataSet and/or .xsd file?

I have some questions about creating SQL Server CE databases. Based on my experiments and what I've read on these forums, it looks like there are a couple ways to create a database schema. I can edit the database schema via the Server Explorer in Visual Studio, or use an external program like SQL Server Management Studio and somehow convert those files to .sdf files.

I find Visual Studio's built in tools to be cumbersome to use and limited in functionality, and using SSMS seems like a roundabout way of approaching the problem. I understand Microsoft will be releasing better tools with Orcas, but in the meantime, I'm wondering if there are alternative ways to generate database schemas.

For instance, I find Visual Studio's DataSet designer fairly easy to use. The DataSet designer generates schema definitions (.xsd files), and an instantiated DataSet can both read and write schema definitions via Read/WriteXMLSchema. Furthermore, DataAdapter's Fill and FillSchema methods can be used to push a schema from a database to a DataSet. So, can I somehow go the other direction and push a schema from a DataSet to a database? It seems like all the tools are there...

For example, if I create the DataSet schema, could I use a small app to create a new .sdf file, instantiate a DataSet, write the schema from the DataSet to the database, and then save the .sdf file? Or given the generated .xsd file, is there any way to create a SQL database from that?

Thanks in advance for any replies.

You can do that by loading schema into DataSet and looping through DataSet's tables, columns, relations, etc., generating respective SQL command and executing them. E.g. you loop through tables in DataSet and execute "Create Table" command for each.

I would not say it’s easier than using designers but by all means you can do it.

|||

Thank you for the reply, Ilya. I agree that doesn't necessarily sound easier than using designers.

If you would indulge me, perhaps you can answer a related and probably more appropriate question. What options are available for creating databases at run time?

The samples I've seen in the SDK and online assume that an application will have access to an existing database. But what if the application is responsible for creating the database? For example, I was using Microsoft Money a few minutes ago, and it occurred to me that such an application would be well suited for SQL Server CE. At its heart, the content is just a relational database. I can imagine Money's .mny files just being rebranded .sdf files. But Money doesn't ship with an existing database. Rather, it allows you to create your own via a traditional File->New command. I imagine the code would look something like the following in CE:

String connString = "Data Source='NewDatabaseFile.sdf'";

SqlCeEngine engine = new SqlCeEngine( connString );

engine.CreateDatabase();

But then what? You have an emtpy file and a database with no schema. If the answer is to run a bunch of CREATE TABLE commands or loop through a DataSet like your example above, then so be it. It would be a shame, however, if there were no way to leverage the database design tools available when creating databases at runtime.

I apologize if I am being naive with these questions. I am new to CE, and am just trying to get a sense of what can be done with it.

Thanks.

|||

Yes, you need to run appropriate SQL command to create schema at runtime after you’ve created the database.

If you need runtime designers then you'd need to implement these designers yourself. They would translate the schema in whatever form to... yes, SQL commands.

sql

can i create a database from backup file

hi

is it possible to create a database using backup in sql server DE?

like we can do in full edition using restore option........

yes its possible to create a db by restoring it from backup file.......regardless of the edition i believe.......|||In order to RESTORE a non-existant database, it may be necessary to first create an 'empty' database with the same name, and then RESTORE over the top of that.|||Be aware that the files might not be stored on the same location as the original files were (e.g. the drive letter of the former server does not exists). You will have to use the with move option then (or simply use the gui and specify other file locations as you will see during the recovery that the original file locations are stored within the backup set.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Monday, March 19, 2012

can I bring roll back a trasaction log

I am building a test environment. My objective is to be able to bring the
test database from different stage within 15 minutes. The database mdf file
is 6G and the log file is 500M after truncated. The data is updated not
using transaction commit command.
Existing Plan
1/ prepare a full backup of the database to a file called
FullBackup.bak
2/ at each hour , do a transaction log backup. e.g
job1.trn
3/ I restore the database by applying the full backup bak and individual
transaction.log . But the whole process takes about one hour which does not
meet the requirement to bring back the database within 15 minutes.
Question:
1/ consider the following:
8:00 am full backup
9:00 am transaction log backup job 1
10:00am transaction log backup job 2
11:00am transaction log backup job 3
I need to bring back the database at 9:59am.
Is it a way to apply the transaction log so that the database can undo the
change based on the job3 transaction log, job 2 transaction log?
or
2/ What other way can allow me to bring back a data base at different stage
within 15 minutes?
3/ How to find out what database has been modified every one hour? and
what data has been added/deleted/edited.
Regards
SMS1Depending on your disk configurations, you might reduce the backup and
recovery times by striping your backup files e.g.
BACKUP DATABASE pubs TO DISK = 'f:\backups\pubs1.bak', DISK ='f:\backups\pubs2.bak' ...
When you mentioned that the recovery took 1 hour, did you delete the
database before restoring it? If you did, try restoring without first
deleting the database. It would save some time as it avoids having SQL
Server create a 6 Gig file before the restore process actually starts.
Lastly, depending again on your hardware configuration, you can reduce
backup and restore times by using backup software that works with compressed
SQL Server backup files e.g. our product, MiniSQLBackup.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Use MiniSQLBackup Lite, free!
"sms" <sms1@.pctc.com> wrote in message
news:vsg4d.2575$KF.20421@.tor-nn1.netcom.ca...
> I am building a test environment. My objective is to be able to bring the
> test database from different stage within 15 minutes. The database mdf
file
> is 6G and the log file is 500M after truncated. The data is updated not
> using transaction commit command.
> Existing Plan
> 1/ prepare a full backup of the database to a file called
> FullBackup.bak
> 2/ at each hour , do a transaction log backup. e.g
> job1.trn
> 3/ I restore the database by applying the full backup bak and individual
> transaction.log . But the whole process takes about one hour which does
not
> meet the requirement to bring back the database within 15 minutes.
> Question:
> 1/ consider the following:
> 8:00 am full backup
> 9:00 am transaction log backup job 1
> 10:00am transaction log backup job 2
> 11:00am transaction log backup job 3
> I need to bring back the database at 9:59am.
> Is it a way to apply the transaction log so that the database can undo the
> change based on the job3 transaction log, job 2 transaction log?
> or
> 2/ What other way can allow me to bring back a data base at different
stage
> within 15 minutes?
>
> 3/ How to find out what database has been modified every one hour? and
> what data has been added/deleted/edited.
> Regards
> SMS1
>|||Hi
1. If you need to bring a database back to 9:59am, you need to restore the
last good full backup and all the transaction logs after that, including the
10:00am one, up to the time you need. See "point in time recovery" in BOL
2. This is the only option, as transaction logs can be restored to an exact
point in time.
3. Look at the commercial products LogPI or Log Explorer to examine log files.
Cheers
Mike
"sms" wrote:
> I am building a test environment. My objective is to be able to bring the
> test database from different stage within 15 minutes. The database mdf file
> is 6G and the log file is 500M after truncated. The data is updated not
> using transaction commit command.
> Existing Plan
> 1/ prepare a full backup of the database to a file called
> FullBackup.bak
> 2/ at each hour , do a transaction log backup. e.g
> job1.trn
> 3/ I restore the database by applying the full backup bak and individual
> transaction.log . But the whole process takes about one hour which does not
> meet the requirement to bring back the database within 15 minutes.
> Question:
> 1/ consider the following:
> 8:00 am full backup
> 9:00 am transaction log backup job 1
> 10:00am transaction log backup job 2
> 11:00am transaction log backup job 3
> I need to bring back the database at 9:59am.
> Is it a way to apply the transaction log so that the database can undo the
> change based on the job3 transaction log, job 2 transaction log?
> or
> 2/ What other way can allow me to bring back a data base at different stage
> within 15 minutes?
>
> 3/ How to find out what database has been modified every one hour? and
> what data has been added/deleted/edited.
> Regards
> SMS1
>
>

Sunday, March 11, 2012

Can dump file naming convention be specified using Maintence Plan

Hi,
For a 'complete backup' using Maintenance Plan the naming convention
now is
DBNAMEmo.dy.yr_hr_sc
Can this changed or is it hardcoded?
TIA
-Roman
Management Console 2.0
SQL Enterpise Manager 8.0To the best of my knowledge, it is hardcoded. Only thing you can change is extension of the files.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>

Can dump file naming convention be specified using Maintence Plan

Hi,
For a 'complete backup' using Maintenance Plan the naming convention
now is
DBNAMEmo.dy.yr_hr_sc
Can this changed or is it hardcoded?
TIA
-Roman
Management Console 2.0
SQL Enterpise Manager 8.0To the best of my knowledge, it is hardcoded. Only thing you can change is e
xtension of the files.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>|||To the best of my knowledge, it is hardcoded. Only thing you can change is e
xtension of the files.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<romandvoskin@.gmail.com> wrote in message
news:1150912826.206544.128420@.i40g2000cwc.googlegroups.com...
> Hi,
> For a 'complete backup' using Maintenance Plan the naming convention
> now is
> DBNAMEmo.dy.yr_hr_sc
> Can this changed or is it hardcoded?
> TIA
> -Roman
> Management Console 2.0
> SQL Enterpise Manager 8.0
>

Can DTS read a file as one big blob?

(SQL Server 2000, SP3a)
Hello all!
I've got a pretty simple XML file that I'd like to process with DTS. I unde
rstand that
DTS doesn't have native capability for XML, so I was wondering if I could st
ill use DTS to
read in the entire source file and pass that into a stored procedure as a TE
XT argument?
Thanks for any help you can provide!
John PetersonHi John,
Not sure what you need to accomplish or what exactly process
the file means but with XML files, another option is to use
SQL Server 2000 Web Services Toolkit or just install SQLXML.
You can use the SQL XML Bulk Load object model to import XML
files. You could write this in an ActiveX script task in
DTS.
-Sue
On Sat, 13 Mar 2004 18:46:48 -0700, "John Peterson"
<j0hnp@.comcast.net> wrote:

>(SQL Server 2000, SP3a)
>Hello all!
>I've got a pretty simple XML file that I'd like to process with DTS. I und
erstand that
>DTS doesn't have native capability for XML, so I was wondering if I could s
till use DTS to
>read in the entire source file and pass that into a stored procedure as a T
EXT argument?
>Thanks for any help you can provide!
>John Peterson
>|||Thanks Sue!
Is the SQL XML Bulk Load object model part of the SQLXML package? I'm not w
holly familiar
with SQLXML -- my impression is that it's an add-on to SQL Server, and I kno
w the initial
reaction to our Hosting department will be to understand *why* it's necessar
y for us to
install that on the Production servers. But, if it's the right thing to do,
they'll
oblige.
I had thought to easily leverage some of the built-in XML features of SQL Se
rver, and I
think I could get DTS to invoke a SP that does some manipulation with OPENXM
L(), but I
wasn't sure how to get DTS to potentially squirt the contents of the XML fil
e into a NTEXT
parameter to the SP.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:8idb50lj18hs2hopcvr11c5inrfs0gns2d@.
4ax.com...
> Hi John,
> Not sure what you need to accomplish or what exactly process
> the file means but with XML files, another option is to use
> SQL Server 2000 Web Services Toolkit or just install SQLXML.
> You can use the SQL XML Bulk Load object model to import XML
> files. You could write this in an ActiveX script task in
> DTS.
> -Sue
> On Sat, 13 Mar 2004 18:46:48 -0700, "John Peterson"
> <j0hnp@.comcast.net> wrote:
>
to
argument?
>|||Yup...the SQLXML bulk load object is part of SQLXML. It's
an add-on or additional component to install. I've used
SQLXML Bulk Load in ActiveX scripts to import XML files into
the relational tables.
The SQLXML OLEDB provider that comes with it also supports
inserting XML data - but I haven't messed with it and don't
know much about it other than it exposes the functionality
through ADO. There is also a managed provider to work with
.Net
The help files that come with it are pretty good and have
examples, samples that can be used to test out
functionality. You may want to download and install it on
your PC to see if it works for you. Excuse the long link and
watch out for line wrap:
http://www.microsoft.com/downloads/...&displaylang=en
-Sue
On Mon, 15 Mar 2004 08:53:49 -0700, "John Peterson"
<j0hnp@.comcast.net> wrote:

>Thanks Sue!
>Is the SQL XML Bulk Load object model part of the SQLXML package? I'm not
wholly familiar
>with SQLXML -- my impression is that it's an add-on to SQL Server, and I kn
ow the initial
>reaction to our Hosting department will be to understand *why* it's necessa
ry for us to
>install that on the Production servers. But, if it's the right thing to do
, they'll
>oblige.
>I had thought to easily leverage some of the built-in XML features of SQL S
erver, and I
>think I could get DTS to invoke a SP that does some manipulation with OPENX
ML(), but I
>wasn't sure how to get DTS to potentially squirt the contents of the XML fi
le into a NTEXT
>parameter to the SP.
>
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:8idb50lj18hs2hopcvr11c5inrfs0gns2d@.
4ax.com...
>to
>argument?
>

can dts "invert" data

sql2k sp3a
Dont know if "invert" is the right word, but the only one I could come up
with. I have a flat file that displays data like:
GEN_PROREGCTCTXT CRZCODE S_GENERATION
1 CB 1
1 CS 1
That top row is data, not column names FYI. Anyways, what I need to do is
get that file into a table but I need it accross, not down. Meaning that the
rows 2 and 3 from column 1 will actually go into columns 2 and 3 in row 1.
It needs to look like:
GEN_PROREGCTCTXT 1 1
CRZCODE CB CS
S_GENERATION 1 1
Is there a way for DTS to handle something like this? Another good way to do
it?
TIA, ChrisR
Import it into SQLServer the way it is, then look up how to code a
"pivot" query to turn it over.
J.
On Thu, 25 Aug 2005 13:28:50 -0700, "ChrisR" <noemail@.bla.com> wrote:
>sql2k sp3a
>Dont know if "invert" is the right word, but the only one I could come up
>with. I have a flat file that displays data like:
>GEN_PROREGCTCTXT CRZCODE S_GENERATION
>1 CB 1
>1 CS 1
>That top row is data, not column names FYI. Anyways, what I need to do is
>get that file into a table but I need it accross, not down. Meaning that the
>rows 2 and 3 from column 1 will actually go into columns 2 and 3 in row 1.
>It needs to look like:
>GEN_PROREGCTCTXT 1 1
>CRZCODE CB CS
>S_GENERATION 1 1
>Is there a way for DTS to handle something like this? Another good way to do
>it?
>TIA, ChrisR
>

can dts "invert" data

sql2k sp3a
Dont know if "invert" is the right word, but the only one I could come up
with. I have a flat file that displays data like:
GEN_PROREGCTCTXT CRZCODE S_GENERATION
1 CB 1
1 CS 1
That top row is data, not column names FYI. Anyways, what I need to do is
get that file into a table but I need it accross, not down. Meaning that the
rows 2 and 3 from column 1 will actually go into columns 2 and 3 in row 1.
It needs to look like:
GEN_PROREGCTCTXT 1 1
CRZCODE CB CS
S_GENERATION 1 1
Is there a way for DTS to handle something like this? Another good way to do
it?
TIA, ChrisRImport it into SQLServer the way it is, then look up how to code a
"pivot" query to turn it over.
J.
On Thu, 25 Aug 2005 13:28:50 -0700, "ChrisR" <noemail@.bla.com> wrote:
>sql2k sp3a
>Dont know if "invert" is the right word, but the only one I could come up
>with. I have a flat file that displays data like:
>GEN_PROREGCTCTXT CRZCODE S_GENERATION
>1 CB 1
>1 CS 1
>That top row is data, not column names FYI. Anyways, what I need to do is
>get that file into a table but I need it accross, not down. Meaning that the
>rows 2 and 3 from column 1 will actually go into columns 2 and 3 in row 1.
>It needs to look like:
>GEN_PROREGCTCTXT 1 1
>CRZCODE CB CS
>S_GENERATION 1 1
>Is there a way for DTS to handle something like this? Another good way to do
>it?
>TIA, ChrisR
>

Can I access MS Access table in a select query of SQL Server

Is there a way to specify a MS Access table (or query object) in the select query of SQL Server.

Ex.:

MSAccessTable (in file.mdb)

col1

col2

a1

a2

b1

b2

SQL query in SQL Server:

SELECT col1, col2 into SqlTable from [file.mdb].MSAccessTable;

Thanks,

Have a look at OPENROWSET in Books online

This is the direct link for your local BOL ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/f47eda43-33aa-454d-840a-bb15a031ca17.htm

|||or BOL for OPENROWSET at http://msdn2.microsoft.com/en-us/library/ms190312.aspx

Can Grow crystal report option - does not grow.

Hi.

I am connecting my report file to the domino server. I have a string in the crystal report which is mapped to a text field. the "Can Grow" option is checked but still this string on the report is truncating the data after some 240+ characters.

Any of you have any idea? Your help would be highly appreciatedCheck whether the field has any junk data|||Hi Madhi.

Thanks for your reply. I have checked that there is no junk data in the field...its all simple text...but still the field does not display all of my data in the report. Any idea?.

thanks again for your help.|||Did you try to expand the filed?|||Yes. I expanded the field width. My field is available in the Details Section. I have increased the width but still the complete information does not show up and blank space is displayed from the point the information is truncated.

Can get RDL file name?

Hi,

Is any way can get RDL file name and show on text box?

Any function or something else?

Thanks for any advices!

As the data is tranfered to sql server the report file does not exists anymore as a file. The file that you can download from the web interface is simply composed by reportname + rdl extension.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||

The ReportObjectModel exposed to RDL expressions contains several collections (see also: http://msdn2.microsoft.com/en-us/library/ms157274.aspx). One of them is the Globals collections:

Member

Type

Description

ExecutionTime

DateTime

The date and time that the report began to run.

PageNumber

Integer

The current page number. Can be used only in page header and footer.

ReportFolder

String

The full path to the folder containing the report. This does not include the report server URL.

ReportName

String

The name of the report as it is stored in the report server database.

ReportServerUrl

String

The URL of the report server on which the report is being run.

TotalPages

Integer

The total number of pages in the report. Can be used only in page header and footer.

The following expression would show you the path and report name of the current report:

=Globals.ReportFolder & Globals.ReportName

-- Robert

Thursday, March 8, 2012

Can data be retrieved from a SQL LDF file (Log)

I have a database that has a corrupt .MDF file, but
the .LDF file is still accessible. My most recent backup
is a week old. My question is: After I re-create the
database, is there any way I can recover the past weeks
transactions from the .LDF file. No transaction dump has
been done since the last backup, so I would think that
theoretically the week's transactions are still in the LDF
file.If you haven't done any transaction log backups since the most recent
database backup you can now backup the log, restore the full backup and then
restore the transaction log backup.
See Books Online for the details.
--
Jacco Schalkwijk
SQL Server MVP
"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.|||"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.
Yes.
Before restoring back up your log with NOTRUNCATE
BACKUP LOG mydb
TO mydevice1
WITH NOTRUNCATE
RESTORE DATABASE mydb
FROM mydevice2
WITH RESTORE.
That should roll your log file forward.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003

Wednesday, March 7, 2012

can clustering use as load balacing

I want to have 3 MSSQL server that work at same time on shared
database(all opened a single data file on SAN for example). And request
for queries are send to those parallel and same sql servers to archive
more processing power and fail over feature?act as load balancing?
what can I do for load balancing heavy traffic queries like which can
done on web server?
thanks
SQL Server does not support shared-disk clustering for load balancing, though
there is a feature in SQL2005 called scalable shared database that allows you
to present the same database via a LUN to multiple SQL2005 instances for
read-only access.
Linchi
"Tarvirdi" wrote:

> I want to have 3 MSSQL server that work at same time on shared
> database(all opened a single data file on SAN for example). And request
> for queries are send to those parallel and same sql servers to archive
> more processing power and fail over feature?act as load balancing?
> what can I do for load balancing heavy traffic queries like which can
> done on web server?
> thanks
>
|||Linchi Shea wrote:
> SQL Server does not support shared-disk clustering for load balancing, though
> there is a feature in SQL2005 called scalable shared database that allows you
> to present the same database via a LUN to multiple SQL2005 instances for
> read-only access.
Dear Linchi,
Thanks for your response.
What you mean about sharing datafile?
For example I have A database named T1 with T1.mdf and want to have
another Database on other server(or same server to start test) and have
read only access to above T1.mdf? how implement it? which steps should I do?
I tried but failed because of "can create already exist file error"
Thanks
|||
> For example I have A database named T1 with T1.mdf and want to have
> another Database on other server(or same server to start test) and have
> read only access to above T1.mdf?
You can not do this
The limitation is NTFS, NTFS you can only have on server accessing the
volume at a time.
You can not do this on the same host either as SQL will have a problem
(cache comes to mind first)
the answer to your original question:
Q: can clustering be used as load balancing for SQL ?
A: no
|||
> there is a feature in SQL2005 called scalable shared database that allows
you
> to present the same database via a LUN to multiple SQL2005 instances for
> read-only access.
correct, but that is a "static" disk, presented RO to multiple hosts
you cannot have one host "writing" to and others "reading" from the same
disk

Can BCP Handle Leap Day: 2/29/08 ?

I have a production job that is killing BCP... If I change the dates to
2/28/08, the file processes just fine. Here is the error message ... is
this a known issue? Is there a fix for this?
#@. Row 11366, Column 2: Invalid date format @.#
1/21/08 2/29/08 1 0073210002300 0 3.68 12
#@. Row 24909, Column 2: Invalid date format @.#
1/21/08 2/29/08 4 0073210002300 0 3.68 12
#@. Row 38452, Column 2: Invalid date format @.#
1/21/08 2/29/08 7 0073210002300 0 3.68 12
#@. Row 51995, Column 2: Invalid date format @.#
1/21/08 2/29/08 14 0073210002300 0 3.68 12
#@. Row 65538, Column 2: Invalid date format @.#
Thanks!
Greg,
I am sure that bcp is simply using the SQL Server engine, so I would expect
it to 'know'. When I tested the following file all rows worked.
2/29/08
2/28/08
2/29/2008
2/28/2008
If the date was invalid, you would get the message that you show. I get the
errorw when I include a row with:
2/30/2008
So, one possibility is that your format file (or the format of your file) is
the problem. Are you using a format file or are you depending on tabs and
column order? (The latter is fine when it works, of course, but sometimes
you need a format file to control things more. See:
http://support.microsoft.com/kb/67409 and look "format files" in the SQL
Server Book Online for some examples.)
RLF
"greg may" <gregory_may [at] yahoo [dot] com> wrote in message
news:%233wz4JyvHHA.736@.TK2MSFTNGP06.phx.gbl...
>I have a production job that is killing BCP... If I change the dates to
>2/28/08, the file processes just fine. Here is the error message ... is
>this a known issue? Is there a fix for this?
> #@. Row 11366, Column 2: Invalid date format @.#
> 1/21/08 2/29/08 1 0073210002300 0 3.68 12
> #@. Row 24909, Column 2: Invalid date format @.#
> 1/21/08 2/29/08 4 0073210002300 0 3.68 12
> #@. Row 38452, Column 2: Invalid date format @.#
> 1/21/08 2/29/08 7 0073210002300 0 3.68 12
> #@. Row 51995, Column 2: Invalid date format @.#
> 1/21/08 2/29/08 14 0073210002300 0 3.68 12
> #@. Row 65538, Column 2: Invalid date format @.#
>
>
> Thanks!
>
|||Thanks Russell for your feedback. I will have to set up some more tests to
track this down further.
We are not using a format file in this case. Its using an implicid
conversion as the table structure and the field lay outs are an exact match
(Using Pipe delimiters) ... this may be part of what is causing the issue?
In this case, the destination table is using a SmallDateTime.
I will see if I can reproduce the problem with only the above conditions.
g.
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:uUKHnIzvHHA.4244@.TK2MSFTNGP04.phx.gbl...
> Greg,
> I am sure that bcp is simply using the SQL Server engine, so I would
> expect it to 'know'. When I tested the following file all rows worked.
> 2/29/08
> 2/28/08
> 2/29/2008
> 2/28/2008
> If the date was invalid, you would get the message that you show. I get
> the errorw when I include a row with:
> 2/30/2008
> So, one possibility is that your format file (or the format of your file)
> is the problem. Are you using a format file or are you depending on tabs
> and column order? (The latter is fine when it works, of course, but
> sometimes you need a format file to control things more. See:
> http://support.microsoft.com/kb/67409 and look "format files" in the SQL
> Server Book Online for some examples.)
> RLF
> "greg may" <gregory_may [at] yahoo [dot] com> wrote in message
> news:%233wz4JyvHHA.736@.TK2MSFTNGP06.phx.gbl...
>